You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.7 KiB
89 lines
2.7 KiB
#!/usr/bin/make -f
|
|
# Sample debian/rules that uses debhelper.
|
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
#export DH_VERBOSE=1
|
|
|
|
include /usr/share/cdbs/1/rules/debhelper.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[,.]" \
|
|
&& 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
|
|
DEB_CMAKE_EXTRA_FLAGS := \
|
|
-DCMAKE_SKIP_RPATH="OFF" \
|
|
-DCMAKE_VERBOSE_MAKEFILE="ON" \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DSYSCONF_INSTALL_DIR="/etc" \
|
|
-DCMAKE_INSTALL_LIBDIR=$(CMAKE_INSTALL_LIBDIR) \
|
|
-DPCSCLITE_HP_DROPDIR="/usr/lib/pcsc/drivers" \
|
|
-DWITH_LIBHAL="OFF" \
|
|
-DWITH_LIBUSB="ON" \
|
|
-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::
|
|
dh_testdir
|
|
|
|
# Move update-reader.conf files
|
|
install -m 755 debian/update-reader.conf debian/pcscd-nodbus/usr/sbin/
|
|
|
|
# use 50 to start _after_ usbmgr with level 45 (see #146151)
|
|
dh_installinit --update-rcd-params="defaults 50"
|
|
|
|
binary-install/libpcsclite1-nodbus::
|
|
dh_testdir
|
|
|
|
# move runtime libraries to /lib
|
|
mkdir -p debian/libpcsclite1-nodbus/$(CMAKE_INSTALL_LIBDIR)
|
|
mv debian/libpcsclite1-nodbus/usr/$(CMAKE_INSTALL_LIBDIR)/libpcsclite.so.1* \
|
|
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::
|
|
dh_testdir
|
|
|
|
ln -sf /$(CMAKE_INSTALL_LIBDIR)/$$(readlink debian/libpcsclite-nodbus-dev/usr/$(CMAKE_INSTALL_LIBDIR)/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
|