1 # Maintainer: Balló György <ballogyor+arch at gmail dot com>
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
6 pkgname=(guvcview guvcview-common guvcview-qt)
9 pkgdesc='Simple interface for capturing and viewing video from v4l2 devices'
11 url='http://guvcview.sourceforge.net/'
13 depends=('ffmpeg' 'gsl' 'gtk3' 'qt5-base' 'portaudio')
14 makedepends=('intltool')
15 options=('!emptydirs')
16 source=("https://downloads.sourceforge.net/$pkgbase/$pkgbase-src-$pkgver.tar.bz2")
17 sha256sums=('a21f4e448286666cf27bafef5290cc953a0a1796b752e5bbe521266dc1230c81')
18 noextract=($pkgbase-src-$pkgver-2.tar.bz2) # missing root dir
21 cp -a $pkgbase{-src-$pkgver,-qt}
26 cd $pkgbase-src-$pkgver
27 ./configure --prefix=/usr --disable-debian-menu
28 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
33 ./configure --prefix=/usr --disable-debian-menu --disable-gtk3 --enable-qt5
34 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
38 package_guvcview-common() {
39 pkgdesc="Common files for guvcview"
40 depends=('ffmpeg' 'gsl' 'libusb' 'portaudio')
42 cd $pkgbase-src-$pkgver
43 make DESTDIR="$pkgdir" install
44 make -C guvcview DESTDIR="$pkgdir" uninstall
45 make -C data DESTDIR="$pkgdir" uninstall-man1 uninstall-appdataDATA uninstall-desktopDATA
46 install -Dm644 data/icons/guvcview.png "$pkgdir"/usr/share/icons/hicolor/128x128/apps/guvcview.png
50 pkgdesc="Simple GTK+ interface for capturing and viewing video from v4l2 devices"
51 depends=('guvcview-common' 'gtk3')
53 cd $pkgbase-src-$pkgver
54 make -C guvcview DESTDIR="$pkgdir" install
55 make -C data DESTDIR="$pkgdir" install-man1 install-appdataDATA install-desktopDATA
56 sed -i 's/^Icon=.*/Icon=guvcview/' "$pkgdir"/usr/share/applications/guvcview.desktop
59 package_guvcview-qt() {
60 pkgdesc="Simple Qt interface for capturing and viewing video from v4l2 devices"
61 depends=('guvcview-common' 'qt5-base')
64 make -C guvcview DESTDIR="$pkgdir" install
65 make -C data DESTDIR="$pkgdir" install-man1 install-appdataDATA install-desktopDATA
66 mv "$pkgdir"/usr/bin/guvcview{,-qt}
67 mv "$pkgdir"/usr/share/man/man1/guvcview{,-qt}.1
68 mv "$pkgdir"/usr/share/applications/guvcview{,-qt}.desktop
69 sed -i 's/Exec=guvcview/Exec=guvcview-qt/
70 s/^Icon=.*/Icon=guvcview/' "$pkgdir"/usr/share/applications/guvcview-qt.desktop
71 mv "$pkgdir"/usr/share/metainfo/guvcview{,-qt}.appdata.xml
72 sed -i 's/net.sourceforge.guvcview/net.sourceforge.guvcview-qt/
73 s/guvcview.desktop/guvcview-qt.desktop/' "$pkgdir"/usr/share/metainfo/guvcview-qt.appdata.xml