home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / debian / ruleset / targets / source.mk < prev    next >
Encoding:
Text File  |  2006-03-29  |  5.9 KB  |  130 lines

  1. ######################### -*- Mode: Makefile-Gmake -*- ########################
  2. ## source.mk --- 
  3. ## Author           : Manoj Srivastava ( srivasta@glaurung.internal.golden-gryphon.com ) 
  4. ## Created On       : Mon Oct 31 13:55:32 2005
  5. ## Created On Node  : glaurung.internal.golden-gryphon.com
  6. ## Last Modified By : Manoj Srivastava
  7. ## Last Modified On : Wed Jan  4 18:26:00 2006
  8. ## Last Machine Used: glaurung.internal.golden-gryphon.com
  9. ## Update Count     : 3
  10. ## Status           : Unknown, Use with caution!
  11. ## HISTORY          : 
  12. ## Description      : This file is responsible forcreating the kernel-source packages 
  13. ## 
  14. ## arch-tag: 1a7fd804-128f-4f9d-9e3d-ce6bdb731823
  15. ## 
  16. ## 
  17. ## This program is free software; you can redistribute it and/or modify
  18. ## it under the terms of the GNU General Public License as published by
  19. ## the Free Software Foundation; either version 2 of the License, or
  20. ## (at your option) any later version.
  21. ##
  22. ## This program is distributed in the hope that it will be useful,
  23. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  25. ## GNU General Public License for more details.
  26. ##
  27. ## You should have received a copy of the GNU General Public License
  28. ## along with this program; if not, write to the Free Software
  29. ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  30. ##
  31. ###############################################################################
  32.  
  33.  
  34. install/$(s_package): 
  35.     $(REASON)
  36.     @echo "This is kernel package version $(kpkg_version)."
  37. ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
  38.     rm -rf $(TMPTOP)
  39.     $(make_directory) $(SRCDIR)
  40.     $(make_directory) $(DOCDIR)
  41.     $(eval $(which_debdir))
  42.     $(install_file) README                         $(DOCDIR)/README
  43.     $(install_file) debian/changelog               $(DOCDIR)/changelog.Debian
  44.     $(install_file) $(DEBDIR)/docs/README          $(DOCDIR)/debian.README
  45.     $(install_file) $(DEBDIR)/docs/README.grub     $(DOCDIR)/
  46.     $(install_file) $(DEBDIR)/docs/README.tecra    $(DOCDIR)/
  47.     $(install_file) $(DEBDIR)/docs/README.modules  $(DOCDIR)/
  48.     $(install_file) $(DEBDIR)/docs/Rationale       $(DOCDIR)/
  49.     $(install_file) $(DEBDIR)/examples/sample.module.control               \
  50.                                                        $(DOCDIR)/
  51.     gzip -9qfr                                     $(DOCDIR)/
  52.     $(install_file) $(DEBDIR)/pkg/source/copyright $(DOCDIR)/copyright
  53.     echo "This was produced by kernel-package version $(kpkg_version)." >  \
  54.                                                    $(DOCDIR)/Buildinfo
  55.   ifneq ($(strip $(int_follow_symlinks_in_src)),)
  56.     -tar cfh - $$(echo * | sed -e 's/ debian//g' -e 's/\.deb//g' ) |       \
  57.     (cd $(SRCDIR); umask 000; tar xpsf -)
  58.     (cd $(SRCDIR)/include; rm -rf asm ; )
  59.   else
  60.     -tar cf - $$(echo * | sed -e 's/ debian//g' -e 's/\.deb//g' ) |         \
  61.     (cd $(SRCDIR); umask 000; tar xspf -)
  62.     (cd $(SRCDIR)/include; rm -f asm ; )
  63.   endif
  64.     $(install_file) debian/changelog      $(SRCDIR)/Debian.src.changelog
  65.     (cd $(SRCDIR);                                                          \
  66.             $(MAKE) $(EXTRAV_ARG) $(CROSS_ARG) ARCH=$(KERNEL_ARCH) distclean)
  67.     (cd $(SRCDIR);         rm -f stamp-building $(STAMPS_TO_CLEAN))
  68.     (cd $(SRCDIR);                                                          \
  69.          [ ! -d scripts/cramfs ]   || make -C scripts/cramfs distclean ; )
  70.     if test -f debian/official && test -f debian/README.Debian ; then       \
  71.            $(install_file) debian/README.Debian $(SRCDIR)/README.Debian ;       \
  72.            $(install_file) debian/README.Debian $(DOCDIR)/README.Debian ;       \
  73.        gzip -9qf $(DOCDIR)/README.Debian;                                   \
  74.     else                                                                    \
  75.         sed -e 's/=V/$(version)/g' -e 's/=A/$(DEB_HOST_ARCH)/g'             \
  76.              -e 's/=ST/$(INT_STEM)/g'  -e 's/=B/$(KERNEL_ARCH)/g'               \
  77.                  $(DEBDIR)/pkg/source/README >  $(SRCDIR)/README.Debian ;       \
  78.     fi
  79.     if test -f README.Debian ; then                                         \
  80.            $(install_file) README.Debian        $(DOCDIR)/README.Debian.1st;    \
  81.        gzip -9qf                            $(DOCDIR)/README.Debian.1st;    \
  82.     fi
  83.     test -d $(SRCDIR)/debian || mkdir $(SRCDIR)/debian
  84.     for file in $(DEBIAN_FILES) control changelog; do                    \
  85.             cp -f  $(DEBDIR)/$$file $(SRCDIR)/debian/;                       \
  86.         done
  87.     for dir  in $(DEBIAN_DIRS);  do                                      \
  88.           cp -af $(DEBDIR)/$$dir  $(SRCDIR)/debian/;                         \
  89.         done
  90.     (cd $(SRCDIR); find . -type d -name .arch-ids -print0 | xargs -0r rm -rf {} \; )
  91.   ifneq ($(strip $(source_clean_hook)),)
  92.     (cd $(SRCDIR); test -x $(source_clean_hook) && $(source_clean_hook))
  93.   endif
  94.     (cd $(SRCDIR) && cd .. &&                                            \
  95.            tar $(TAR_COMPRESSION) -cf $(package).tar.$(TAR_SUFFIX) $(package) && \
  96.              rm -rf $(package);)
  97. endif
  98.  
  99. debian/$(s_package): testroot
  100.     $(REASON)
  101.     @echo "This is kernel package version $(kpkg_version)."
  102. ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
  103.     $(eval $(which_debdir))
  104.     $(make_directory) $(TMPTOP)/DEBIAN
  105.     sed -e 's/=P/$(package)/g' -e 's/=V/$(version)/g'                       \
  106.         $(DEBDIR)/pkg/source/postinst >          $(TMPTOP)/DEBIAN/postinst
  107.     chmod 755                                    $(TMPTOP)/DEBIAN/postinst
  108.     chmod -R og=rX                               $(TMPTOP)
  109.     chown -R root:root                           $(TMPTOP)
  110.     dpkg-gencontrol -isp -p$(package)          -P$(TMPTOP)/
  111.     chmod -R og=rX                               $(TMPTOP)
  112.     chown -R root:root                           $(TMPTOP)
  113.     dpkg --build                                 $(TMPTOP) $(DEB_DEST)
  114. endif
  115.  
  116. binary/$(s_package):
  117.     $(REASON)
  118.     @echo "This is kernel package version $(kpkg_version)."
  119.     $(checkdir)
  120. ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
  121.     $(require_root)
  122.     $(eval $(deb_rule))
  123.     $(root_run_command) debian/$(package)
  124. endif
  125.  
  126.  
  127. #Local variables:
  128. #mode: makefile
  129. #End:
  130.