rules 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/usr/bin/make -f
  2. package=file
  3. build:
  4. $(checkdir)
  5. ./configure --prefix=/usr
  6. make
  7. touch build
  8. clean:
  9. $(checkdir)
  10. rm -f build changelog.tmp debian/copyright
  11. if [ -r Makefile ]; then \
  12. make clean; \
  13. fi
  14. rm -f config.{log,cache,status} Makefile
  15. rm -f `find . -name "*~"`
  16. rm -rf debian/tmp debian/files* core debian/substvars
  17. binary-indep: checkroot build
  18. $(checkdir)
  19. # There are no architecture-independent files to be uploaded
  20. # generated by this package. If there were any they would be
  21. # made here.
  22. binary-arch: checkroot build
  23. $(checkdir)
  24. rm -rf debian/tmp
  25. install -d debian/tmp/usr/bin debian/tmp/etc debian/tmp/usr/man/man1 debian/tmp/usr/man/man5
  26. make install prefix=`pwd`/debian/tmp/usr INSTALL="/usr/bin/install -p" DESTDIR=`pwd`/debian/tmp
  27. ln patchlevel.h changelog.tmp
  28. ln LEGAL.NOTICE debian/copyright
  29. debstd changelog.tmp README
  30. rm -f changelog.tmp debian/copyright
  31. dpkg-gencontrol
  32. chown -R root.root debian/tmp
  33. chmod -R go=rX debian/tmp
  34. dpkg --build debian/tmp ..
  35. define checkdir
  36. test -f debian/rules
  37. endef
  38. # Below here is fairly generic really
  39. binary: binary-indep binary-arch
  40. source diff:
  41. @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
  42. checkroot:
  43. $(checkdir)
  44. test root = "`whoami`"
  45. .PHONY: binary binary-arch binary-indep clean checkroot