PKGBUILDs/extra/guvcview/PKGBUILD

77 lines
2.7 KiB
Bash
Raw Normal View History

2021-11-02 20:57:05 +00:00
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable distcc - configure checks for clang first and finds distcc's symlink but no clang
pkgbase=guvcview
pkgname=(guvcview guvcview-common guvcview-qt)
2024-11-23 23:34:35 +00:00
pkgver=2.2.1
pkgrel=1
2021-11-02 20:57:05 +00:00
pkgdesc='Simple interface for capturing and viewing video from v4l2 devices'
arch=('x86_64')
url='http://guvcview.sourceforge.net/'
license=('GPL3')
2024-11-23 23:34:35 +00:00
depends=('ffmpeg' 'gsl' 'gtk3' 'qt6-base' 'portaudio')
makedepends=('cmake')
2021-11-02 20:57:05 +00:00
options=('!emptydirs' '!distcc')
2022-06-18 17:56:00 +00:00
source=("https://downloads.sourceforge.net/$pkgbase/$pkgbase-src-$pkgver.tar.bz2")
2024-11-23 23:34:35 +00:00
sha256sums=('d2adc7ce762961e853c3e16b511bad61504492d12f3e2eb7e30da4a2f7ade5af')
2021-11-02 20:57:05 +00:00
noextract=($pkgbase-src-$pkgver-2.tar.bz2) # missing root dir
prepare() {
2024-11-23 23:34:35 +00:00
# Fix appdata install dir
sed -e 's|\/appdata|\/metainfo|' -i $pkgbase-src-$pkgver/data/CMakeLists.txt
2021-11-02 20:57:05 +00:00
}
build() {
# GTK+ version
2024-11-23 23:34:35 +00:00
cmake -B build-gtk -S $pkgbase-src-$pkgver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_SFML=ON
cmake --build build-gtk
2021-11-02 20:57:05 +00:00
# Qt version
2024-11-23 23:34:35 +00:00
cmake -B build-qt -S $pkgbase-src-$pkgver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_SFML=ON \
-DUSE_QT6=ON \
-DUSE_GTK3=OFF
cmake --build build-qt
2021-11-02 20:57:05 +00:00
}
package_guvcview-common() {
pkgdesc="Common files for guvcview"
depends=('ffmpeg' 'gsl' 'libusb' 'portaudio')
2024-11-23 23:34:35 +00:00
DESTDIR="$pkgdir" cmake --install build-gtk
rm -r "$pkgdir"/usr/{bin,share/{man,metainfo,applications}}
install -Dm644 $pkgbase-src-$pkgver/data/icons/guvcview.png "$pkgdir"/usr/share/icons/hicolor/128x128/apps/guvcview.png
2021-11-02 20:57:05 +00:00
}
package_guvcview() {
pkgdesc="Simple GTK+ interface for capturing and viewing video from v4l2 devices"
depends=('guvcview-common' 'gtk3')
2024-11-23 23:34:35 +00:00
DESTDIR="$pkgdir" cmake --install build-gtk
rm -r "$pkgdir"/usr/{lib,share/{pixmaps,locale}}
2021-11-02 20:57:05 +00:00
sed -i 's/^Icon=.*/Icon=guvcview/' "$pkgdir"/usr/share/applications/guvcview.desktop
}
package_guvcview-qt() {
pkgdesc="Simple Qt interface for capturing and viewing video from v4l2 devices"
2024-11-23 23:34:35 +00:00
depends=('guvcview-common' 'qt6-base')
2021-11-02 20:57:05 +00:00
2024-11-23 23:34:35 +00:00
DESTDIR="$pkgdir" cmake --install build-qt
rm -r "$pkgdir"/usr/{lib,share/{pixmaps,locale}}
2021-11-02 20:57:05 +00:00
mv "$pkgdir"/usr/bin/guvcview{,-qt}
2024-11-23 23:34:35 +00:00
mv "$pkgdir"/usr/share/man/man1/guvcview{,-qt}.1.gz
2021-11-02 20:57:05 +00:00
mv "$pkgdir"/usr/share/applications/guvcview{,-qt}.desktop
sed -i 's/Exec=guvcview/Exec=guvcview-qt/
s/^Icon=.*/Icon=guvcview/' "$pkgdir"/usr/share/applications/guvcview-qt.desktop
mv "$pkgdir"/usr/share/metainfo/guvcview{,-qt}.appdata.xml
sed -i 's/net.sourceforge.guvcview/net.sourceforge.guvcview-qt/
s/guvcview.desktop/guvcview-qt.desktop/' "$pkgdir"/usr/share/metainfo/guvcview-qt.appdata.xml
}