upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / guvcview / trunk / PKGBUILD
blob3f600c6ab278eb923e4b5ef10f388ac4f616576e
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>
5 pkgbase=guvcview
6 pkgname=(guvcview guvcview-common guvcview-qt)
7 pkgver=2.0.8
8 pkgrel=3
9 pkgdesc='Simple interface for capturing and viewing video from v4l2 devices'
10 arch=('x86_64')
11 url='http://guvcview.sourceforge.net/'
12 license=('GPL3')
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
20 prepare() {
21   cp -a $pkgbase{-src-$pkgver,-qt}
24 build() {
25   # GTK+ version
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
29   make
31   # Qt version
32   cd ../$pkgbase-qt
33   ./configure --prefix=/usr --disable-debian-menu --disable-gtk3 --enable-qt5
34   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
35   make
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
49 package_guvcview() {
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')
63   cd $pkgbase-qt
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