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
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
DH_VERBOSE = 1
UPSTREAM_VERSION=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# reduce debug info to fix FTBFS on archs with few address space
ifneq (,$(filter $(DEB_HOST_ARCH),arm64 armhf mips mipsel ppc64el))
CMAKECXXFLAGS="-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=' -O2 -g1 -DNDEBUG'"
endif
# main packaging script based on dh7 syntax
%:
dh $@ --with pkgkde_symbolshelper
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
$(CMAKECXXFLAGS) \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DSFCGAL_BUILD_TESTS=ON
override_dh_auto_test:
ifneq (,$(filter $(DEB_BUILD_ARCH),i386 alpha hurd-i386 kfreebsd-i386 riscv64 sparc64 x32))
# Skip tests
else ifneq (,$(filter $(DEB_BUILD_ARCH),mips mips64el mipsel))
dh_auto_test || echo "Ignoring test failures"
else
dh_auto_test
endif
override_dh_install:
# removing embedded rpath in binaries
-find $(CURDIR)/debian/tmp/usr/bin -type f -not -name sfcgal-config -exec chrpath --delete {} \;
# removing embedded rpath in libraries
-find $(CURDIR)/debian/tmp/usr/lib -name "*.so*" -type f -exec chrpath --delete {} \;
# Remove .la files
$(RM) $(CURDIR)/debian/tmp/usr/lib/libSFCGAL.la
# Remove test executables
$(RM) $(CURDIR)/debian/tmp/usr/bin/*test*
dh_install
override_dh_installchangelogs:
dh_installchangelogs NEWS
override_dh_makeshlibs:
dh_makeshlibs -- -c0 -v$(UPSTREAM_VERSION)
|