Files
2025-06-22 20:39:04 -05:00

77 lines
2.3 KiB
Bash

# Maintainer: Jesus E. <heckyel@riseup.net>
pkgbase=gobject-introspection
pkgname=(gobject-introspection gobject-introspection-runtime)
pkgver=1.66.1
_debver=1.66.1
_debrel=1
pkgrel=3
pkgdesc="Introspection system for GObject-based libraries"
url="https://wiki.gnome.org/Projects/GObjectIntrospection"
arch=(i686 x86_64)
license=(GPL-2 LGPL-2)
depends=(python-mako python-markdown)
makedepends=(cairo python-sphinx meson glib2=2.66.2 quilt)
options=(!emptydirs)
source=(https://download.gnome.org/sources/$pkgbase/${pkgver:0:4}/$pkgbase-$pkgver.tar.xz
https://deb.debian.org/debian/pool/main/g/gobject-introspection/gobject-introspection_$_debver-$_debrel.debian.tar.xz)
sha512sums=('ea1e20cd94ff8af3572f417f35e96648ffc3e94a91d4e4c81adf99bb0f408ac21ecf40990f9dbd5f2e0f4e83360286ca5db88dbc45bd59289596a324acf7df3d'
'88ae16492150eb65d1c14f7a1e2bcc2a5ef3e9ef1487ebc9ffa03cd5d65df58243ddcb35c69cb411e0caf8e7b8a137a8b2d8c5254ab1756486b7492e34b31e85')
validpgpkeys=('923B7025EE03C1C59F42684CF0942E894B2EAFA0') # Philip Withnall <philip@tecnocode.co.uk>
prepare() {
cd $pkgbase-$pkgver
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
# Doesn't apply and seems unimportant
rm -v debian/patches/debian/multiarch_compat.patch || true
quilt push -av
fi
}
build() {
hyperbola-meson $pkgbase-$pkgver build \
-D gtk_doc=false
meson compile -C build
}
check() {
meson test -C build
}
package_gobject-introspection() {
depends+=("gobject-introspection-runtime=$pkgver-$pkgrel")
DESTDIR="$pkgdir" meson install -C build
python -m compileall -d /usr/lib/$pkgbase "$pkgdir/usr/lib/$pkgbase"
python -O -m compileall -d /usr/lib/$pkgbase "$pkgdir/usr/lib/$pkgbase"
for i in COPYING{,.GPL,.LGPL}; do
install -Dm644 $pkgbase-$pkgver/$i $pkgdir/usr/share/licenses/$pkgname/$i
done
### Split runtime
mkdir -p "$srcdir/runtime/lib"
mv "$pkgdir"/usr/lib/{lib*,girepository-*} "$srcdir/runtime/lib"
}
package_gobject-introspection-runtime() {
pkgdesc+=" (runtime library)"
depends=(glib2)
mv "$srcdir/runtime" "$pkgdir/usr"
for i in COPYING{,.GPL,.LGPL}; do
install -Dm644 $pkgbase-$pkgver/$i $pkgdir/usr/share/licenses/$pkgname/$i
done
}