#!/usr/bin/make -f #export DH_VERBOSE=1 SEVENZ_ZIP = 7za a -tzip ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) export ZIP = $(SEVENZ_ZIP) -mx=9 else export ZIP = $(SEVENZ_ZIP) -mx=1 endif %: dh $@ override_dh_auto_build: # Builds QuakeC and the huge data.zip archive. # data/Makefile will update the cvar checksums in a bunch of in-tree # files, so we have to back them up BEFORE calling data/Makefile. We # have to restore them before all quilt patches get pop'ed, otherwise # quilt would fail. mkdir -p debian/backup cp data/Makefile \ data/balance.cfg \ data/balance25.cfg \ data/balanceHavoc.cfg \ data/balanceSamual.cfg \ data/defaultNexuiz.cfg \ data/qcsrc/server/constants.qh debian/backup mkdir -p data/sound/player/headhunter touch -d '@$(SOURCE_DATE_EPOCH)' data/sound/player/headhunter mkdir -p data/video touch -d '@$(SOURCE_DATE_EPOCH)' data/video make -C data pk3here mkdir -p tmp/sound cp -r data/sound/cdtracks tmp/sound cd tmp && $(SEVENZ_ZIP) -mx=0 music.pk3 sound # Same thing for the textures cd data && $(ZIP) textures.pk3 textures override_dh_auto_clean: #$(MAKE) -C data clean rm -f build-stamp configure-stamp rm -rf debian/tmp tmp rm -f data/data.pk3 \ data/textures.pk3 rm -f data/qcsrc/menu/fteqcc.log data/qcsrc/server/fteqcc.log \ data/qcsrc/client/fteqcc.log # Restore modified in-tree files (see above) [ ! -e debian/backup ] || \ mv debian/backup/Makefile \ debian/backup/balance.cfg \ debian/backup/balance25.cfg \ debian/backup/balanceHavoc.cfg \ debian/backup/balanceSamual.cfg \ debian/backup/defaultNexuiz.cfg data/ [ ! -e debian/backup ] || \ mv debian/backup/constants.qh data/qcsrc/server/ rm -rf debian/backup