sane: added systemd build option.

This commit is contained in:
Juan RP 2014-08-20 12:28:02 +02:00
parent cd1ff0c6ce
commit 0d8e19e6df

View file

@ -1,7 +1,7 @@
# Template build file for 'sane'.
pkgname=sane
version=1.0.24
revision=6
revision=7
wrksrc="sane-backends-${version}"
build_style=gnu-configure
configure_args="--disable-locking --enable-avahi --disable-latex --enable-ipv6
@ -10,7 +10,6 @@ hostmakedepends="pkg-config"
makedepends="avahi-libs-devel libjpeg-turbo-devel tiff-devel libgphoto2-devel
v4l-utils-devel libusb-devel net-snmp-devel libieee1284-devel libressl-devel cups-devel"
depends="net-snmp sane-udev-rules"
systemd_services="saned.socket on"
conf_files="
/etc/sane.d/abaton.conf
/etc/sane.d/agfafocus.conf
@ -96,14 +95,21 @@ license="GPL-2"
distfiles="http://ftp.lfs-matrix.net/pub/blfs/conglomeration/sane-backends/sane-backends-${version}.tar.gz"
checksum=27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d
build_options="systemd"
if [ "$build_option_systemd" ]; then
systemd_services="saned.socket on"
fi
post_install() {
# fix hp officejets
echo "#hpaio" >> ${DESTDIR}/etc/sane.d/dll.conf
# Install systemd service.
vinstall ${FILESDIR}/saned@.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/saned.socket 644 usr/lib/systemd/system
vinstall ${FILESDIR}/saned.xinetd 644 etc/xinetd.d saned.conf
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/saned@.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/saned.socket 644 usr/lib/systemd/system
fi
vinstall ${FILESDIR}/saned.xinetd 644 etc/xinetd.d saned.conf
vinstall ${wrksrc}/tools/sane-backends.pc 644 usr/lib/pkgconfig
if [ -z "$CROSS_BUILD" ]; then