archrelease: copy trunk to community-any
[ArchLinux/community.git] / cameractrls / trunk / PKGBUILD
blob24542aefa551f77c985b016a7c67ceeba0e9b0ad
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
3 pkgname=cameractrls
4 pkgver=0.5.0
5 pkgrel=4
6 pkgdesc="Camera controls for Linux"
7 arch=('any')
8 url="https://github.com/soyersoyer/cameractrls"
9 license=('MIT')
10 depends=('gtk3' 'libjpeg-turbo' 'python' 'python-gobject' 'sdl2' 'systemd')
11 source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
12 sha256sums=('36116b5467a50dd5b490dba22360a0ea5bedaed124af3d9ef92967a132b39c9d')
14 package() {
15   cd "$pkgname-$pkgver"
16   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
17   install -Dm755 cameractrls.py cameractrlsgtk.py cameraview.py cameractrlsgtk4.py -t \
18     "${pkgdir}${site_packages}/CameraCtrls/"
19   install -Dm644 pkg/icon.png -t "${pkgdir}${site_packages}/CameraCtrls/images/"
20   install -Dm644 "pkg/hu.irl.$pkgname.metainfo.xml" -t "$pkgdir/usr/share/metainfo/"
21   install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
22   install -Dm644 pkg/hu.irl.cameractrls.desktop -t "$pkgdir/usr/share/applications/"
24   install -d "$pkgdir"/usr/{bin,share/icons/hicolor/256x256/apps}
25   ln -s "${site_packages}/CameraCtrls/$pkgname.py" "$pkgdir/usr/bin/$pkgname"
26   ln -s "${site_packages}/CameraCtrls/${pkgname}gtk.py" "$pkgdir/usr/bin/${pkgname}gtk.py"
27   ln -s "${site_packages}/CameraCtrls/${pkgname}gtk4.py" "$pkgdir/usr/bin/${pkgname}gtk4.py"
28   ln -s "${site_packages}/CameraCtrls/images/icon.png" \
29     "$pkgdir/usr/share/icons/hicolor/256x256/apps/hu.irl.$pkgname.png"