This repository has been archived by the owner on May 20, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgpkg: sane 1.0.32-1: Upgrade to 1.0.32.
Switch to auto-generated upstream tarballs for more predictable links. Remove xinetd integration. Rework systemd service to be based on the separate user/group 'saned'. Add udev rule to grant rw access to USB devices for the 'saned' group (using ACLs). Generate required version files to be used by autotools macros. Run autoreconf in prepare(). Switch to current and explicit use of options in the configure call. Enable locking of devices for simultaneous access. Add libsystemd.so and libtiff.so to depends in package(). Replace the use of plain udev rules by udev+hwdb integration (per upstream suggestion). Remove explicit installation of pkgconfig integration (make install does that). Remove unexplained fix for HP OfficeJets. Populate backup array in package() via find call to not be required to manually add an increasing amount of configuration files to the backup array. https://bugs.archlinux.org/task/68062 https://bugs.archlinux.org/task/57391 https://bugs.archlinux.org/task/68529 git-svn-id: file:///srv/repos/svn-packages/svn@408205 eb2447ed-0c53-47e4-bac8-5bc4a241df78
- Loading branch information
Showing
5 changed files
with
95 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,103 @@ | ||
# Maintainer: Tobias Powalowski <tpowa@archlinux.org> | ||
# Contributor: David Runge <dvzrv@archlinux.org> | ||
# Maintainer: David Runge <dvzrv@archlinux.org> | ||
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca> | ||
# Contributor: Simo L. <neotuli@yahoo.com> | ||
# Contributor: eric <eric@archlinux.org> | ||
|
||
_name=backends | ||
pkgname=sane | ||
pkgver=1.0.31 | ||
pkgrel=3 | ||
_commit=8bf1cae2e1803aefab9e5331550e5d5d | ||
pkgver=1.0.32 | ||
pkgrel=1 | ||
pkgdesc="Scanner Access Now Easy" | ||
url="http://www.sane-project.org/" | ||
arch=('x86_64') | ||
license=('GPL2') | ||
# NOTE: libgphoto2 can be moved to makedepends once the package also provides | ||
# libgphoto2_port.so | ||
depends=('bash' 'cairo' 'gcc-libs' 'glibc' 'libgphoto2' 'libjpeg-turbo' 'libnl' | ||
'libpng' 'libtiff' 'libxml2' 'libieee1284' 'net-snmp' 'openssl' 'v4l-utils') | ||
makedepends=('avahi' 'curl' 'glib2' 'libusb' 'poppler-glib' 'texlive-latexextra') | ||
depends=('bash' 'cairo' 'gcc-libs' 'glibc' 'libgphoto2' 'libnl' | ||
'libpng' 'libxml2' 'libieee1284' 'net-snmp' 'openssl' 'v4l-utils') | ||
makedepends=('autoconf-archive' 'avahi' 'curl' 'glib2' 'libjpeg-turbo' | ||
'libtiff' 'libusb' 'poppler-glib' 'python' 'systemd' 'texlive-latexextra') | ||
provides=('libsane.so') | ||
backup=(etc/sane.d/{abaton.conf,agfafocus.conf,apple.conf,artec.conf,artec_eplus48u.conf,avision.conf,bh.conf,canon.conf,canon630u.conf,canon_dr.conf,canon_pp.conf,cardscan.conf,coolscan2.conf,coolscan3.conf,coolscan.conf,dc25.conf,dc210.conf,dc240.conf,dell1600n_net.conf,dll.conf,dmc.conf,epjitsu.conf,epson.conf,epson2.conf,epsonds.conf,fujitsu.conf,genesys.conf,gphoto2.conf,gt68xx.conf,hp.conf,hp3900.conf,hp4200.conf,hp5400.conf,hpsj5s.conf,hs2p.conf,ibm.conf,kodak.conf,kodakaio.conf,leo.conf,lexmark.conf,ma1509.conf,magicolor.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,nec.conf,net.conf,p5.conf,pie.conf,pieusb.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,saned.conf,sceptre.conf,sharp.conf,sm3840.conf,snapscan.conf,sp15c.conf,st400.conf,stv680.conf,tamarack.conf,teco1.conf,teco2.conf,teco3.conf,test.conf,u12.conf,umax.conf,umax1220u.conf,umax_pp.conf,xerox_mfp.conf,v4l.conf} etc/xinetd.d/sane) | ||
source=(https://gitlab.com/sane-project/backends/uploads/$_commit/sane-backends-$pkgver.tar.gz | ||
'sane.xinetd' | ||
'saned.socket' | ||
'saned.service') | ||
sha512sums=('5d49ca698af38a30a3d23349f2fe82a4a21262b014ca38407d5ea0b3fe7cec72860a39c8651c8a5e2f561a9a740008658a36ed6bd96324be84646dbcf1461bfb' | ||
'8f9f18d432087e5445aa533be375a811daf320512069c108d41a79121868937e1a7ffa21ee7d33adcf9fbb670bca460ff06423ce39602f35151eccc243d9d4ec' | ||
'62654a59fae3216be9c0ae4f810375de1232133ab12732529a3e064cc83d94563560e01950dea4b25aa298294c5f0421436c5e095a3a00ad8ef78b471f3105f4' | ||
'c4cd4427ee8e5cb128c5d54006fafbb4f846508582dffc293f16ab14ab638e6ee3dc5df0eb06f6d0d3839941ab74623c7163ac13bcdfec87b10308587a697536') | ||
b2sums=('fc36311e4f293c29f0f64ec4090356f54a2823b1886707410bdaf03113a04c3ae1cfcc350796fc707a894be66dd97305b2f539d7066840d860bb29ccc514995d' | ||
'158952a09d5b29ae848a4c1377de6ff824b61c7d1932d29f3a0d313bafdaa0c5973614c5b744f53c7d2d4acff3dd4dc8b821068b95ae07a081539fd5cabd7477' | ||
'779406b17a77d209ba797b20c39f18fccc6a75c45a97db46e717a68f1998e37d90ac1b3b79d61030e880c09cf4dcc9003c7ed81ab3e96f5fd61756ca251f3ccf' | ||
'bedaa660608161734f82c317befde341f36502cf0cfd4ea7987cf5793f3630f80f160fc7adaf474d35679c7e2cebe86fe928c71297dce929e3ea94a9b6a85ba9') | ||
source=("https://gitlab.com/sane-project/${_name}/-/archive/${pkgver}/${_name}-${pkgver}.tar.gz" | ||
"66-${pkgname}d.rules" | ||
"${pkgname}.sysusers" | ||
"${pkgname}d.socket" | ||
"${pkgname}d@.service" | ||
) | ||
sha512sums=('a0f6b185704af2a34f67587ef79af3fd5f54dbe540a08a8db4cebd502d08217d07a5a19a855020a772509b6679f53cb028108e62c3aff4847f8a816e7ba16b6c' | ||
'd0d1b6bd6fbb04d610e7186e26d04c2233a620cc7c731ca3acd7fb860dd033fbe99d8974ffa1dd59c8affcc4aa2664d76ab3dfd6f7b2a734b31d7e3832359c41' | ||
'd8cd194b57eff2249df2b8d540a892e518aa3e3bba6387211ed21230dc235e98c49b71f262f0b1007e8c859c59776410840376244e0aec1f06363881b2c81fd8' | ||
'a23ceeeb02bd9e214702003a3165886858ecbdd93df89cd37ad5f00581745454548ccda0ab656f2dc0acbf2896a8781568c786797e64a07014be003d6140a093' | ||
'baf2cf2fdff689f776973ac4f69ea02b131f2a1a754a8d52a8e8ad33b0e559ba286649a891723a7ad94b2bcb01ec88155d43c36eaeb35e47fbc8ea80c49c5d47') | ||
b2sums=('e2e0c617a2e9ec45f5dd3aa8e393b54a52ecb6543ac0e7057a9b4306493fe578de006bf0d8fa128f4d1925cfb6524eb56d15565baaf41045b3b32d5af2cd8dfa' | ||
'c9c6ba224b9b27f4ecc6b1ded6621a8abb52b1ded2d9078e4cad31177290b788e286fad74545a5cb09e1f6726515adc22003988eb646dc986e87f1a8061a0e27' | ||
'2a4ddc9849562e3a0adcaec1859391e3f37a63f25c27dbc140cabd697bd65b89a0fc812c4516cbdfb36d1f30844df34934b3c1c59650101f54fc1ac0acb3f5d9' | ||
'5e9f0350a1553fc75aea88ce355fb68b881e3b2194ac0e3c6f3cecdae79111fb1db1cfe3b4933eca15af5f985fc6b89e4d9af3844b6e9cfd542828b6b9e57ed9' | ||
'272b4860dbd3f2b69eedfed4532cf8a388629c003c9a0e0ee98defbc2023e07edc26275a17f56ea9fd4d90e9b3b6532c5b10d1e2b91e6ab4df242ac44101d802') | ||
|
||
prepare() { | ||
cd "${_name}-${pkgver}" | ||
# create version files, so that autotools macros can use them: | ||
# https://gitlab.com/sane-project/backends/-/issues/440 | ||
echo "${pkgver}" > .tarball-version | ||
echo "${pkgver}" > .version | ||
autoreconf -fiv | ||
} | ||
|
||
build() { | ||
cd sane-backends-${pkgver} | ||
cd "${_name}-${pkgver}" | ||
|
||
./configure --prefix=/usr --sbindir=/usr/bin \ | ||
--sysconfdir=/etc \ | ||
--localstatedir=/var \ | ||
--with-docdir=/usr/share/doc/sane \ | ||
--enable-avahi \ | ||
--enable-pthread \ | ||
./configure --prefix=/usr \ | ||
--disable-rpath \ | ||
--enable-libusb_1_0 \ | ||
--disable-locking | ||
--docdir="/usr/share/doc/${pkgname}" \ | ||
--enable-locking \ | ||
--enable-pthread \ | ||
--enable-pnm-backend \ | ||
--localstatedir=/var \ | ||
--sbindir=/usr/bin \ | ||
--sysconfdir=/etc \ | ||
--with-avahi \ | ||
--with-libcurl \ | ||
--with-pic \ | ||
--with-poppler-glib \ | ||
--with-systemd \ | ||
--with-usb | ||
make | ||
} | ||
|
||
package() { | ||
depends+=('libavahi-client.so' 'libavahi-common.so' 'libcurl.so' | ||
'libgphoto2.so' 'libglib-2.0.so' 'libgobject-2.0.so' 'libpoppler-glib.so' | ||
'libusb-1.0.so') | ||
cd sane-backends-${pkgver} | ||
'libsystemd.so' 'libtiff.so' 'libusb-1.0.so') | ||
|
||
cd "${_name}-${pkgver}" | ||
|
||
make DESTDIR="${pkgdir}" install | ||
# fix hp officejets | ||
echo "#hpaio" >> "${pkgdir}/etc/sane.d/dll.conf" | ||
# install udev files | ||
install -D -m0644 tools/udev/libsane.rules \ | ||
"${pkgdir}/usr/lib/udev/rules.d/49-sane.rules" | ||
# fix udev rules | ||
sed -i 's|NAME="%k", ||g' "${pkgdir}/usr/lib/udev/rules.d/49-sane.rules" | ||
|
||
# install xinetd file | ||
install -D -m644 "${srcdir}/sane.xinetd" "${pkgdir}/etc/xinetd.d/sane" | ||
# generate udev udev+hwdb | ||
install -vdm 755 "${pkgdir}/usr/lib/udev/rules.d/" | ||
tools/sane-desc -m udev+hwdb -s doc/descriptions/ > "${pkgdir}/usr/lib/udev/rules.d/65-${pkgname}.rules" | ||
tools/sane-desc -m udev+hwdb -s doc/descriptions-external/ >> "${pkgdir}/usr/lib/udev/rules.d/65-${pkgname}.rules" | ||
# generate udev hwdb | ||
install -vdm 755 "${pkgdir}/usr/lib/udev/hwdb.d/" | ||
tools/sane-desc -m hwdb -s doc/descriptions/ > "${pkgdir}/usr/lib/udev/hwdb.d/20-${pkgname}.hwdb" | ||
# NOTE: an empty new line is required between the two .desc collections | ||
printf "\n" >> "${pkgdir}/usr/lib/udev/hwdb.d/20-${pkgname}.hwdb" | ||
tools/sane-desc -m hwdb -s doc/descriptions-external/ >> "${pkgdir}/usr/lib/udev/hwdb.d/20-${pkgname}.hwdb" | ||
|
||
# systemd integration | ||
install -vDm 644 "../${pkgname}d.socket" \ | ||
-t "${pkgdir}/usr/lib/systemd/system/" | ||
install -vDm 644 "../${pkgname}d@.service" \ | ||
-t "${pkgdir}/usr/lib/systemd/system/" | ||
install -vDm 644 "../66-${pkgname}d.rules" "${pkgdir}/usr/lib/udev/rules.d/" | ||
# sysusers.d | ||
install -vDm 644 "../${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" | ||
|
||
# Install the pkg-config file | ||
install -D -m644 tools/sane-backends.pc \ | ||
"${pkgdir}/usr/lib/pkgconfig/sane-backends.pc" | ||
# install systemd files | ||
install -D -m644 ${srcdir}/saned.socket \ | ||
"${pkgdir}/usr/lib/systemd/system/saned.socket" | ||
install -D -m644 ${srcdir}/saned.service \ | ||
"${pkgdir}/usr/lib/systemd/system/saned@.service" | ||
# add files below /etc/sane.d to backup array | ||
cd "${pkgdir}" | ||
# trick extract_function_variable() in makepkg into not detecting the | ||
# backup array modification and adding remaining configuration files | ||
[[ /usr/bin/true ]] && backup=( ${backup[@]} $(find "etc/${pkgname}.d/" -type f) ) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=Scanner Service | ||
Requires=saned.socket | ||
|
||
[Service] | ||
User=saned | ||
Group=saned | ||
ExecStart=/usr/bin/saned | ||
StandardInput=null | ||
StandardOutput=journal | ||
StandardError=journal | ||
Environment=SANE_CONFIG_DIR=/etc/sane.d | ||
# If you need to debug your configuration uncomment the next line and | ||
# change it as appropriate to set the desired debug options | ||
# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_NET=255 | ||
|
||
[Install] | ||
Also=saned.socket |