| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 4 |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 5 |
DEB_BUILD_ARCH ?=$(shell dpkg --print-architecture) |
| 6 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 7 |
|
| 8 |
LDFLAGS += -pthread |
| 9 |
|
| 10 |
%: |
| 11 |
dh $@ --with pkgkde_symbolshelper,autoreconf |
| 12 |
|
| 13 |
COMMON_CONFIG = $(CONFIG_OPTS) \ |
| 14 |
--enable-cplusplus \ |
| 15 |
--enable-docs \ |
| 16 |
--disable-dependency-tracking \ |
| 17 |
--with-tags=CXX \ |
| 18 |
--prefix=/usr \ |
| 19 |
--mandir=\$${prefix}/share/man \ |
| 20 |
--sysconfdir=/etc \ |
| 21 |
--localstatedir=/var/lib \ |
| 22 |
--datadir=\$${prefix}/share/doc \ |
| 23 |
--host=$(DEB_HOST_GNU_TYPE) \ |
| 24 |
--build=$(DEB_BUILD_GNU_TYPE) \ |
| 25 |
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ |
| 26 |
--with-libatomic-ops=none |
| 27 |
|
| 28 |
# --enable-static also disables building with symbol-visibility |
| 29 |
# attributes, so build the static and dynamic libraries separately to |
| 30 |
# ensure the .so symbols are correctly exported. |
| 31 |
override_dh_auto_configure: |
| 32 |
[ ! -d libatomic_ops-1.2 ] || mv libatomic_ops-1.2 libatomic_ops-1.2.bak |
| 33 |
mkdir build-dynamic |
| 34 |
cd build-dynamic; ../configure \ |
| 35 |
$(COMMON_CONFIG) \ |
| 36 |
--enable-shared \ |
| 37 |
--disable-static |
| 38 |
mkdir build-static |
| 39 |
cd build-static; ../configure \ |
| 40 |
$(COMMON_CONFIG) \ |
| 41 |
--enable-static \ |
| 42 |
--disable-shared |
| 43 |
|
| 44 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 45 |
override_dh_auto_test: |
| 46 |
cd build-dynamic; $(MAKE) check |
| 47 |
endif |
| 48 |
|
| 49 |
override_dh_auto_build: |
| 50 |
dh_auto_build -B build-dynamic |
| 51 |
dh_auto_build -B build-static |
| 52 |
|
| 53 |
override_dh_auto_install: |
| 54 |
dh_auto_install -B build-dynamic |
| 55 |
dh_auto_install -B build-static |
| 56 |
|
| 57 |
override_dh_install: |
| 58 |
install -D doc/gc.man debian/tmp/usr/share/man/man3/gc_malloc.3 |
| 59 |
dh_install |
| 60 |
rm debian/libgc-dev/usr/share/doc/libgc1/README.environment |
| 61 |
|
| 62 |
override_dh_auto_clean: |
| 63 |
dh_auto_clean |
| 64 |
rm -rf autom4te.cache build-static build-dynamic |
| 65 |
|
| 66 |
override_dh_installchangelogs: |
| 67 |
dh_installchangelogs ChangeLog |