1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#!/usr/bin/make -f
# -*- makefile -*-
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
upstreamversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
%:
dh $@
override_dh_auto_build:
echo "release_settings.optimize = 0" >> debian.lua
echo "release_settings.cc.flags:Add(\"$(CFLAGS) $(CPPFLAGS)\")" >> debian.lua
echo "release_settings.link.inputflags = release_settings.link.inputflags .. \" $(LDFLAGS)\"" >> debian.lua
bam -a -v release
override_dh_auto_install:
mv teeworlds_srv teeworlds-server
mkdir debian/icotmp
icotool -x -o debian/icotmp other/icons/Teeworlds.ico
set -e && for size in 16 24 32 48 128 256; do \
mkdir -p debian/teeworlds/usr/share/icons/hicolor/$${size}x$${size}/apps; \
mv debian/icotmp/Teeworlds_*_$${size}x$${size}x32.png \
debian/teeworlds/usr/share/icons/hicolor/$${size}x$${size}/apps/teeworlds.png; \
done
rmdir debian/icotmp
mkdir -p debian/teeworlds/usr/share/pixmaps
convert debian/teeworlds/usr/share/icons/hicolor/32x32/apps/teeworlds.png \
debian/teeworlds/usr/share/pixmaps/teeworlds.xpm
override_dh_auto_clean:
touch debian.lua
-bam -c
find -type f -name '*.o' -exec rm {} \;
rm -rf tmp.* config.bam debian.lua fake_server map_resave map_version crapnet tileset_borderfix
rm -rf teeworlds_srv teeworlds-server dilate versionsrv packetgen mastersrv teeworlds
rm -rf .bam debian/icotmp
rm -f datasrc/*.pyc config.lua
override_dh_fixperms:
dh_fixperms
ifneq (,$(filter teeworlds-data, $(shell dh_listpackages)))
find debian/teeworlds-data -type f -exec chmod 644 {} \;
endif
dfsg-free:
rm -r docs/tool
rm -r other/freetype/include
rm -r other/freetype/lib32
rm -r other/freetype/lib64
rm -r other/sdl/include
rm -r other/sdl/lib32
rm -r other/sdl/lib64
rm -r src/engine/external
rm data/fonts/DejaVuSans.ttf
rm data/fonts/LICENSE
cd ..; mv $(CURDIR) teeworlds-$(upstreamversion); \
tar --exclude debian \
-czf teeworlds_$(upstreamversion).orig.tar.gz \
teeworlds-$(upstreamversion)
|