78 lines
2.4 KiB
Bash
78 lines
2.4 KiB
Bash
# Template file for 'sane'
|
|
pkgname=sane
|
|
_gitlab_release_hash=104f09c07d35519cc8e72e604f11643f
|
|
version=1.0.32
|
|
revision=1
|
|
wrksrc="sane-backends-${version}"
|
|
build_style=gnu-configure
|
|
configure_args="--disable-locking --enable-ipv6 --enable-pthread
|
|
--with-usb --docdir=/usr/share/doc/sane ac_cv_func_mmap_fixed_mapped=yes
|
|
$(vopt_with snmp)"
|
|
hostmakedepends="pkg-config python3"
|
|
makedepends="libjpeg-turbo-devel tiff-devel libgphoto2-devel v4l-utils-devel
|
|
libusb-devel openssl-devel libxml2-devel $(vopt_if snmp net-snmp-devel)
|
|
$(vopt_if avahi 'avahi-libs-devel libcurl-devel')"
|
|
depends="$(vopt_if snmp net-snmp)"
|
|
conf_files="/etc/sane.d/*.conf"
|
|
short_desc="Scanner Access Now Easy"
|
|
maintainer="Piraty <piraty1@inbox.ru>"
|
|
license="custom:GPL-2.0-or-later-with-SANE-exception"
|
|
homepage="http://www.sane-project.org/"
|
|
changelog="https://gitlab.com/sane-project/backends/-/raw/master/NEWS"
|
|
distfiles="https://gitlab.com/sane-project/backends/uploads/${_gitlab_release_hash}/sane-backends-${version}.tar.gz"
|
|
checksum=3a28c237c0a72767086202379f6dc92dbb63ec08dfbab22312cba80e238bb114
|
|
noshlibprovides="avoid false detection of device drivers"
|
|
|
|
# additional group 'lp' is required by saned to access some all-in-one devices
|
|
system_accounts="_saned"
|
|
_saned_groups="lp,scanner"
|
|
|
|
build_options="avahi snmp"
|
|
build_options_default="avahi"
|
|
|
|
# tests broken on 32bit. https://gitlab.com/sane-project/backends/-/issues/157
|
|
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
|
|
make_check=no
|
|
fi
|
|
|
|
post_build() {
|
|
# generate udev file
|
|
cd tools
|
|
mkdir -p udev
|
|
make udev/libsane.rules
|
|
}
|
|
|
|
post_install() {
|
|
vinstall ${FILESDIR}/saned.xinetd 644 etc/xinetd.d saned.conf
|
|
vinstall ${wrksrc}/tools/sane-backends.pc 644 usr/lib/pkgconfig
|
|
|
|
vinstall tools/udev/libsane.rules 644 usr/lib/udev/rules.d 49-sane.rules
|
|
|
|
vlicense LICENSE # License clarification
|
|
vlicense COPYING # GPL-2.0
|
|
sed -n \
|
|
-e "/\/* sane - Scanner Access Now Easy./,/dynamic linking to load backends on demand./p" \
|
|
"${wrksrc}/backend/dll.c" > "${DESTDIR}/usr/share/licenses/sane/SANE-EXCEPTION"
|
|
|
|
vsv saned
|
|
}
|
|
|
|
libsane_package() {
|
|
short_desc+=" - runtime shared library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libsane.so.*"
|
|
}
|
|
}
|
|
|
|
sane-devel_package() {
|
|
depends="libsane>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/bin/sane-config
|
|
vmove usr/share/man/man1/sane-config.1
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|