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
|
include /usr/share/dpkg/architecture.mk
export AUTOPOINT = true
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CFLAGS_FOR_BUILD = $(shell dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dpkg-buildflags --get CFLAGS)
export LDFLAGS_FOR_BUILD = $(shell dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dpkg-buildflags --get LDFLAGS)
%:
dh $@
override_dh_auto_configure:
touch po/libgpg-error.pot
dh_auto_configure --builddirectory=build -- \
--enable-static \
--disable-rpath \
--infodir=\$${prefix}/share/info \
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_build-arch:
dh_auto_build --builddirectory=build
ifeq ($(DEB_HOST_MULTIARCH),$(DEB_BUILD_MULTIARCH))
tail -vn+0 build/src/lock-obj-pub.native.h
endif
override_dh_auto_install-arch:
dh_auto_install --builddirectory=build
override_dh_installchangelogs:
dh_installchangelogs -A NEWS
override_dh_installdocs:
dh_installdocs -A README
override_dh_link:
dh_link -plibgpg-error-dev lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so.0 usr/lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so
WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os -fdebug-prefix-map=$(shell pwd)=." CPPFLAGS=
override_dh_auto_build-indep:
for cpu in i686 x86_64; do \
mkdir -p build-$$cpu-w64-mingw32 && \
cd build-$$cpu-w64-mingw32 && $(WIN_FLAGS) ../configure \
--prefix=/usr/$$cpu-w64-mingw32 \
--enable-static \
--host $$cpu-w64-mingw32 && \
$(WIN_FLAGS) $(MAKE) \
|| exit 1 ; \
cd .. ; \
done
override_dh_auto_install-indep:
for cpu in i686 x86_64; do \
cd build-$$cpu-w64-mingw32 && \
$(MAKE) install DESTDIR=$(shell pwd)/debian/tmp \
|| exit 1 ; \
cd .. ; \
done
|