PKGBUILDs/community/x42-plugins/PKGBUILD

171 lines
6.2 KiB
Bash
Raw Normal View History

2019-12-15 19:23:20 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
2018-02-07 03:29:04 +00:00
# Contributor: Lieven Moors <lievenmoors@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - export OPTIMIZATIONS to override Makefiles without x86isms
pkgname=x42-plugins
2019-12-15 19:23:20 +00:00
pkgver=20191215
2019-10-13 21:00:13 +00:00
pkgrel=1
2018-02-07 03:29:04 +00:00
pkgdesc="Collection of LV2 plugins"
arch=('x86_64')
url="https://github.com/x42/x42-plugins"
2019-07-14 21:19:00 +00:00
license=('GPL2' 'GPL3')
2018-06-06 12:51:57 +00:00
groups=('lv2-plugins' 'pro-audio')
2019-12-15 19:23:20 +00:00
depends=('cairo' 'fftw' 'ftgl' 'gcc-libs' 'glib2' 'glibc' 'hicolor-icon-theme'
'libglvnd' 'libltc.so' 'libsamplerate' 'libsndfile' 'libx11'
'libzita-convolver.so' 'pango')
makedepends=('gendesk' 'help2man' 'libjack.so' 'liblo.so' 'lv2' 'ttf-dejavu')
optdepends=('libjack.so: for standalone applications'
'liblo.so: for standalone applications')
2019-09-22 23:04:21 +00:00
source=("http://gareus.org/misc/${pkgname}/${pkgname}-${pkgver}.tar.xz"
2019-12-15 19:23:20 +00:00
"${pkgname}.png::https://x42-plugins.com/x42/static/img/x42.png"
2019-09-22 23:04:21 +00:00
"${pkgname}.directory"
"${pkgname}.menu")
2019-12-15 19:23:20 +00:00
sha512sums=('047d16089eaa9a4c1b84e8487484d395e341a2bddf57dac56f0f1a939a2ca5d19a41faa9ea653618cb66dd2d960061d375b4ad97d36108b57de333c305c820fa'
2019-09-22 23:04:21 +00:00
'956fdd8e04c846d06a5267d1748916744418e0ddfce0ac2e9dd3a1c1376aea61499177af80709d9fe78f8c0c2ddcbf9f9e5b2e413adc9a7eca9b648a87ad4860'
'a4f25224da25f0bc9015290d5cc20051bfa02abc8dce54244e7d4a98e3f8bf1ea58afb8adf6f38818126c509f3551f4012417d9e17af701b1ae7f917df8b794d'
'ce8f056a034e3bccff1087016c2df550dad32d3c03fb72135623322e46c24b6f5ec5fd3a1478ba5c42a90ec757157f951fd40fb00903c9a20f6e631db454e856')
_names=('darc' 'dpl' 'fat1' 'fil4' 'matrixmixer8x8' 'meter' 'mixtri' 'scope' 'spectr' 'stepseq' 'tuna')
2018-07-24 00:25:27 +00:00
prepare() {
2019-01-07 01:27:08 +00:00
cd "${pkgname}-${pkgver}"
declare -A comments=(
2019-05-08 00:04:18 +00:00
["darc"]="A general purpose audio signal compressor"
2019-09-22 23:04:21 +00:00
["dpl"]="Look-ahead digital peak limiter intended but not limited to the final step of mastering or mixing"
2018-09-01 22:57:53 +00:00
["fat1"]="Auto-tuner based on Fons Adriaensen's zita-at1"
["fil4"]="4 band parametric equalizer with additional low+high shelf filters, Low and High-pass"
2019-09-22 23:04:21 +00:00
["matrixmixer8x8"]="Matrix Mixer 8x8"
2018-09-01 22:57:53 +00:00
["mixtri"]="Matrix mixer and trigger processor"
["scope"]="Simple audio oscilloscope with variable time scale, triggering, cursors and numeric readout"
2019-02-22 13:27:28 +00:00
["spectr"]="Spectrum Analyzer"
2018-09-01 22:57:53 +00:00
["stepseq"]="Simple step sequencer for moddevices.com"
)
2019-01-07 01:27:08 +00:00
declare -A generic=(
2019-05-08 00:04:18 +00:00
["darc"]="Dynamic Audio Range Compressor"
2019-09-22 23:04:21 +00:00
["dpl"]="Peak Limiter"
2019-01-07 01:27:08 +00:00
["fat1"]="Auto Tune"
["fil4"]="Parametric Equalizer"
2019-09-22 23:04:21 +00:00
["matrixmixer8x8"]="Matrix Mixer"
2019-01-07 01:27:08 +00:00
["mixtri"]="Mixer'n'Trigger"
["scope"]="Oscilloscope"
2019-02-22 13:27:28 +00:00
["spectr"]="Spectrum Analyzer"
2019-01-07 01:27:08 +00:00
["stepseq"]="Step Sequencer"
)
2019-04-14 23:29:54 +00:00
declare -A meter_types=(
[0]='EBU R128 Meter'
[1]='K20/RMS Meter (Stereo)'
[2]='K14/RMS Meter (Stereo)'
[3]='K12/RMS Meter (Stereo)'
[4]='BBC Meter (Stereo)'
[5]='BBC M-6'
[6]='DIN Meter (Stereo)'
[7]='EBU Meter (Stereo)'
[8]='Nordic Meter (Stereo)'
[9]='VU Meter (Stereo)'
[10]='True-Peak and RMS Meter (Stereo)'
[11]='DR-14 - Crest Factor Loudness Range Meter'
[12]='Stereo Phase-Correlation Meter'
[13]='Goniometer'
[14]='Phase/Frequency Wheel'
[15]='1/3 Octave Spectrum Analyzer'
[16]='Stereo/Frequency Scope'
[17]='Signal Distribution Histogram'
[18]='Bit Meter'
[19]='Surround Level 8'
)
declare -A tuna_types=(
[0]='Instrument Tuner'
[1]='Instrument Tuner (Spectrum)'
)
2018-09-01 22:57:53 +00:00
# XDG desktop files
2019-09-22 23:04:21 +00:00
for name in "${_names[@]}"; do
case "$name" in
meter)
for type in {0..19}; do
gendesk -n \
--pkgname "x42-meter-${type}" \
--name "x42-meter ${meter_types[$type]}" \
--pkgdesc "${meter_types[$type]}" \
--exec "x42-meter $type" \
--icon "x42-meter" \
--genericname "Audio Meter" \
--categories "x42-plugins"
done
;;
tuna)
for type in {0,1}; do
gendesk -n \
--pkgname "x42-${name}-${type}" \
--name "x42-${name} ${tuna_types[$type]}" \
--pkgdesc "${tuna_types[$type]}" \
--exec "x42-${name} $type" \
--icon "x42-${name}" \
--genericname "Music Instrument Tuner" \
--categories "x42-plugins"
done
;;
*)
gendesk -n \
--pkgname "x42-${name}" \
--name "x42-${name}" \
--pkgdesc "${comments[$name]}" \
--genericname "${generic[$name]}" \
--categories "x42-plugins"
;;
esac
2019-04-14 23:29:54 +00:00
done
2019-09-22 23:04:21 +00:00
# moving images to correct location so installation is not such a hassle later on
mv -v fat1.lv2/img/x42{_,-}fat1.png
mv -v mixtri.lv2/img/x42{_,-}mixtri.png
mv -v meters.lv2/img/x42-meter{s,}.png
mv -v matrixmixer.lv2/img/x42-matrixmixer{,8x8}.png
2018-07-24 00:25:27 +00:00
}
2018-02-07 03:29:04 +00:00
build() {
cd "${pkgname}-${pkgver}"
2019-01-07 01:27:08 +00:00
# replace ttf-freefont with ttf-liberation
export FONTFILE=/usr/share/fonts/TTF/DejaVuSans-Bold.ttf
2018-02-07 03:29:04 +00:00
export OPTIMIZATIONS="-ffast-math -fomit-frame-pointer -O3 -fno-finite-math-only"
2018-07-27 13:48:13 +00:00
make
2018-02-07 03:29:04 +00:00
}
package() {
2019-09-22 23:04:21 +00:00
declare -A _dirs=(
["darc"]="darc.lv2"
["dpl"]="dpl.lv2"
["fat1"]="fat1.lv2"
["fil4"]="fil4.lv2"
["matrixmixer8x8"]="matrixmixer.lv2"
["meter"]="meters.lv2"
["mixtri"]="mixtri.lv2"
["scope"]="sisco.lv2"
["spectr"]="spectra.lv2"
["stepseq"]="stepseq.lv2"
["tuna"]="tuna.lv2"
)
2018-02-07 03:29:04 +00:00
cd "${pkgname}-${pkgver}"
make install DESTDIR="$pkgdir/" PREFIX=/usr
2019-09-22 23:04:21 +00:00
# xdg desktop integration
install -vDm 644 ./*.desktop -t "${pkgdir}/usr/share/applications/"
# icons
for name in "${_names[@]}"; do
if [[ "$name" != 'fil4' ]]; then
install -vDm 644 "${_dirs[$name]}/img/x42-${name}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/256x256/apps/"
fi
done
install -vDm 644 "../${pkgname}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/256x256/apps/"
# menu integration
install -vDm 644 "../${pkgname}.menu" \
-t "${pkgdir}/etc/xdg/menus/applications-merged/"
install -vDm 644 "../${pkgname}.directory" \
-t "${pkgdir}/usr/share/desktop-directories/"
2019-12-15 19:23:20 +00:00
install -vDm 644 plugin.news \
-t "${pkgdir}/usr/share/doc/${pkgname}"
2018-02-07 03:29:04 +00:00
}
# vim:set ts=2 sw=2 et: