| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
include /usr/share/dpkg/buildflags.mk |
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
export DATA = -DSTRATAGUS_LIB_PATH=\"/usr/share/games/boswars\" |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ |
| 10 |
|
| 11 |
# https://codeberg.org/boswars/boswars/wiki/PackagingTips |
| 12 |
override_dh_auto_build-arch: |
| 13 |
# https://codeberg.org/boswars/boswars/commit/5cb645f8c55b536f0027314aac9216a200315708 |
| 14 |
sed -i '/os.stat_float_times/d' fabricate.py |
| 15 |
./make.py cflags="$(CPPFLAGS) $(CFLAGS) $(DATA)" ldflags="$(LDFLAGS)" |
| 16 |
|
| 17 |
execute_after_dh_install-arch: |
| 18 |
# Copy (and rename) an icon to be used as desktop file |
| 19 |
mkdir -p debian/boswars/usr/share/pixmaps/ |
| 20 |
cp units/tank/ico_tank.png debian/boswars/usr/share/pixmaps/boswars.png |
| 21 |
rm -f debian/boswars/usr/share/doc/boswars/html/README-SDL.txt |
| 22 |
rm -f debian/boswars/usr/share/doc/boswars/html/*copyright* |
| 23 |
rm -f debian/boswars/usr/share/doc/boswars/html/gpl3.txt |
| 24 |
|
| 25 |
execute_after_dh_install-indep: |
| 26 |
# https://codeberg.org/boswars/boswars/commit/4586e5a8bd120ab1168100e459e6991420c9e24b |
| 27 |
iconv -f ISO-8859-1 -t UTF-8 units/corpses/unit-corpses.lua -o debian/boswars-data/usr/share/games/boswars/units/corpses/unit-corpses.lua |
| 28 |
iconv -f ISO-8859-1 -t UTF-8 units/gturret/unit-gturret.lua -o debian/boswars-data/usr/share/games/boswars/units/gturret/unit-gturret.lua |