APKBUILD 3.16 KB
Newer Older
Leonardo Arena's avatar
Leonardo Arena committed
1
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
Leonardo Arena's avatar
Leonardo Arena committed
2 3
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=v4l-utils
4
pkgver=1.0.0
5
pkgrel=0
Leonardo Arena's avatar
Leonardo Arena committed
6 7 8 9 10
pkgdesc="Userspace tools and conversion library for Video 4 Linux"
url="http://freshmeat.net/projects/libv4l"
arch="all"
license="LGPL"
depends=""
11
makedepends="qt-dev libjpeg-turbo-dev argp-standalone"
Leonardo Arena's avatar
Leonardo Arena committed
12
install=""
13
subpackages="$pkgname-dev qv4l2 $pkgname-dvbv5"
14
source="http://linuxtv.org/downloads/v4l-utils/$pkgname-$pkgver.tar.bz2
15
	fix-compliance.patch
16
	qv4l2.svg
17 18
	qv4l2.desktop
	"
Leonardo Arena's avatar
Leonardo Arena committed
19 20 21
_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
22 23 24 25 26 27 28
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
Leonardo Arena's avatar
Leonardo Arena committed
29 30 31
}

build() {
32 33 34
	cd "$_builddir"
	[ "$CLIBC" = "musl" ] && export CFLAGS="$CFLAGS -D__off_t=off_t"
	[ "$CLIBC" != "eglibc" ] && export LDFLAGS="$LDFLAGS -largp -liconv"
35 36 37 38 39 40 41 42 43
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
44
		--enable-libdvbv5 \
45
		|| return 1	
46
        make || return 1
Leonardo Arena's avatar
Leonardo Arena committed
47 48 49 50
}

package() {
        cd "$_builddir"
Carlo Landmeter's avatar
Carlo Landmeter committed
51
        make -j1 DESTDIR="$pkgdir" install || return 1
52 53 54 55
	install -Dm644 "$srcdir"/qv4l2.desktop \
		"$pkgdir"/usr/share/applications/qv4l2.desktop || return 1
	install -Dm644 "$srcdir"/qv4l2.svg \
		"$pkgdir"/usr/share/icons/hicolor/scalable/apps/qv4l2.svg
Leonardo Arena's avatar
Leonardo Arena committed
56 57
}

58 59 60 61 62
qv4l2() {
	pkgdesc="QT v4l2 test control and streaming test application"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/qv4l2 "$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/share "$subpkgdir"/usr/ || return 1
63 64 65
	rm "$pkgdir"/usr/lib/*.la || return 1
	rm "$pkgdir"/usr/lib/libv4l/*.la || return 1
	rm "$pkgdir"/usr/lib/libv4l/plugins/*.la || return 1
66 67
}

68 69 70 71 72 73 74 75 76 77
dvbv5() {
	pkgdesc="Backwards compatible DVBv5 command line utilities"
	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/bin/dvb* \
		"$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/lib/libdvbv5.* \
		"$subpkgdir"/usr/lib/ || return 1
}

78 79
md5sums="2127f2d06be9162b0d346f7037a9e852  v4l-utils-1.0.0.tar.bz2
03ff8a10297477ca274a051ef6e622e0  fix-compliance.patch
80 81
75ef594ddfe48e48df99c96c2af6b51e  qv4l2.svg
b2e51f9663cee1c38a1d99d76a6b529f  qv4l2.desktop"
82 83
sha256sums="1de3882099e04e89e354675ee408b82c8ac8afd3ca6ab27ea321771901285f30  v4l-utils-1.0.0.tar.bz2
2baccef9aecc1d1ae658d27a48662e0748c663cfc95985faf68bee219def843e  fix-compliance.patch
84 85
b1dad7c1649881be8e66f4d9d0f32206796dd0a10dd936c342426ec64cf9c77c  qv4l2.svg
1c5739631e37a7338409ea8b5c797a6888fd9a595e72d9dc96dd634df26373f3  qv4l2.desktop"
86 87
sha512sums="19e31167015623f50f93dc27becb8f053ca7488ffc41e275c195cb46af63671a0cec6cecea71d90a43b3b01b47f6e6cc2f44517dddd3c2c376bb1d82f770117e  v4l-utils-1.0.0.tar.bz2
1f0e8ad5cde8d66cabad4b670b0911650756ea293711438e37fd7161603fa047d4858fc9e7e7cbf794775da7eddbfcd21c4cb896e9b8f2df64c403dedddb3cd1  fix-compliance.patch
88 89
bc18280046c15b19984103f7c2bb44a0aea79715803c64f0c64bc932499c09022c956914c3b15ae59499adc09f6fbff5378be45707fe851250f495a26b63d682  qv4l2.svg
6f74aa524b3de420eeb8de788ff3f717020732a3f1f6530caee50e63aae7eddbe5f551ffc50065c9f5d6078c13bace089948ecdcacf01f8b82c1a44960e06315  qv4l2.desktop"