archrelease: copy trunk to community-any
[ArchLinux/community.git] / padthv1 / trunk / PKGBUILD
blob84cb83c21db8384c609d861fa39edb32082ce290
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgbase=padthv1
4 pkgname=(
5   padthv1
6   padthv1-lv2
7   padthv1-standalone
9 pkgver=0.9.30
10 pkgrel=1
11 pkgdesc="An old-school polyphonic additive synthesizer"
12 arch=(x86_64)
13 url="https://padthv1.sourceforge.io/"
14 license=(GPL2)
15 makedepends=(
16   alsa-lib
17   cmake
18   fftw
19   jack
20   liblo
21   lv2
22   qt6-base
23   qt6-svg
24   qt6-tools
26 source=(https://download.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
27 sha512sums=('f03bd062b47f58ea2a7aefb703c1183b399f3faebdd63ce8ff8fd364c97d2fe85e27003219e504639fc44d56c4a19539a14ff989a4998406b8c13c85b7c7beb0')
28 b2sums=('04bd0cffe431e59740eaacb9b424b69ac43becd7d8ceb267e1b0cb7c859e7412df3b7ab8a729fc70920298a4b4bcf3e27d430797c459113359b80147057076b5')
30 _pick() {
31   local p="$1" f d; shift
32   for f; do
33     d="$srcdir/$p/${f#$pkgdir/}"
34     mkdir -p "$(dirname "$d")"
35     mv "$f" "$d"
36     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
37   done
40 build() {
41   local cmake_options=(
42     -B build
43     -D CMAKE_BUILD_TYPE=None
44     -D CMAKE_INSTALL_PREFIX=/usr
45     -D CONFIG_QT6=ON
46     -S $pkgname-$pkgver
47     -W no-dev
48   )
50   cmake "${cmake_options[@]}"
51   cmake --build build --verbose
54 package_padthv1() {
55   depends=(
56     $pkgbase-{lv2,standalone}=$pkgver
57   )
59   DESTDIR="$pkgdir" cmake --install build
61   (
62     cd "$pkgdir"
64     # have find-libdeps resolve dependencies properly:
65     # https://gitlab.archlinux.org/archlinux/devtools/-/issues/102
66     find usr/lib -type f -iname "*.so" -exec chmod +x {} \;
68     _pick $pkgbase-lv2 usr/lib/lv2
69     _pick $pkgbase-standalone usr/{bin,share}
70   )
73 package_padthv1-lv2() {
74   pkgdesc+=" - LV2 plugin"
75   groups=(
76     lv2-plugins
77     pro-audio
78   )
79   depends=(
80     fftw libfftw3f.so
81     gcc-libs
82     glibc
83     lv2-host
84     qt6-base
85     qt6-svg
86   )
87   optdepends=(
88     'qt6-wayland: for native wayland support'
89   )
91   mv -v $pkgname/* "$pkgdir"
92   install -vDm 644 $pkgbase-$pkgver/{ChangeLog,README} -t "$pkgdir/usr/share/doc/$pkgname"
95 package_padthv1-standalone() {
96   pkgdesc+=" - standalone"
97   groups=(
98     pro-audio
99   )
100   depends=(
101     alsa-lib
102     fftw libfftw3f.so
103     gcc-libs
104     glibc
105     hicolor-icon-theme
106     jack
107     liblo
108     qt6-base
109     qt6-svg
110   )
111   optdepends=(
112     'new-session-manager: for session management using the standalone application'
113     'qt6-wayland: for native wayland support'
114   )
116   mv -v $pkgname/* "$pkgdir"
117   install -vDm 644 $pkgbase-$pkgver/{ChangeLog,README} -t "$pkgdir/usr/share/doc/$pkgname"
119 # vim:set ts=2 sw=2 et: