summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f3bcb50381d864765515b08e2082f5a04f4aa10f (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: Jose Riha <jose 1711 gmail com>

pkgname=hawknl-git
pkgver=20110125
pkgrel=2
pkgdesc="An open source game oriented network API (git)"
arch=('i686' 'x86_64')
url="http://www.hawksoft.com/hawknl/"
license=('LGPL')
depends=('glibc')
provides=('hawknl')
source=(git+https://github.com/dfyx/HawkNL.git hawknl.patch)
md5sums=('SKIP'
         '7dec01dc297e2a4d3c515f6747dc5c9a')

pkgver() {
  cd "${srcdir}/HawkNL"
  git log -1 --format="%cd" --date=short | sed 's|-||g'
}

build() {
  cd "${srcdir}/HawkNL"

  patch -Np2 --binary -i "${srcdir}/hawknl.patch"
  make -f makefile.linux \
    LIBDIR="$pkgdir"/usr/lib \
    INCDIR="$pkgdir"/usr/include \
    OPTFLAGS="-D_GNU_SOURCE -D_REENTRANT" 
}

package() {
  cd "$srcdir/HawkNL"
  mkdir -p "${pkgdir}"/usr/{lib,include}

  make -f makefile.linux \
    LIBDIR="$pkgdir"/usr/lib \
    INCDIR="$pkgdir"/usr/include \
    OPTFLAGS="-D_GNU_SOURCE -D_REENTRANT" \
    install
  install -Dm644 src/nlinternal.h "${pkgdir}/usr/include/nlinternal.h"
  install -Dm644 include/hawklib.h "${pkgdir}/usr/include/hawklib.h"
  install -Dm644 include/hawkthreads.h "${pkgdir}/usr/include/hawkthreads.h"
}