54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=zbar
|
|
pkgver=0.23.90
|
|
_debver=$pkgver
|
|
_debrel=1
|
|
pkgrel=3
|
|
pkgdesc="Library for reading bar codes from various sources"
|
|
arch=('i686' 'x86_64')
|
|
url='https://github.com/mchehab/zbar'
|
|
license=('LGPL-2.1')
|
|
depends=('graphicsmagick' 'libsm' 'libxv' 'v4l-utils')
|
|
makedepends=('xmlto' 'docbook-xsl' 'quilt')
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/mchehab/zbar/archive/$pkgver.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/z/zbar/zbar_$_debver-$_debrel+deb11u1.debian.tar.xz")
|
|
sha512sums=('d73d71873bec68ee021997512a9edbd223f5f5fe43c66c4dd3502224ba6009be2e5e1714766cb8e1056244673e87e0939ed0319116f61d7371b5ab79fb5e04eb'
|
|
'6f9426efe5c3c796bc4865a10c738e00b881d86c5f1cb66e82f2ef09716000f65099637661a574a882aa9889eec40585a3256c841a95ec1dcd6d5e96afcd1ea0')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
autoreconf -vfi
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
./configure \
|
|
--prefix=/usr \
|
|
--without-qt \
|
|
--without-gtk \
|
|
--without-dbus \
|
|
--without-imagemagick \
|
|
--without-python \
|
|
--with-graphicsmagick \
|
|
CFLAGS="$CFLAGS -DNDEBUG"
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
make DESTDIR="$pkgdir" install
|
|
install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
}
|