summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4497481d8222606a1a4e7ea2e87e8370e5ffa580 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: TheA4Paper <flatandblank@gmail.com>
# Contributor: maksut <maksut.cagil@gmail.com>
# Contributor: spider-mario <spidermario@free.fr>
# Contributor: Saiki81 <saikia81 at hotmail dot com>
# adapted from package: pianoteq-stage-trial-bin
# adapted from pkgbuild creator: CrocoDuck <crocoduck dot oducks at gmail dot com>

# the source package must be downloaded manually
# this can be done by going to the link here:
# https://www.modartt.com/download?file=pianoteq_stage_linux_v841.7z
# The downloaded files must be placed in the appropriate directory
# - makepkg: The same directory as this PKGBUILD
# - yay: /home/<user>/.cache/yay/pianoteq-stage
# - paru: /home/<user>/.cache/paru/clone/pianoteq-stage/ 

pkgname=pianoteq-stage
pkgver=8.4.1
pkgrel=2
pkgdesc="Virtual piano instrument using physical modelling synthesis. Both standalone and plugin versions."
arch=(x86_64 aarch64 armv7h)
url="https://www.pianoteq.com/pianoteq"
license=('custom')
depends=('alsa-lib' 'freetype2' 'ttf-font' 'libx11')
makedepends=('gendesk' 'p7zip')
optdepends=()
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}" "pianoteq-stage-bin" "pianoteq-standard-trial-bin")
_name="pianoteq8-stage"

#Source file download guide
_sourcefile="./pianoteq_stage_linux_v${pkgver//./}.7z"
if [ ! -f ${_sourcefile} ]; then
  echo ""
  echo "	Due to license and website restriction, to install this package, the distribution file must be downloaded manually."
  echo "	You can download the source file of Pianoteq Stage $pkgver from here:"
  echo ""
  echo "	https://www.modartt.com/download?file=pianoteq_stage_linux_v${pkgver//./}.7z"
  echo ""
  echo "	You must be logged in and own a valid copy of Pianoteq Stage in order to download"
  echo ""
  echo "	The Downloaded file must be placed in the appropriate directory depending on your AUR helper (or lack of thereof) here:"
  echo "		- makepkg: Same directory as this PKGBUILD"
  echo "		- yay: /home/<user>/.cache/yay/pianoteq-stage"
  echo "		- paru: /home/<user>/.cache/paru/clone/pianoteq-stage/                                                                                                    "
  echo ""
  echo "Operation Aborted"
  echo ""
  return 1
fi

source=("local://pianoteq_stage_linux_v${pkgver//./}.7z"
  'https://www.pianoteq.com/images/logo/pianoteq_icon_128.png')
b2sums=('d981a40c51b8272301eb4d2c165d8a6a6bf507c8b58fb849fce14be0ae01f6aa2663a3d210c48c6d9859f5635b6caf546d058784c42d2d7cb9a693995f010598'
  'bbb48b5b2bd5bbe52a39c84f42ea6c12a3633e4713e00d8132654ddf5adc5d7da1b7951c683cb11446ee847a388a775eb48591089a4e8dc69ed6d97cfc80d56d')

prepare() {
  gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name='pianoteq 8' --exec="\"$_name\"" --categories 'Audio;Sequencer;Midi;AudioVideoEditing;Music;AudioVideo;'
}

package() {
  _pianoteq_type="Pianoteq 8 STAGE"
  #ARM support not tested
  if [[ "$CARCH" == x86_64 ]]; then
    archdir=x86-64bit
  elif [[ "$CARCH" == armv7h ]]; then
    archdir=arm-32bit
  elif [[ "$CARCH" == aarch64 ]]; then
    archdir=arm-64bit
  fi

  # Install program files:
  install -Dm 755 "$srcdir/$_pianoteq_type/$archdir/$_pianoteq_type" "$pkgdir/usr/bin/$_name"
  install -Dm 755 "$srcdir/$_pianoteq_type/$archdir/$_pianoteq_type.so" "$pkgdir/usr/lib/vst/$_name.so"
  cd "$srcdir/$_pianoteq_type/$archdir/$_pianoteq_type.lv2"
  for i in *; do
    install -D "$i" "$pkgdir/usr/lib/lv2/$_name.lv2/$i"
  done
  cd $srcdir
  # Install desktop launcher:
  install -Dm 644 "$srcdir/pianoteq_icon_128.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
  install -Dm 644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/${pkgname%-*}.desktop"
  # Install the license:
  install -d "$pkgdir/usr/share/licenses/$pkgname"
  install -m 644 "$_pianoteq_type"/*Licence* "$pkgdir/usr/share/licenses/$pkgname/"
  # Install the Documentation:
  install -D "$_pianoteq_type/README_LINUX.txt" "$pkgdir/usr/share/doc/${pkgname%-*}/README_LINUX.txt"
  cd "$srcdir/$_pianoteq_type/Documentation"
  for i in *; do
    install -D "$i" "$pkgdir/usr/share/doc/${pkgname%-*}/$i"
  done
}