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
|
#!/usr/bin/make -f
DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
ifeq (,$(findstring $(DEB_BUILD_ARCH_CPU),"amd64 i386 powerpc"))
export DEB_BUILD_MAINT_OPTIONS=hardening=-fortify
endif
%:
dh $@ --parallel
# We have to clean manually because the Makefile does not support distclean,
# and does not remove compiled higan binary
override_dh_auto_clean:
$(MAKE) clean
$(MAKE) --directory=ananke clean
rm -rf obj out ananke/obj
override_dh_auto_build:
mkdir -p obj out ananke/obj
dh_auto_build -- profile=balanced name=higan-balanced
# Allow for building higan only once when testing stuff with the build option testbuild.
ifeq (,$(findstring testbuild,$(DEB_BUILD_OPTIONS)))
$(MAKE) clean
dh_auto_build -- profile=accuracy name=higan-accuracy
$(MAKE) clean
dh_auto_build -- profile=performance name=higan-performance
else
cp out/higan-balanced out/higan-accuracy
cp out/higan-balanced out/higan-performance
endif
$(MAKE) --directory=ananke
override_dh_auto_install:
install -D -m 644 data/higan.png debian/higan/usr/share/pixmaps/higan.png
install -D -m 644 data/higan.desktop debian/higan/usr/share/applications/higan.desktop
install -D -m 644 data/cheats.bml debian/higan/usr/share/higan/cheats.bml
cp -R profile/* debian/higan/usr/share/higan
chmod 644 debian/higan/usr/share/higan/*/*
mkdir -p debian/higan/usr/share/higan/Video\ Shaders
cp -R shaders/*.shader debian/higan/usr/share/higan/Video\ Shaders
chmod 644 debian/higan/usr/share/higan/Video\ Shaders/*/*
install -D -m 644 ananke/libananke.so debian/higan/usr/lib/higan/libananke.so.1
override_dh_link:
dh_link usr/lib/higan/libananke.so.1 usr/lib/higan/libananke.so
override_dh_auto_test:
override_dh_makeshlibs:
|