mirror of
https://salsa.debian.org/games-team/bsdgames
synced 2024-12-04 14:46:22 -05:00
73 lines
2.6 KiB
Makefile
Executable File
73 lines
2.6 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
# Use all hardening features
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
|
|
# Make choice of c compiler more flexible to help cross building.
|
|
# See bug #897048
|
|
-include /usr/share/dpkg/buildtools.mk
|
|
export bsd_games_cfg_cc=$(CC)
|
|
export bsd_games_cfg_cxx=$(CXX)
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
# Set up wordlist
|
|
cat /usr/share/dict/american-english /usr/share/dict/british-english | \
|
|
sort | uniq > temp-dictionary
|
|
dh_auto_build
|
|
# Generate a pdf file for trek documentation, see #874680
|
|
cat trek/USD.doc/trek.me | tbl | groff -me -Tpdf > debian/trek.pdf
|
|
|
|
override_dh_installdocs:
|
|
dh_installdocs
|
|
cp atc/BUGS debian/bsdgames/usr/share/doc/bsdgames/BUGS.atc
|
|
cp hack/Original_READ_ME debian/bsdgames/usr/share/doc/bsdgames/Original_READ_ME.hack
|
|
cp hack/READ_ME debian/bsdgames/usr/share/doc/bsdgames/READ_ME.hack
|
|
cat COPYING >> debian/bsdgames/usr/share/doc/bsdgames/copyright
|
|
|
|
override_dh_install:
|
|
dh_install
|
|
# Rename adventure to bsdgames-adventure to support the Debian
|
|
# update-alternatives system. See bug #802422.
|
|
mv debian/bsdgames/usr/games/adventure debian/bsdgames/usr/games/bsdgames-adventure
|
|
mv debian/bsdgames/usr/share/man/man6/adventure.6 debian/bsdgames/usr/share/man/man6/bsdgames-adventure.6
|
|
|
|
override_dh_compress:
|
|
dh_compress --exclude=.pdf
|
|
|
|
override_dh_fixperms:
|
|
dh_fixperms
|
|
chmod -R u+rw debian/bsdgames/usr/
|
|
# Games with score files need to be set up sgid games.
|
|
chown root:games debian/bsdgames/usr/games/atc \
|
|
debian/bsdgames/usr/games/battlestar \
|
|
debian/bsdgames/usr/games/canfield \
|
|
debian/bsdgames/usr/games/cribbage \
|
|
debian/bsdgames/usr/games/robots \
|
|
debian/bsdgames/usr/games/snake \
|
|
debian/bsdgames/usr/games/tetris-bsd \
|
|
debian/bsdgames/usr/games/sail \
|
|
debian/bsdgames/usr/games/hack
|
|
chmod g+s debian/bsdgames/usr/games/atc \
|
|
debian/bsdgames/usr/games/battlestar \
|
|
debian/bsdgames/usr/games/canfield \
|
|
debian/bsdgames/usr/games/cribbage \
|
|
debian/bsdgames/usr/games/robots \
|
|
debian/bsdgames/usr/games/snake \
|
|
debian/bsdgames/usr/games/tetris-bsd \
|
|
debian/bsdgames/usr/games/sail \
|
|
debian/bsdgames/usr/games/hack
|
|
# The game directories need to be sgid too, and let's
|
|
# remove all the zero byte score files in them.
|
|
chown root:games debian/bsdgames/var/games/bsdgames/ \
|
|
debian/bsdgames/var/games/bsdgames/sail \
|
|
debian/bsdgames/var/games/bsdgames/hack \
|
|
debian/bsdgames/var/games/bsdgames/hack/save
|
|
chmod g+rws debian/bsdgames/var/games/bsdgames/ \
|
|
debian/bsdgames/var/games/bsdgames/sail \
|
|
debian/bsdgames/var/games/bsdgames/hack \
|
|
debian/bsdgames/var/games/bsdgames/hack/save
|
|
find debian/bsdgames/var/games/bsdgames -size 0 -exec rm {} \;
|