diff options
author | Popolon | 2025-01-25 01:01:20 +0100 |
---|---|---|
committer | Popolon | 2025-01-25 01:01:20 +0100 |
commit | 0d2b59a87f28b5767cd5f57d1ac1ef5a65728985 (patch) | |
tree | 81d1dcdeca2f41e31ec5d8c154b669062c011b13 /PKGBUILD | |
parent | 51d4e1a102fcfa9086ff4209d5fa6c97690adbec (diff) | |
download | aur-0d2b59a87f28b5767cd5f57d1ac1ef5a65728985.tar.gz |
add a splitted package examples, with precompiled examples and sources
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 33 insertions, 2 deletions
@@ -1,8 +1,9 @@ # Maintainer: Popolon <Popolon aL popolon.org> +pkgbase=thorvg pkgname=thorvg pkgver=0.15.9 -pkgrel=1 +pkgrel=2 pkgdesc="An open-source, lightweight, and portable library designed for rendering vector-based scenes and animations, including SVG and Lottie formats" arch=('x86_64' 'aarch64' 'riscv32' 'riscv64' 'i386' 'i686' 'armv7h' 'armv6h' 'loong64' 'powerpc' 'powerpc64le' 'powerpc64') url="https://www.thorvg.org/" @@ -26,8 +27,38 @@ build() { ninja -C builddir } -package() { +_package() { + pkgdesc="An open-source, lightweight, and portable library designed for rendering vector-based scenes and animations, including SVG and Lottie formats" cd ${pkgname}-${pkgver} install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/ DESTDIR="$pkgdir/" ninja -C builddir install } + +_package-examples() { +depends=('sdl2') + + pkgdesc="Examples for ${pkgbase} ${pkgdesc}" + cd ${pkgbase}-${pkgver} + meson setup builddir --prefix=/usr \ + -Dexamples=true \ + -Dengines=all \ + -Dloaders=all \ + -Dsavers=all \ + -Dtools=all + ninja -C builddir + + mkdir -p ${pkgdir}/usr/share/doc/${pkgbase} + cp -a builddir/examples ${pkgdir}/usr/share/doc/${pkgbase}/ + cp -a examples ${pkgdir}/usr/share/doc/${pkgbase}/ +} + +pkgname=( + "${pkgbase}" + "${pkgbase}-examples" +) +for _p in "${pkgname[@]}"; do + eval "package_$_p() { + $(declare -f "_package${_p#$pkgbase}") + _package${_p#$pkgbase} + }" +done |