2023-01-04 00:57:53 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
|
|
# Website : https://pozol.eu
|
|
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
|
|
|
|
_name=backends
|
|
|
|
pkgname=sane
|
2023-02-07 13:21:37 +01:00
|
|
|
pkgver=1.2.1
|
2023-02-07 21:00:36 +01:00
|
|
|
pkgrel=02
|
2023-01-04 00:57:53 +01:00
|
|
|
pkgdesc="Scanner Access Now Easy w/o systemd or avahi"
|
|
|
|
arch=(x86_64)
|
|
|
|
url="http://www.sane-project.org/"
|
|
|
|
# NOTE: libgphoto2 can be moved to makedepends once the package also provides
|
|
|
|
# libgphoto2_port.so
|
2023-02-07 21:00:36 +01:00
|
|
|
depends=(bash cairo gcc-libs glibc libpng libieee1284 net-snmp v4l-utils libgphoto2 libgphoto2.so libgphoto2_port.so)
|
2023-02-07 13:21:37 +01:00
|
|
|
makedepends=(autoconf-archive curl glib2 libgphoto2 libjpeg-turbo libtiff libxml2 libusb python texlive-latexextra)
|
2023-01-04 00:57:53 +01:00
|
|
|
provides=(libsane.so)
|
2023-02-07 13:21:37 +01:00
|
|
|
source=(https://gitlab.com/sane-project/$_name/-/archive/$pkgver/$_name-$pkgver.tar.gz
|
|
|
|
66-${pkgname}d.rules
|
|
|
|
$pkgname.sysusers)
|
2023-01-04 00:57:53 +01:00
|
|
|
# From initial build 1.1.1-02
|
|
|
|
# ==> WARNING: Library listed in 'depends' is not required by any files: libgobject-2.0.so
|
|
|
|
# ==> WARNING: Library listed in 'depends' is not required by any files: libpoppler-glib.so
|
|
|
|
#
|
|
|
|
|
|
|
|
prepare() {
|
2023-02-07 13:21:37 +01:00
|
|
|
cd $_name-$pkgver
|
2023-01-04 00:57:53 +01:00
|
|
|
# create version files, so that autotools macros can use them:
|
|
|
|
# https://gitlab.com/sane-project/backends/-/issues/440
|
2023-02-07 13:21:37 +01:00
|
|
|
printf "%s\n" "$pkgver" > .tarball-version
|
|
|
|
printf "%s\n" "$pkgver" > .version
|
2023-01-04 00:57:53 +01:00
|
|
|
autoreconf -fiv
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${_name}-${pkgver}"
|
|
|
|
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--disable-locking \
|
|
|
|
--disable-rpath \
|
|
|
|
--docdir="/usr/share/doc/${pkgname}" \
|
|
|
|
--enable-pthread \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--sbindir=/usr/bin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--without-avahi \
|
2023-02-07 13:21:37 +01:00
|
|
|
--with-libcurl \
|
2023-01-04 00:57:53 +01:00
|
|
|
--with-pic \
|
|
|
|
--without-poppler-glib \
|
|
|
|
--without-systemd \
|
|
|
|
--with-usb
|
|
|
|
# circumvent overlinking in libraries
|
|
|
|
sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' -i libtool
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-02-07 13:21:37 +01:00
|
|
|
depends+=(libgphoto2.so libtiff.so libusb-1.0.so
|
|
|
|
curl libcurl.so )
|
2023-01-04 00:57:53 +01:00
|
|
|
|
2023-02-07 13:21:37 +01:00
|
|
|
cd $_name-$pkgver
|
2023-01-04 00:57:53 +01:00
|
|
|
|
2023-02-07 13:21:37 +01:00
|
|
|
make DESTDIR="$pkgdir" install
|
2023-01-04 00:57:53 +01:00
|
|
|
|
|
|
|
# generate udev udev+hwdb
|
2023-02-07 13:21:37 +01:00
|
|
|
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"
|
2023-01-04 00:57:53 +01:00
|
|
|
# generate udev hwdb
|
2023-02-07 13:21:37 +01:00
|
|
|
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"
|
2023-01-04 00:57:53 +01:00
|
|
|
# NOTE: an empty new line is required between the two .desc collections
|
2023-02-07 13:21:37 +01:00
|
|
|
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"
|
2023-01-04 00:57:53 +01:00
|
|
|
|
|
|
|
# # systemd integration
|
|
|
|
# install -vDm 644 "../${pkgname}d.socket" \
|
|
|
|
# -t "${pkgdir}/usr/lib/systemd/system/"
|
|
|
|
# install -vDm 644 "../${pkgname}d.service" \
|
|
|
|
# "${pkgdir}/usr/lib/systemd/system/${pkgname}d@.service"
|
2023-02-07 13:21:37 +01:00
|
|
|
install -vDm 644 ../66-${pkgname}d.rules "$pkgdir/usr/lib/udev/rules.d/"
|
2023-01-04 00:57:53 +01:00
|
|
|
# sysusers.d
|
2023-02-07 13:21:37 +01:00
|
|
|
install -vDm 644 ../$pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
2023-01-04 00:57:53 +01:00
|
|
|
|
|
|
|
# remove old ChangeLogs
|
2023-02-07 13:21:37 +01:00
|
|
|
rm -rvf "$pkgdir/usr/share/doc/$pkgname/ChangeLogs/"
|
2023-01-04 00:57:53 +01:00
|
|
|
|
|
|
|
# add files below /etc/sane.d to backup array
|
2023-02-07 13:21:37 +01:00
|
|
|
cd "$pkgdir"
|
2023-01-04 00:57:53 +01:00
|
|
|
# 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) )
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#---- license gpg-key sha256sums ----
|
|
|
|
|
|
|
|
license=(GPL2)
|
|
|
|
|
2023-02-07 13:21:37 +01:00
|
|
|
sha256sums=(11be4ef05a61277d18698c2c9d86495dff97557bc8da7af44e3f6ef5154e9ea8 # backends-1.2.1.tar.gz
|
2023-01-04 00:57:53 +01:00
|
|
|
0e98982ff1550b16b098f7563569c203aab5f7b4172717bec0d42eab15fb875b # 66-saned.rules
|
|
|
|
ac9183a0f4379106550c972374b8e36277d8e7f480ca931f0af87550892942e7) # sane.sysusers
|
|
|
|
|
2023-02-07 21:00:36 +01:00
|
|
|
## 95e6dc6a128cbe5f6f505913a1db505ba881039799b4f689f2f89772d80ad095 sane-1.2.1-02-x86_64.pkg.tar.lz
|
|
|
|
|
2023-02-07 13:21:37 +01:00
|
|
|
|