summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fb9f4bf685b9518553a25e35f50d73bf027f80fd (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
pkgname=vio2sf-git
pkgver=r41.1d68801
pkgrel=1
pkgdesc="Library for decoding Nintendo DS Sound Format files"
arch=(i686 x86_64)
url='https://bitbucket.org/losnoco/vio2sf'
license=(GPL2)
depends=(glibc zlib)
makedepends=(git)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=(${pkgname}::git+https://bitbucket.org/losnoco/vio2sf.git)
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "$srcdir/$pkgname/src/vio2sf"
  make CFLAGS="$CFLAGS -c -fPIC" CXXFLAGS="$CXXFLAGS -c -fPIC"
  "${CXX-c++}" "$CFLAGS" -Wl,-Bsymbolic -shared -lz -o libvio2sf.so desmume/*.o
}

package() {
  cd "$srcdir/$pkgname/src/vio2sf"
  install -D -m644 -t "$pkgdir/usr/include/vio2sf/desmume" desmume/{state,spu_exports,types}.h
  install -D -m644 -t "$pkgdir/usr/lib" libvio2sf.{a,so}
}

# vim:set sw=2 et: