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
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDTOOLS = 1
include /usr/share/dpkg/buildtools.mk
MAJOR := $(shell grep -Po '\bVER_MAJOR := \K\d+' Makefile)
LIB = librem
LDFLAGS += -Wl,-soname,$(LIB).so.$(MAJOR)
# LIBDIR for installation
LIBDIR=/usr/lib/
override_dh_auto_build:
dh_auto_build -- info all \
RELEASE=1 \
HAVE_LIBPTHREAD=1 \
HAVE_ARMV6=$(filter armhf ,$(DEB_HOST_ARCH)) \
USE_OPENSSL=1 \
USE_ZLIB=1 \
EXTRA_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
EXTRA_LFLAGS="$(LDFLAGS)" \
LIB_SUFFIX=.so.$(MAJOR)
override_dh_auto_test:
override_dh_auto_install:
dh_auto_install -- \
LIBDIR=$(LIBDIR) \
LIB_SUFFIX=.so.$(MAJOR)
cd debian/tmp/$(LIBDIR) && ln -s -f $(LIB).so.$(MAJOR) $(LIB).so
sed -i "s,libdir=\$${prefix}/lib,libdir=\$${prefix}/lib/$(DEB_TARGET_MULTIARCH)," debian/tmp/$(LIBDIR)/pkgconfig/$(LIB).pc
execute_after_dh_install:
d-shlibmove --commit \
--devunversioned \
--exclude-la \
--multiarch \
--override s/$(LIB)$(MAJOR)-dev/$(LIB)-dev/ \
--movedev "debian/tmp/usr/include/*" usr/include/ \
--movedev "debian/tmp/usr/lib//pkgconfig/$(LIB).pc" usr/lib/$(DEB_TARGET_MULTIARCH)/pkgconfig \
debian/tmp/usr/lib/$(LIB).so
override_dh_auto_clean:
dh_auto_clean -- LIB_SUFFIX=.so.$(MAJOR)
%:
dh $@ --with pkgkde_symbolshelper
|