summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 50e3933a3cde1ccb7881966f97446cdbf4aa901f (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
# Maintainer: Andrew O'Neill <andrew at haunted dot sh>

pkgname=musikcube-bin
pkgver=3.0.4
pkgrel=1
pkgdesc='A terminal-based cross-platform music player, audio engine, metadata indexer, and server'
arch=('x86_64')
url="https://github.com/clangen/${pkgname%-bin}"
license=('BSD-3-Clause')
provides=('musikcube')
conflicts=('musikcube')
depends=('pulse-native-provider' 'libpulse' 'libev' 'alsa-lib')
source=("${pkgname}-${pkgver}.tar.bz2::${url}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_linux_x86_64.tar.bz2"
        "LICENSE.txt")
sha256sums=('e29f0463e36f238a2d12167ca427234fc42f64754ea81bd56196689ea06731f5'
            '315d1a4485c05a0db8640d0720cac768c7e49224dc3db592ed204a770fee9e36')

prepare() {
  cd ${pkgname%-bin}_${pkgver}_linux_x86_64

  cat << EOF > musikcube.sh
#!/bin/sh

set -eu

cd /usr/share/musikcube/
exec ./musikcube "\$@"
EOF

  cat << EOF > musikcubed.sh
#!/bin/sh

set -eu

cd "/usr"/share/musikcube/
exec ./musikcubed "\$@"
EOF
}

package() {
  install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname%-bin}/LICENSE

  cd ${pkgname%-bin}_${pkgver}_linux_x86_64

  install -Dm644 libmusikcore.so -t ${pkgdir}/usr/share/${pkgname%-bin}
  install -Dm644 lib/* -t ${pkgdir}/usr/share/${pkgname%-bin}/lib
  install -Dm644 locales/*.json -t ${pkgdir}/usr/share/${pkgname%-bin}/locales
  install -Dm775 ${pkgname%-bin} -t ${pkgdir}/usr/share/${pkgname%-bin}
  install -Dm775 ${pkgname%-bin}d -t ${pkgdir}/usr/share/${pkgname%-bin}
  install -Dm644 plugins/* -t ${pkgdir}/usr/share/${pkgname%-bin}/plugins
  install -Dm644 themes/* -t ${pkgdir}/usr/share/${pkgname%-bin}/themes
  install -Dm775 musikcube.sh ${pkgdir}/usr/bin/${pkgname%-bin}
  install -Dm775 musikcubed.sh ${pkgdir}/usr/bin/${pkgname%-bin}d
}