rules 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/usr/bin/make -f
  2. # debian/rules makefile for postfixadmin
  3. # Uncomment this to turn on verbose mode.
  4. #export DH_VERBOSE=1
  5. export VERSION = $(shell grep -E "version = '.*';" functions.inc.php |sed -e "s/.version = '//" |sed -e "s/';.*//" |sed -e "s/ /-/g")
  6. export DEBVERSION = $(shell grep -E "postfixadmin .([0-9]+|\.)+" debian/changelog |head -1 |sed -e "s/postfixadmin .//" |sed -e "s/-.*//")
  7. build: build-arch build-indep
  8. build-arch: build-stamp
  9. build-indep: build-stamp
  10. build-stamp:
  11. dh_testdir
  12. touch build-stamp
  13. # Create a needed tar.gz file to build a non-nativ .dpkg
  14. prep:
  15. rm -f ../postfixadmin_*orig.tar.gz
  16. cd ..; tar --exclude-vcs --exclude=$(notdir ${CURDIR})/debian --exclude=$(notdir ${CURDIR})/.pc -cvzf postfixadmin_${DEBVERSION}.orig.tar.gz $(notdir ${CURDIR})
  17. clean:
  18. dh_testdir
  19. dh_testroot
  20. dh_clean
  21. debconf-updatepo
  22. install: build
  23. dh_testdir
  24. dh_testroot
  25. dh_prep
  26. dh_installdirs
  27. dh_install
  28. mv debian/postfixadmin/usr/share/postfixadmin/config.inc.php debian/postfixadmin/etc/postfixadmin/config.inc.php
  29. find debian/postfixadmin -name .svn | xargs -r rm -r
  30. chmod +x debian/postfixadmin/usr/share/postfixadmin/scripts/postfixadmin-cli
  31. chmod +x debian/postfixadmin/usr/share/postfixadmin/scripts/postfixadmin-cli.php
  32. chown www-data debian/postfixadmin/usr/share/postfixadmin/templates_c
  33. # Build architecture-independent files here.
  34. binary-indep: build install
  35. dh_testdir
  36. dh_testroot
  37. dh_installchangelogs
  38. dh_installdebconf
  39. dh_installdocs -X.svn
  40. dh_installexamples -X.svn
  41. dh_link
  42. dh_compress
  43. dh_fixperms
  44. dh_installdeb
  45. dh_gencontrol
  46. dh_md5sums
  47. dh_builddeb
  48. # Build architecture-dependent files here.
  49. binary-arch:
  50. binary: binary-indep binary-arch
  51. .PHONY: build clean binary-indep binary-arch binary install