summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 28d626c0db1077ab78dfbdc329e1a96cc5d15f20 (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
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>

_pkgname=sord
pkgname="${_pkgname}-git"
pkgver=0.16.4.r419.421e37d
pkgrel=1
pkgdesc="Lightweight C library for storing RDF statements in memory (git version)"
arch=('i686' 'x86_64')
url="http://drobilla.net/software/sord/"
license=('custom:ISC')
depends=('pcre' 'serd')
makedepends=('git' 'python')
conflicts=("${_pkgname}" "${_pkgname}-svn")
provides=("${_pkgname}" "${_pkgname}=${pkgver//.r*/}" "lib${_pkgname}-${pkgver::1}.so")
source=("${_pkgname}::git+https://gitlab.com/drobilla/sord.git"
        'autowaf::git+https://gitlab.com/drobilla/autowaf.git')
md5sums=('SKIP'
         'SKIP')


pkgver() {
  cd "${srcdir}/${_pkgname}"

  local ver=`grep "^SORD_VERSION" wscript | cut -d "'" -f 2`
  echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${srcdir}/${_pkgname}"

  git submodule init
  git config submodule.waflib.url "${srcdir}/autowaf"
  git submodule update

  # remove local call to ldconfig
  sed -i "/ldconfig/d" wscript
}

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

  python ./waf configure --prefix=/usr
  python waf build $MAKEFLAGS
}

package() {
  cd "${srcdir}/${_pkgname}"

  python waf install --destdir="$pkgdir"
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}