rules 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Sample debian/rules that uses debhelper.
  4. #
  5. # This file was originally written by Joey Hess and Craig Small.
  6. # As a special exception, when this file is copied by dh-make into a
  7. # dh-make output file, you may use that output file without restriction.
  8. # This special exception was added by Craig Small in version 0.37 of dh-make.
  9. #
  10. # Modified to make a template file for a multi-binary package with separated
  11. # build-arch and build-indep targets by Bill Allombert 2001
  12. # Uncomment this to turn on verbose mode.
  13. export DH_VERBOSE=1
  14. # This has to be exported to make some magic below work.
  15. export DH_OPTIONS
  16. CFLAGS = -Wall -g
  17. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  18. CFLAGS += -O0
  19. OPT+= -O0
  20. else
  21. CFLAGS += -O2
  22. OPT+= -O2
  23. endif
  24. FPCVER=$(shell fpc -iV)
  25. FPCLibPrefix=%{libdir}/fpc/%{FPC_Version}
  26. FPCUnitDir=%{FPCLibPrefix}/units
  27. FPCUnitArcDir=%{FPCUnitDir}/%{CPU_TARGET}-%{_os}
  28. #macros for install file placement
  29. BUILDDIR=$(CURDIR)/debian/indy-fpc/
  30. BUILDINSTPREFIX=$(BUILDDIR)/usr/lib/fpc/${FPCVER}
  31. BUILDINDYSRCDIR=$(CURDIR)/debian/indy-fpc-src/
  32. BUILDINDYSRCINSTALLPREFIX=${BUILDINDYSRCDIR}/usr/share/fpcsrc/packages/extra/indy
  33. configure: configure-stamp
  34. configure-stamp:
  35. dh_testdir
  36. # Add here commands to configure the package.
  37. touch configure-stamp
  38. dh_install
  39. #Architecture
  40. build: build-arch build-indep
  41. build-arch: build-arch-stamp
  42. build-arch-stamp: configure-stamp
  43. # Add here commands to compile the arch part of the package.
  44. $(MAKE)
  45. touch build-arch-stamp
  46. build-indep: build-indep-stamp
  47. build-indep-stamp: configure-stamp
  48. # Add here commands to compile the indep part of the package.
  49. dh_install *.pas indy-fpc-src
  50. dh_install Makefile* indy-fpc-src
  51. dh_install examples indy-fpc-src
  52. #$(MAKE) doc
  53. touch build-indep-stamp
  54. clean:
  55. dh_testdir
  56. dh_testroot
  57. rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
  58. # Add here commands to clean up after the build process.
  59. -$(MAKE) clean
  60. dh_clean
  61. dh_clean ${BUILDINDYSRCINSTALLPREFIX}/*.pas ${BUILDINDYSRCINSTALLPREFIX}/Makefile*
  62. install: install-indep install-arch
  63. install-indep:
  64. dh_testdir
  65. dh_testroot
  66. dh_clean -k -i
  67. #dh_installdirs -i
  68. # Add here commands to install the indep part of the package into
  69. # debian/<package>-doc.
  70. #INSTALLDOC#
  71. mkdir -p ${BUILDINDYSRCINSTALLPREFIX}
  72. cp -r ${CURDIR}/*.pas ${BUILDINDYSRCINSTALLPREFIX}
  73. cp -r ${CURDIR}/Makefile* ${BUILDINDYSRCINSTALLPREFIX}
  74. cp -r ${CURDIR}/examples ${BUILDINDYSRCINSTALLPREFIX}
  75. dh_install -i
  76. install-arch:
  77. dh_testdir
  78. dh_testroot
  79. dh_clean -k -s
  80. dh_installdirs -s
  81. # Add here commands to install the arch part of the package into
  82. # debian/tmp.
  83. FPCVER={fpc}
  84. $(MAKE) install INSTALL_BASEDIR=${BUILDINSTPREFIX}
  85. # $(MAKE) install DESTDIR=$(CURDIR)/debian/indy-fpc
  86. #
  87. dh_install -s
  88. # Must not depend on anything. This is to be called by
  89. # binary-arch/binary-indep
  90. # in another 'make' thread.
  91. binary-common:
  92. dh_testdir
  93. dh_testroot
  94. dh_installchangelogs
  95. dh_installdocs
  96. dh_installexamples
  97. # dh_installmenu
  98. # dh_installdebconf
  99. # dh_installlogrotate
  100. # dh_installemacsen
  101. # dh_installpam
  102. # dh_installmime
  103. # dh_installinit
  104. # dh_installcron
  105. # dh_installinfo
  106. dh_installman
  107. dh_link
  108. dh_strip
  109. dh_compress
  110. dh_fixperms
  111. # dh_perl
  112. # dh_python
  113. dh_makeshlibs
  114. dh_installdeb
  115. dh_shlibdeps
  116. dh_gencontrol
  117. dh_md5sums
  118. dh_builddeb
  119. # Build architecture independant packages using the common target.
  120. binary-indep: build-indep install-indep
  121. $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
  122. # Build architecture dependant packages using the common target.
  123. binary-arch: build-arch install-arch
  124. $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
  125. binary: binary-arch binary-indep
  126. .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure