rules 1.1 KB

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