sane: cross build support: split udev rules into its own subpkg.

This commit is contained in:
Juan RP 2014-05-09 11:44:12 +02:00
parent 5c7473421b
commit e4ea95cced
2 changed files with 23 additions and 6 deletions

1
srcpkgs/sane-udev-rules Symbolic link
View file

@ -0,0 +1 @@
sane

View file

@ -1,7 +1,7 @@
# Template build file for 'sane'.
pkgname=sane
version=1.0.24
revision=4
revision=5
wrksrc="sane-backends-${version}"
build_style=gnu-configure
configure_args="--disable-locking --enable-avahi --disable-latex --enable-ipv6
@ -10,7 +10,7 @@ hostmakedepends="pkg-config"
makedepends="avahi-libs-devel libjpeg-turbo-devel tiff-devel libgphoto2-devel
v4l-utils-devel libusb-devel net-snmp-devel libieee1284-devel openssl-devel
cups-devel"
depends="net-snmp"
depends="net-snmp sane-udev-rules-${version}_${revision}"
systemd_services="saned.socket on"
conf_files="
/etc/sane.d/abaton.conf
@ -100,16 +100,19 @@ checksum=27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d
post_install() {
# fix hp officejets
echo "#hpaio" >> ${DESTDIR}/etc/sane.d/dll.conf
# install udev files
vinstall tools/udev/libsane.rules 644 usr/lib/udev/rules.d 49-sane.rules
# fix udev rules
sed -i 's|NAME="%k", ||g' ${DESTDIR}/usr/lib/udev/rules.d/49-sane.rules
# 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
vinstall ${wrksrc}/tools/sane-backends.pc 644 usr/lib/pkgconfig
if [ -z "$CROSS_BUILD" ]; then
# install udev files
vinstall tools/udev/libsane.rules 644 usr/lib/udev/rules.d 49-sane.rules
# fix udev rules
sed -i 's|NAME="%k", ||g' ${DESTDIR}/usr/lib/udev/rules.d/49-sane.rules
fi
}
libsane_package() {
@ -119,6 +122,19 @@ libsane_package() {
}
}
if [ -z "$CROSS_BUILD" ]; then
sane-udev-rules_package() {
short_desc+=" - udev rules"
noarch=yes
replaces="sane<1.0.24_5"
pkg_install() {
vmove usr/lib/udev/rules.d
}
}
fi
sane-devel_package() {
depends="libsane>=${version}_${revision}"
short_desc+=" - development files"