1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
3 # Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
6 pkgname=(libgit2-glib libgit2-glib-docs)
7 _commit=274f81c596b7c248407c14d4a7d58d72fb12cedc # tags/v1.1.0^{}
10 pkgdesc="GLib wrapper for libgit2"
11 url="https://gitlab.gnome.org/GNOME/libgit2-glib"
14 makedepends=(gi-docgen git glib2 gobject-introspection gtk-doc libgit2 meson
16 source=(git+$url.git#commit=$_commit)
20 local p="$1" f d; shift
22 d="$srcdir/$p/${f#$pkgdir/}"
23 mkdir -p "$(dirname "$d")"
25 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
31 git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/v//g;s/-/./g'
35 arch-meson $pkgname build -D gtk_doc=true
36 meson compile -C build
40 meson test -C build --print-errorlogs
43 package_libgit2-glib() {
45 glib2 libgio-2.0.so libglib-2.0.so libgobject-2.0.so
50 'libgit2-glib-docs: for developer documentation'
51 'python-gobject: for Python integration'
53 provides=(libgit2-glib-1.0.so)
55 meson install -C build --destdir "$pkgdir"
58 _pick libgit2-glib-docs usr/share/gtk-doc
61 # strip $pkgdir from embedded paths:
62 python -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
63 python -O -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
65 install -vDm 644 $pkgname/{AUTHORS,ChangeLog,NEWS,README} -t "$pkgdir/usr/share/doc/$pkgname/"
68 package_libgit2-glib-docs() {
69 pkgdesc+=" - documentation"
71 mv -v $pkgname/* "$pkgdir"