From 41b3f8f7f76004262e89fe8b5481cfcf512e403d Mon Sep 17 00:00:00 2001 From: amak Date: Thu, 8 Jul 2021 18:42:06 +1000 Subject: [PATCH] sane: update to 1.0.32, add libcurl for escl backend, add runit service Avahi support is now optional. The escl backend is only available if Avahi is enabled. When SANE is built with Avahi support, saned will spawn a child process that is related to Avahi functionality. This process can't be stopped by sv and will remain after the main saned process is terminated. Reported upstream: https://gitlab.com/sane-project/backends/-/issues/499 --- srcpkgs/sane/files/saned/run | 3 +++ srcpkgs/sane/template | 28 ++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/sane/files/saned/run diff --git a/srcpkgs/sane/files/saned/run b/srcpkgs/sane/files/saned/run new file mode 100644 index 000000000000..18016ad066c4 --- /dev/null +++ b/srcpkgs/sane/files/saned/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec saned -l -u _saned ${OPTS} diff --git a/srcpkgs/sane/template b/srcpkgs/sane/template index 35dac1cc846a..11f1929d26d6 100644 --- a/srcpkgs/sane/template +++ b/srcpkgs/sane/template @@ -1,28 +1,38 @@ # Template file for 'sane' pkgname=sane -_gitlab_release_hash=8bf1cae2e1803aefab9e5331550e5d5d -version=1.0.31 -revision=3 +_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" -makedepends="avahi-libs-devel libjpeg-turbo-devel tiff-devel libgphoto2-devel - v4l-utils-devel libusb-devel openssl-devel libxml2-devel - $(vopt_if snmp net-snmp-devel)" +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 " license="GPL-2.0-or-later, 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=4a3b10fcb398ed854777d979498645edfe66fcac2f2fd2b9117a79ff45e2a5aa +checksum=3a28c237c0a72767086202379f6dc92dbb63ec08dfbab22312cba80e238bb114 noshlibprovides="avoid false detection of device drivers" -build_options="snmp" +# 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" + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" python3" +fi post_build() { # generate udev file @@ -40,6 +50,8 @@ post_install() { vlicense LICENSE # License clarification vlicense COPYING # GPL-2.0 sed -n "1,43 p" "${wrksrc}/backend/dll.c" > "${DESTDIR}/usr/share/licenses/sane/SANE-EXCEPTION" + + vsv saned } libsane_package() {