aboutsummaryrefslogtreecommitdiffstats
path: root/community/zbar/APKBUILD
blob: 40b8614e932702748c789777c86550b21d4118f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Diego Queiroz <diego.queiroz@gmail.com>
# Maintainer: Diego Queiroz <diego.queiroz@gmail.com>
pkgname=zbar
pkgver=0.23.1
pkgrel=0
pkgdesc="Port of ZBAR BAR CODE READER"
url="http://zbar.sourceforge.net/"
arch="all"
license="LGPL-2.0-or-later"
depends="py3-gobject3"
makedepends="imagemagick-dev gtk+3.0-dev qt5-qtx11extras-dev lcms2-dev
	automake autoconf libtool xmlto docbook-xsl libxv-dev python3-dev
	gettext-dev gobject-introspection-dev"
subpackages="
	$pkgname-dev
	$pkgname-doc
	lib$pkgname:zbarlibs
	lib${pkgname}qt:qtlibs
	lib${pkgname}gtk:gtklibs
	py3-${pkgname}:py
	"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/mchehab/zbar/archive/$pkgver.tar.gz
	"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	LDFLAGS="$LDFLAGS -lintl" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-video \
		--with-python=python3 \
		--with-gtk=gtk3 \
		--with-gir
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/*.a
}

zbarlibs() {
	depends=""
	pkgdesc="$pkgdesc (library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libzbar.so.* "$subpkgdir"/usr/lib
}

qtlibs() {
	depends=""
	pkgdesc="$pkgdesc (Qt5 library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libzbarqt.so.* "$subpkgdir"/usr/lib
}

gtklibs() {
	depends=""
	pkgdesc="$pkgdesc (Gtk+3 library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libzbargtk.so.* "$subpkgdir"/usr/lib
}

py() {
	depends=""
	pkgdesc="python3 bindings for ZBar"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib
}

sha512sums="ae7741cf750a10cf53dc11abcd482c3885507153ee37f6e3364ed5ed72184ebb009560b8c40d8090603a551fb681700a962838a59ce77d005d080ee49fbfa54b  zbar-0.23.1.tar.gz"