summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 521fcce90092ed35a2ba66a7beb5dffc7a4f050e (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
# Maintainer: prg <prg-archlinux@xannode.com>
# Contributor: prg <prg-archlinux@xannode.com>

_gitname=frontend-sdl2
pkgname=projectm-sdl2-git
pkgver=111.c53e732
pkgrel=1
provides=('projectm-sdl')
conflicts=('projectm-sdl')
pkgdesc="Music visualizer which uses 3D accelerated iterative image based rendering (git version)"
arch=('x86_64' 'i686')
url='https://github.com/projectM-visualizer/projectm'
license=('LGPL')
depends=('projectm-git' 'sdl2' 'libxext' 'glm' 'poco')
makedepends=('cmake')
source=("git+https://github.com/projectM-visualizer/${_gitname}.git")
sha256sums=(SKIP)
options=('!buildflags')

pkgver() {
  cd "${_gitname}"
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd "${_gitname}"
  git submodule init
  git submodule update
  mkdir -p build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../
  make
}

package() {
  cd "${_gitname}/build"
  mkdir -p "$pkgdir/usr/bin"
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
  mkdir -p "$pkgdir/usr/share/doc/$pkgname/"
  DESTDIR="$pkgdir" install -Dm755 "${srcdir}/${_gitname}/build/src/projectMSDL" "$pkgdir/usr/bin/"
  DESTDIR="$pkgdir" install -Dm644 "${srcdir}/${_gitname}/build/src/projectMSDL.properties" "$pkgdir/usr/share/doc/$pkgname/"
  DESTDIR="$pkgdir" install -Dm644 "${srcdir}/${_gitname}/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/"
}