summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorKim Rinnewitz2019-07-03 13:52:29 +0200
committerKim Rinnewitz2019-07-03 13:52:29 +0200
commit475331e90ead4beff3a9eaadd3f68bf1c915426d (patch)
tree68481837d9e276728b53771d5e50fb19ccc6615b /PKGBUILD
downloadaur-sdl2_gpu-git.tar.gz
Initial release of SDL2_gpu
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..30c24dcd1e0d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,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
+}