summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89acae8166623a3f7a03fd839a0a2357cd17c178 (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: Dimitris Kiziridis <ragouel at outlook dot com>

pkgname=hippoplayer
pkgver=0.2.1
pkgrel=1
pkgdesc="A modern music player for your oldsk00l needs"
arch=('x86_64')
url='https://github.com/emoon/HippoPlayer'
license=('MIT' 'APACHE')
install=hippoplayer.install
provides=("${pkgname}")
depends=('alsa-lib' 'qt5-base')
makedepends=('git' 'tundra2' 'rustup' 'qt5-base' 'gendesk')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/emoon/HippoPlayer/archive/${pkgver}.tar.gz")
sha256sums=('0e36e0402428b9731eebfec2f8023b7cdd7efc20efa80b6ec37fa9d47c4908e7')

prepare() {
  cd "HippoPlayer-${pkgver}"
  sed -i "153s|.*|const char* core_name = \"/usr/share/hippoplayer/libhippo_core.so\";|" src/hippo_core_loader/hippo_core_loader.c
}

build() {
  cd "HippoPlayer-${pkgver}"
  export QT5_INC=/usr/include/qt
  export QT5_BIN=/usr/bin
  export QT5_LIB=/usr/lib
  rustup install stable
  rustup default stable
  tundra2 -D linux-gcc-release
}

package() {
  cd "HippoPlayer-${pkgver}"
  echo "#!/usr/bin/env bash
  cd /usr/share/hippoplayer
  ./hippo_player" > hippoplayer.sh
  install -Dm755 hippoplayer.sh "${pkgdir}/usr/bin/hippoplayer"
  install -Dm644 data/hippo.png "${pkgdir}/usr/share/pixmaps/hippoplayer.png"
  install -Dm755 t2-output/linux-gcc-release-default/hippo_player -t "${pkgdir}/usr/share/hippoplayer/"
  install -Dm755 t2-output/linux-gcc-release-default/*.so -t "${pkgdir}/usr/share/hippoplayer/"
  chmod 757 "${pkgdir}/usr/share/hippoplayer/"
  install -Dm644 LICENSE-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT"
  cp -R data/ "${pkgdir}/usr/share/hippoplayer/"
  cp -R bin/ "${pkgdir}/usr/share/hippoplayer/"
  rm -rf "${pkgdir}/usr/share/hippoplayer/data/mac"
  gendesk -f -n --pkgname "${pkgname}" \
          --pkgdesc "$pkgdesc" \
          --name "HippoPlayer" \
          --comment "$pkgdesc" \
          --exec "${pkgname}" \
          --categories 'Utility;Audio;AudioVideo' \
          --icon "${pkgname}"
  install -Dm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
}