rules 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #!/usr/bin/make -f
  2. # Sample debian/rules that uses debhelper.
  3. # GNU copyright 1997 to 1999 by Joey Hess.
  4. # Uncomment this to turn on verbose mode.
  5. #export DH_VERBOSE=1
  6. # This is the debhelper compatability version to use.
  7. export DH_COMPAT=1
  8. #include version
  9. major=$(shell grep '^MAJOR_VERSION' Rules.mak|sed 's/.*=//')
  10. minor=$(shell grep '^MINOR_VERSION' Rules.mak|sed 's/.*=//')
  11. version:=$(strip $(major)).$(strip $(minor))
  12. target=$(DEB_HOST_GNU_CPU)
  13. #target=powerpc
  14. build: build-stamp
  15. build-stamp:
  16. dh_testdir
  17. # Add here commands to compile the package.
  18. cp extra/Configs/Config.$(shell echo $(target)|sed 's/i386/x86/') Config
  19. echo '#Debian configuration overrides' >>Config
  20. ifneq ($(target),$(DEB_HOST_GNU_CPU))
  21. echo 'TARGET_ARCH = $(target)' >>Config
  22. echo 'CROSS = $(target)-linux-' >>Config
  23. endif
  24. echo 'DOPIC = true' >>Config
  25. echo 'PREFIX = $$(DESTDIR)/usr' >>Config
  26. echo 'DEVEL_PREFIX = $$(PREFIX)/$$(TARGET_ARCH)-linux-uclibc' >>Config
  27. echo 'TARGET_PREFIX = $$(DESTDIR)/' >>Config
  28. ifeq ($(target),powerpc)
  29. echo 'HAVE_SHARED = false' >>Config
  30. endif
  31. $(MAKE)
  32. touch build-stamp
  33. clean:
  34. dh_testdir
  35. dh_testroot
  36. rm -f build-stamp
  37. # Add here commands to clean up after the build process.
  38. -$(MAKE) clean
  39. dh_clean
  40. install: build
  41. dh_testdir
  42. dh_testroot
  43. dh_clean -k
  44. dh_installdirs
  45. # Add here commands to install the package into debian/tmp.
  46. $(MAKE) install_dev DESTDIR=`pwd`/debian/tmp
  47. $(MAKE) install_runtime DESTDIR=`pwd`/debian/libuclibc0
  48. $(MAKE) install_gcc DESTDIR=`pwd`/debian/uclibc-gcc
  49. install -m 644 debian/uclibc-gcc.1 \
  50. debian/uclibc-gcc/usr/share/man/man1/$(target)-uclibc-gcc.1
  51. (cd debian/uclibc-gcc/usr/share/man/man1; \
  52. ln -sf $(target)-uclibc-gcc.1.gz $(target)-uclibc-cc.1.gz; \
  53. ln -sf $(target)-uclibc-gcc.1.gz $(target)-uclibc-ld.1.gz; \
  54. for x in addr2line ar as cpp gasp nm objcopy objdump ranlib \
  55. size strings strip;do \
  56. ln -sf $$x.1.gz $(target)-uclibc-$$x.1.gz;done)
  57. install -d debian/libuclibc0/usr/share/man/man1
  58. install -m 644 debian/uclibc-ldd.1 \
  59. debian/libuclibc0/usr/share/man/man1/$(target)-uclibc-ldd.1
  60. install -m 644 debian/uclibc-ldconfig.1 \
  61. debian/libuclibc0/usr/share/man/man1/$(target)-uclibc-ldconfig.1
  62. # Build architecture-independent files here.
  63. binary-indep: build install
  64. # We have nothing to do by default.
  65. # Build architecture-dependent files here.
  66. binary-arch: build install
  67. # dh_testversion
  68. dh_testdir
  69. dh_testroot
  70. # dh_installdebconf
  71. dh_installdocs
  72. dh_installexamples
  73. dh_installmenu
  74. # dh_installemacsen
  75. # dh_installpam
  76. # dh_installinit
  77. dh_installcron
  78. # dh_installmanpages -plibuclibc0
  79. dh_installinfo
  80. # dh_undocumented
  81. dh_installchangelogs
  82. dh_link
  83. dh_strip
  84. dh_compress
  85. dh_fixperms -Xld-uclibc
  86. # You may want to make some executables suid here.
  87. # dh_suidregister
  88. # dh_makeshlibs
  89. dh_installdeb
  90. # dh_perl
  91. dh_shlibdeps --exclude=ld_uclibc -ldebian/libuclibc0/usr/$(target)-linux-uclibc/lib
  92. dh_gencontrol
  93. dh_md5sums
  94. dh_builddeb
  95. binary: binary-indep binary-arch
  96. .PHONY: build clean binary-indep binary-arch binary install