summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30c24dcd1e0d2387c0c62f413019742eb7cebac1 (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: Kim Rinnewitz <krinnewitz@plapadoo.de>
_pkgname=sdl2_gpu
_branch=master
pkgname=${_pkgname}-git
pkgver=r734.e3d350b
pkgrel=1
pkgdesc="A library for making hardware-accelerated 2D graphics easy."
arch=('x86_64')
url="https://github.com/grimfang4/sdl-gpu"
license=('MIT')
depends=('sdl2')
makedepends=('cmake' 'git')
provides=("${pkgname//-git}=${pkgver}")
conflicts=(${pkgname//-git})
source=("${_pkgname}-${_branch}::git+https://github.com/grimfang4/sdl-gpu.git#branch=${_branch}"
        "install.patch")
md5sums=('SKIP'
         '63d4f03def4105f98f19f653764fab59')

prepare() {
  cd ${_pkgname}-${_branch}
  patch --forward --strip=1 --input="${srcdir}/install.patch"
}

pkgver() {
  cd ${_pkgname}-${_branch}

  count="$(git rev-list --count HEAD)"
  head="$(git rev-parse --short HEAD)"

  printf "r%s.%s" "${count}" "${head}"
}

build() {
  cd ${_pkgname}-${_branch}
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib
  make
}

package() {
  cd ${_pkgname}-${_branch}
  make DESTDIR="$pkgdir/" install
}