DEB pcsc-lite-nodbus: Update build rules

+ Switch Build-Depends from cmake to cmake-trinity
+ Install libraries according to multi-arch rules
+ Switch to build using ninja-build

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/3/head
Slávek Banko 4 years ago
parent fdb1c715a1
commit 13f024c978
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -3,7 +3,7 @@ Section: deps-r14/misc
Priority: extra Priority: extra
Maintainer: Timothy Pearson <kb9vqf@pearsoncomputing.net> Maintainer: Timothy Pearson <kb9vqf@pearsoncomputing.net>
XSBC-Original-Maintainer: Ludovic Rousseau <rousseau@debian.org> XSBC-Original-Maintainer: Ludovic Rousseau <rousseau@debian.org>
Build-Depends: debhelper (>= 9~), cdbs, cmake, pkg-config, flex, libusb-dev Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake-trinity, ninja-build, pkg-config, flex, libusb-dev
Standards-Version: 3.8.2 Standards-Version: 3.8.2
Package: pcscd-nodbus Package: pcscd-nodbus

@ -1,5 +1,5 @@
debian/tmp/usr/include/PCSC/* debian/tmp/usr/include/PCSC/*
debian/tmp/usr/lib/libpcsclite.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libpcsclite.a
debian/tmp/usr/lib/libpcsclite.la debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libpcsclite.la
debian/tmp/usr/lib/libpcsclite.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libpcsclite.so
debian/tmp/usr/lib/pkgconfig/libpcsclite.pc debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/libpcsclite.pc

@ -1 +1 @@
debian/tmp/usr/lib/libpcsclite.so.1* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libpcsclite.so.1*

File diff suppressed because it is too large Load Diff

@ -8,8 +8,28 @@
include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk include /usr/share/cdbs/1/class/cmake.mk
# The default gzip compressor has been changed in dpkg >= 1.17.0.
deb_default_compress = $(shell LANG=C dpkg-deb --version | head -n1 | \
sed -e "s|.*version ||" -e "s| .*||" | \
xargs -r dpkg --compare-versions 1.17.0 lt \
&& echo xz || echo gzip)
ifeq ($(deb_default_compress),gzip)
DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2) && echo xz || echo bzip2)
endif
ifneq "$(wildcard /usr/bin/ninja)" ""
MAKE = ninja -v
DEB_MAKE_ENVVARS += DESTDIR=$(DEB_DESTDIR)
DEB_MAKE_INSTALL_TARGET = install
DEB_CMAKE_NORMAL_ARGS += -GNinja
endif
ifdef DEB_HOST_MULTIARCH
CMAKE_INSTALL_LIBDIR = lib/$(DEB_HOST_MULTIARCH)
else
CMAKE_INSTALL_LIBDIR = lib
endif
# Build options # Build options
DEB_CMAKE_EXTRA_FLAGS := \ DEB_CMAKE_EXTRA_FLAGS := \
@ -17,11 +37,23 @@ DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSYSCONF_INSTALL_DIR="/etc" \ -DSYSCONF_INSTALL_DIR="/etc" \
-DCMAKE_INSTALL_LIBDIR=$(CMAKE_INSTALL_LIBDIR) \
-DPCSCLITE_HP_DROPDIR="/usr/lib/pcsc/drivers" \ -DPCSCLITE_HP_DROPDIR="/usr/lib/pcsc/drivers" \
-DWITH_LIBHAL="OFF" \ -DWITH_LIBHAL="OFF" \
-DWITH_LIBUSB="ON" \ -DWITH_LIBUSB="ON" \
-DWITH_SCF="OFF" -DWITH_SCF="OFF"
common-binary-arch::
# update multi-arch path in install files
ls -d debian/* | \
grep -E "(install|links)$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.arch ] || \
! grep -q "\$$(DEB_HOST_MULTIARCH)" $$a || \
sed -i.arch "s|\$$(DEB_HOST_MULTIARCH)|$(DEB_HOST_MULTIARCH)|g" $$a; \
done
binary-install/pcscd-nodbus:: binary-install/pcscd-nodbus::
dh_testdir dh_testdir
@ -35,13 +67,22 @@ binary-install/libpcsclite1-nodbus::
dh_testdir dh_testdir
# move runtime libraries to /lib # move runtime libraries to /lib
mv debian/libpcsclite1-nodbus/usr/lib/libpcsclite.so.1* \ mkdir -p debian/libpcsclite1-nodbus/$(CMAKE_INSTALL_LIBDIR)
debian/libpcsclite1-nodbus/lib/ mv debian/libpcsclite1-nodbus/usr/$(CMAKE_INSTALL_LIBDIR)/libpcsclite.so.1* \
rmdir -p --ignore-fail-on-non-empty debian/libpcsclite1-nodbus/usr/lib debian/libpcsclite1-nodbus/$(CMAKE_INSTALL_LIBDIR)
rmdir -p --ignore-fail-on-non-empty debian/libpcsclite1-nodbus/usr/$(CMAKE_INSTALL_LIBDIR)
binary-install/libpcsclite-nodbus-dev:: binary-install/libpcsclite-nodbus-dev::
dh_testdir dh_testdir
ln -sf /lib/$$(readlink debian/libpcsclite-nodbus-dev/usr/lib/libpcsclite.so) \ ln -sf /$(CMAKE_INSTALL_LIBDIR)/$$(readlink debian/libpcsclite-nodbus-dev/usr/$(CMAKE_INSTALL_LIBDIR)/libpcsclite.so) \
debian/libpcsclite-nodbus-dev/usr/lib/libpcsclite.so debian/libpcsclite-nodbus-dev/usr/$(CMAKE_INSTALL_LIBDIR)/libpcsclite.so
clean::
# revert multi-arch path in install files
ls -d debian/* | \
grep -E "(install|links)$$" | \
while read a; do \
[ ! -f $$a.arch ] || \
mv $$a.arch $$a; \
done

Loading…
Cancel
Save