rules 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/make -f
  2. # Use all hardening features
  3. export DEB_BUILD_MAINT_OPTIONS = hardening=+all
  4. %:
  5. dh $@
  6. override_dh_auto_build:
  7. # Set up wordlist
  8. cat /usr/share/dict/american-english /usr/share/dict/british-english | \
  9. sort | uniq > temp-dictionary
  10. dh_auto_build
  11. override_dh_installdocs:
  12. dh_installdocs
  13. cp atc/BUGS debian/bsdgames/usr/share/doc/bsdgames/BUGS.atc
  14. cp hunt/README debian/bsdgames/usr/share/doc/bsdgames/README.hunt
  15. cp phantasia/README debian/bsdgames/usr/share/doc/bsdgames/README.phantasia
  16. cp boggle/README debian/bsdgames/usr/share/doc/bsdgames/README.boggle
  17. cp hack/Original_READ_ME debian/bsdgames/usr/share/doc/bsdgames/Original_READ_ME.hack
  18. cp hack/READ_ME debian/bsdgames/usr/share/doc/bsdgames/READ_ME.hack
  19. # Move phantasia's binary state files into /usr, they are copied
  20. # back to /var in the postinst.
  21. mv debian/bsdgames/var/games/bsdgames/phantasia/monsters \
  22. debian/bsdgames/var/games/bsdgames/phantasia/void \
  23. debian/bsdgames/usr/share/games/bsdgames/phantasia/
  24. cat COPYING >> debian/bsdgames/usr/share/doc/bsdgames/copyright
  25. override_dh_fixperms:
  26. dh_fixperms
  27. chmod -R u+rw debian/bsdgames/usr/
  28. # Games with score files need to be set up sgid games.
  29. chown root:games debian/bsdgames/usr/games/atc \
  30. debian/bsdgames/usr/games/battlestar \
  31. debian/bsdgames/usr/games/canfield \
  32. debian/bsdgames/usr/games/cribbage \
  33. debian/bsdgames/usr/games/robots \
  34. debian/bsdgames/usr/games/snake \
  35. debian/bsdgames/usr/games/tetris-bsd \
  36. debian/bsdgames/usr/games/phantasia \
  37. debian/bsdgames/usr/games/sail \
  38. debian/bsdgames/usr/games/hack
  39. chmod g+s debian/bsdgames/usr/games/atc \
  40. debian/bsdgames/usr/games/battlestar \
  41. debian/bsdgames/usr/games/canfield \
  42. debian/bsdgames/usr/games/cribbage \
  43. debian/bsdgames/usr/games/robots \
  44. debian/bsdgames/usr/games/snake \
  45. debian/bsdgames/usr/games/tetris-bsd \
  46. debian/bsdgames/usr/games/phantasia \
  47. debian/bsdgames/usr/games/sail \
  48. debian/bsdgames/usr/games/hack
  49. # The game directories need to be sgid too, and let's
  50. # remove all the zero byte score files in them.
  51. chown root:games debian/bsdgames/var/games/bsdgames/ \
  52. debian/bsdgames/var/games/bsdgames/sail \
  53. debian/bsdgames/var/games/bsdgames/phantasia \
  54. debian/bsdgames/var/games/bsdgames/hack \
  55. debian/bsdgames/var/games/bsdgames/hack/save
  56. chmod g+rws debian/bsdgames/var/games/bsdgames/ \
  57. debian/bsdgames/var/games/bsdgames/sail \
  58. debian/bsdgames/var/games/bsdgames/phantasia \
  59. debian/bsdgames/var/games/bsdgames/hack \
  60. debian/bsdgames/var/games/bsdgames/hack/save
  61. find debian/bsdgames/var/games/bsdgames -size 0 -exec rm {} \;