Update to meson build system

This commit is contained in:
Christopher Arndt 2022-07-23 16:58:45 +02:00
parent 9116f39eb9
commit 0626046073
2 changed files with 42 additions and 50 deletions

View file

@ -1,24 +1,31 @@
pkgbase = sord-git pkgbase = sord-git
pkgdesc = Lightweight C library for storing RDF statements in memory (git version) pkgdesc = Lightweight C library for storing RDF statements in memory (git version)
pkgver = 0.16.6.r446.3faa8cc pkgver = 0.16.12.r502.c1cda16
pkgrel = 1 pkgrel = 1
url = http://drobilla.net/software/sord/ url = http://drobilla.net/software/sord/
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
makedepends = serd
depends = glibc
depends = pcre depends = pcre
depends = serd
provides = sord provides = sord
provides = sord=0.16.6 provides = sord=0.16.12
provides = libsord-0.so provides = sord-docs
conflicts = sord conflicts = sord
conflicts = sord-svn conflicts = sord-docs
source = sord::git+https://gitlab.com/drobilla/sord.git source = sord::git+https://gitlab.com/drobilla/sord.git
source = autowaf::git+https://gitlab.com/drobilla/autowaf.git sha256sums = SKIP
md5sums = SKIP
md5sums = SKIP
pkgname = sord-git pkgname = sord-git
depends = glibc
depends = pcre
depends = libserd-0.so
provides = sord
provides = sord=0.16.12
provides = sord-docs
provides = libsord-0.so

View file

@ -1,56 +1,41 @@
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de> # Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
_pkgname=sord _pkgname=sord
pkgname="${_pkgname}-git" pkgname="$_pkgname-git"
pkgver=0.16.6.r446.3faa8cc pkgver=0.16.12.r502.c1cda16
pkgrel=1 pkgrel=1
pkgdesc="Lightweight C library for storing RDF statements in memory (git version)" pkgdesc='Lightweight C library for storing RDF statements in memory (git version)'
arch=('i686' 'x86_64') arch=(i686 x86_64)
url="http://drobilla.net/software/sord/" url='http://drobilla.net/software/sord/'
license=('custom:ISC') license=(ISC)
depends=('pcre' 'serd') depends=(glibc pcre)
makedepends=('git' 'python') makedepends=(doxygen git meson python-sphinx serd)
conflicts=("${_pkgname}" "${_pkgname}-svn") conflicts=($_pkgname $_pkgname-docs)
provides=("${_pkgname}" "${_pkgname}=${pkgver//.r*/}" "lib${_pkgname}-${pkgver::1}.so") provides=($_pkgname "$_pkgname=${pkgver//.r*/}" $_pkgname-docs)
source=("${_pkgname}::git+https://gitlab.com/drobilla/sord.git" source=("$_pkgname::git+https://gitlab.com/drobilla/$_pkgname.git")
'autowaf::git+https://gitlab.com/drobilla/autowaf.git') sha256sums=('SKIP')
md5sums=('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 "^SORD_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() {
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() { build() {
cd "${srcdir}/${_pkgname}" arch-meson $_pkgname $_pkgname-build
meson compile -C $_pkgname-build
python ./waf configure --prefix=/usr --test
python waf build $MAKEFLAGS
} }
check() { check() {
cd "${srcdir}/${_pkgname}" meson test -C $_pkgname-build
python waf test -v
} }
package() { package() {
cd "${srcdir}/${_pkgname}" depends+=(libserd-0.so)
provides+=(libsord-0.so)
python waf install --destdir="$pkgdir" meson install -C $_pkgname-build --destdir "$pkgdir"
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" mv -v "$pkgdir"/usr/share/doc/{sord-0,$pkgname}
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
} }