Update to meson build system

This commit is contained in:
Christopher Arndt 2022-07-23 18:15:20 +02:00
parent e0a78c8e65
commit 0542b3d1ce
2 changed files with 35 additions and 44 deletions

View file

@ -1,22 +1,23 @@
pkgbase = serd-git pkgbase = serd-git
pkgdesc = Lightweight C library for RDF syntax supporting reading / writing Turtle and NTriples (git version) pkgdesc = Lightweight C library for RDF syntax supporting reading / writing Turtle and NTriples (git version)
pkgver = 0.30.5.r815.49a6eea pkgver = 0.30.15.r1032.14f422f6
pkgrel = 1 pkgrel = 1
url = http://drobilla.net/software/serd/ url = http://drobilla.net/software/serd/
arch = i686 arch = i686
arch = x86_64 arch = x86_64
license = custom:ISC license = ISC
makedepends = doxygen
makedepends = git makedepends = git
makedepends = python makedepends = meson
makedepends = python-sphinx
depends = glibc
provides = serd provides = serd
provides = serd=0.30.5 provides = serd=0.30.15
provides = libserd-0.so provides = serd-docs
conflicts = serd conflicts = serd
conflicts = serd-svn conflicts = serd-docs
source = serd::git+https://gitlab.com/drobilla/serd.git source = serd::git+https://gitlab.com/drobilla/serd.git
source = autowaf::git+https://gitlab.com/drobilla/autowaf.git sha256sums = SKIP
md5sums = SKIP
md5sums = SKIP
pkgname = serd-git pkgname = serd-git
provides = libserd-0.so

View file

@ -1,50 +1,40 @@
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de> # Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
_pkgname=serd _pkgname=serd
pkgname="${_pkgname}-git" pkgname=$_pkgname-git
pkgver=0.30.5.r815.49a6eea pkgver=0.30.15.r1032.14f422f6
pkgrel=1 pkgrel=1
pkgdesc="Lightweight C library for RDF syntax supporting reading / writing Turtle and NTriples (git version)" pkgdesc='Lightweight C library for RDF syntax supporting reading / writing Turtle and NTriples (git version)'
arch=('i686' 'x86_64') arch=(i686 x86_64)
url="http://drobilla.net/software/serd/" url='http://drobilla.net/software/serd/'
license=('custom:ISC') license=(ISC)
makedepends=('git' 'python') depends=(glibc)
conflicts=("${_pkgname}" "${_pkgname}-svn") makedepends=(doxygen git meson python-sphinx)
provides=("${_pkgname}" "${_pkgname}=${pkgver//.r*/}" "lib${_pkgname}-${pkgver::1}.so") conflicts=($_pkgname $_pkgname-docs)
source=("$_pkgname::git+https://gitlab.com/drobilla/serd.git" provides=($_pkgname "$_pkgname=${pkgver//.r*/}" $_pkgname-docs)
'autowaf::git+https://gitlab.com/drobilla/autowaf.git') source=("$_pkgname::git+https://gitlab.com/drobilla/$_pkgname.git")
md5sums=('SKIP' sha256sums=('SKIP')
'SKIP')
pkgver() { pkgver() {
cd "${srcdir}/${_pkgname}" cd $_pkgname
local ver=$(grep -E "^\s+version: '[0-9]+\.[0-9]+\.[0-9]+'" meson.build | cut -d "'" -f 2)
local ver=`grep "^SERD_VERSION" wscript | cut -d "'" -f 2`
echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
} }
prepare() { build() {
cd "${srcdir}/${_pkgname}" arch-meson $_pkgname $_pkgname-build
meson compile -C $_pkgname-build
git submodule init
git config submodule.waflib.url "${srcdir}/autowaf"
git submodule update
# remove call to local ldconfig
sed -i "/ldconfig/d" wscript
} }
build() { check() {
cd "${srcdir}/${_pkgname}" meson test -C $_pkgname-build
python ./waf configure --prefix=/usr
python waf build $MAKEFLAGS
} }
package() { package() {
cd "$srcdir/$_pkgname" provides=(libserd-0.so)
meson install -C $_pkgname-build --destdir "$pkgdir"
python waf install --destdir="$pkgdir" mv -v "$pkgdir"/usr/share/doc/{serd-0,$pkgname}
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -vDm 644 $_pkgname/COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
install -vDm 644 $_pkgname/{AUTHORS,NEWS,README.md} -t "$pkgdir"/usr/share/doc/$pkgname
} }