| 1 |
|
| 2 |
include /usr/share/dpkg/architecture.mk |
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
export CFLAGS_FOR_BUILD = $(shell dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dpkg-buildflags --get CFLAGS) |
| 5 |
export CPPFLAGS_FOR_BUILD = $(shell dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dpkg-buildflags --get CPPFLAGS) |
| 6 |
export LDFLAGS_FOR_BUILD = $(shell dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dpkg-buildflags --get LDFLAGS) |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ |
| 10 |
|
| 11 |
override_dh_auto_configure: |
| 12 |
dh_auto_configure --builddirectory build -- --enable-static |
| 13 |
|
| 14 |
override_dh_auto_build-arch: |
| 15 |
dh_auto_build --builddirectory build |
| 16 |
|
| 17 |
override_dh_auto_install-arch: |
| 18 |
dh_auto_install --builddirectory build |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS= |
| 23 |
|
| 24 |
WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS= |
| 25 |
|
| 26 |
override_dh_auto_build-indep: |
| 27 |
for cpu in i686 x86_64; do \ |
| 28 |
mkdir -p build-$$cpu-w64-mingw32 && \ |
| 29 |
cd build-$$cpu-w64-mingw32 && $(WIN_FLAGS) ../configure \ |
| 30 |
--prefix=/usr/$$cpu-w64-mingw32 \ |
| 31 |
--enable-static \ |
| 32 |
--host $$cpu-w64-mingw32 && \ |
| 33 |
$(WIN_FLAGS) $(MAKE) \ |
| 34 |
|| exit 1 ; \ |
| 35 |
cd .. ; \ |
| 36 |
done |
| 37 |
|
| 38 |
override_dh_auto_install-indep: |
| 39 |
for cpu in i686 x86_64; do \ |
| 40 |
cd build-$$cpu-w64-mingw32 && \ |
| 41 |
$(MAKE) install DESTDIR=$(shell pwd)/debian/tmp \ |
| 42 |
|| exit 1 ; \ |
| 43 |
cd .. ; \ |
| 44 |
done |
| 45 |
|
| 46 |
override_dh_missing: |
| 47 |
dh_missing --list-missing |