summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b4961b5b168548eeee0e538a15bcf216b497a431 (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
55
56
57
58
59
# Maintainer: aksr <aksr at t-com dot me>
pkgname=regoth-git
pkgver=r533.e080948
pkgrel=1
epoch=
pkgdesc="Reimplementation of Gothic I and II using modern technologies."
arch=('i686' 'x86_64')
url="https://github.com/REGoth-project/REGoth-bs"
url="https://regoth-project.github.io/REGoth-bs"
license=('MIT')
categories=()
groups=()
depends=('gcc>=6')
depends=(physfs libx11 libxcursor libxi icu mesa freeglut libxrandr)
makedepends=('git' 'cmake')
optdepends=('doxygen: for documentation'
            'plantuml: for documentation')
checkdepends=()
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
replaces=()
backup=()
options=()
changelog=
install="${pkgname%-*}".install
source=("$pkgname::git+https://github.com/REGoth-project/REGoth-bs.git")
noextract=()
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/$pkgname"
  git submodule update --init --recursive
}

build() {
  cd "$srcdir/$pkgname"
  rm -rf build
  mkdir build
  cd build
  cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
  cmake --build . --parallel $(nproc)
}

package() {
  cd "$srcdir/$pkgname/build/bin"
  mkdir -p $pkgdir/usr/{bin,lib}
  for i in *; do
    install -Dm755 $i "$pkgdir/usr/bin/$i"
  done
  cp -r ../lib/lib* $pkgdir/usr/lib
  install -Dm644 ../../README.md $pkgdir/usr/share/doc/${pkgname%-*}/README.md
  install -Dm644 ../../LICENSE $pkgdir/usr/share/licenses/${pkgname%-*}/LICENSE
}