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 66 67 68 69 70 71 72 73 74
|
#!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk
# FIXME: Check if cmake can take flags directly from environment
# This would make the dh_auto_configure incantation much simpler
LDFLAGS += -Wl,--as-needed
CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)
export BUILD_DATE = $(shell LC_ALL=C date -u --date="`dpkg-parsechangelog -SDate`" +'%b %e %Y %H:%M:%S')
#CFLAGS += -DBUILD_DATE='$(BUILD_DATE)'
#CXXFLAGS += -DBUILD_DATE='$(BUILD_DATE)'
CFLAGS += -DBUILD_DATE="\"foo\""
CXXFLAGS += -DBUILD_DATE="\"bar\""
%:
dh $@ --buildsystem=cmake --builddirectory=build --with=python2
override_dh_auto_configure:
dh_auto_configure -O--buildsystem=cmake \
-O--builddirectory=build \
-- \
-DCMAKE_COLOR_MAKEFILE:BOOL=0 \
-DCMAKE_C_FLAGS:STRING="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS:STRING="$(CXXFLAGS)" \
-DCMAKE_LINK_FLAGS:STRING="$(LDFLAGS)"
dh_auto_configure -O--buildsystem=cmake \
-O--builddirectory=build-winuae \
-- \
-DENABLE_WINUAE_CPU:BOOL=1 \
-DCMAKE_COLOR_MAKEFILE:BOOL=0 \
-DCMAKE_SKIP_RPATH:BOOL=1 \
-DCMAKE_C_FLAGS:STRING="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS:STRING="$(CXXFLAGS)" \
-DCMAKE_LINK_FLAGS:STRING="$(LDFLAGS)"
#dh_auto_configure -O--buildsystem=cmake \
# -O--builddirectory=build \
# -- \
# -DCMAKE_COLOR_MAKEFILE:BOOL=0
#dh_auto_configure -O--buildsystem=cmake \
# -O--builddirectory=build-winuae \
# -- \
# -DENABLE_WINUAE_CPU:BOOL=1 \
# -DCMAKE_COLOR_MAKEFILE:BOOL=0 \
# -DCMAKE_SKIP_RPATH:BOOL=1
override_dh_auto_build:
dh_auto_build -O--buildsystem=cmake -O--builddirectory=build
dh_auto_build -O--buildsystem=cmake -O--builddirectory=build-winuae
override_dh_install:
dh_install --sourcedir=build
# Install WinUAE version of hatari binary
# Rename file
mv build-winuae/src/hatari build-winuae/src/hatari-winuae
dh_install --sourcedir=build-winuae src/hatari-winuae /usr/bin
# Remove bundled EmuTOS image
#-rm debian/hatari/usr/share/hatari/tos.img
# Install binfmt support for atari binaries
install -m644 -D debian/binfmt debian/hatari/usr/share/binfmts/hatari
override_dh_installman:
dh_installman
dh_installman debian/hatari-winuae.1
override_dh_auto_clean:
dh_auto_clean -O--buildsystem=cmake -O--builddir=build
dh_auto_clean -O--buildsystem=cmake -O--builddirectory=build-winuae
find . -name *.pyc -exec rm -f {} \;
|