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
|
#! /usr/bin/make -f
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
SET_PKG_CONFIG = PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
GCC = $(DEB_HOST_GNU_TYPE)-gcc
else
GCC = gcc
endif
SYSTEM_LIBDIRS := $(shell for opt in '' $$($${CC-$(GCC)} -print-multi-lib | sed -n -e's/.*;@/-/p'); do \
$(GCC) $$opt -print-search-dirs | sed -n -e's/^libraries: =//p' \
| sed -e's/:/\n/g' | xargs -n1 readlink -f | grep -v 'gcc\|/[0-9.]\+$$'; \
done | LC_ALL=C sort -u | tr '\n' : | sed 's/:$$//')
%:
dh $@ --with=autoreconf
override_dh_auto_configure:
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
$(SET_PKG_CONFIG) dh_auto_configure -- --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info --disable-shared \
--with-pkg-config-dir=/usr/local/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig \
--with-system-libdir=$(SYSTEM_LIBDIRS)
override_dh_auto_install:
dh_auto_install
chmod +x debian/pkg-config-crosswrapper debian/pkgconf-dpkghook
echo $(DEB_HOST_MULTIARCH) > debian/pkgconf/usr/lib/pkgconf.multiarch
override_dh_auto_test:
.PHONY: override_dh_auto_configure override_dh_auto_install
|