[arch-commits] Commit in librest/trunk (PKGBUILD)

Jan Steffens heftig at gemini.archlinux.org
Sun Aug 14 00:36:07 UTC 2022


    Date: Sunday, August 14, 2022 @ 00:36:07
  Author: heftig
Revision: 452690

0.9.1-1

Modified:
  librest/trunk/PKGBUILD

----------+
 PKGBUILD |   40 ++++++++++++++++++++++++++++++----------
 1 file changed, 30 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-14 00:27:38 UTC (rev 452689)
+++ PKGBUILD	2022-08-14 00:36:07 UTC (rev 452690)
@@ -1,16 +1,18 @@
 # Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
 
 pkgbase=librest
-pkgname=(librest librest-docs)
-pkgver=0.9.0
+pkgname=(librest librest-docs librest-demos)
+pkgver=0.9.1
 pkgrel=1
 pkgdesc="Library for accessing RESTful web services"
 url="https://gitlab.gnome.org/GNOME/librest"
 arch=(x86_64)
-license=(LGPL2.1)
+license=(LGPL)
 depends=(glib2 libxml2 libsoup3 json-glib)
-makedepends=(gobject-introspection git meson gi-docgen vala)
-_commit=85bd00adfa6e06d3426ce7c9007e68e62f51be14  # tags/0.9.0^0
+makedepends=(gobject-introspection git meson gi-docgen vala libadwaita
+             gtksourceview5)
+options=(debug)
+_commit=aa9e968e381ede159414c6338da24d61ad0b5d8b  # tags/0.9.1^0
 source=("git+https://gitlab.gnome.org/GNOME/librest.git#commit=$_commit")
 sha256sums=('SKIP')
 
@@ -21,11 +23,10 @@
 
 prepare() {
   cd librest
-  git tag -d 1.0.0 # Fixup tags
 }
 
 build() {
-  arch-meson librest build -D soup2=false
+  arch-meson librest build
   meson compile -C build
 }
 
@@ -33,6 +34,16 @@
   meson test -C build --print-errorlogs
 }
 
+_pick() {
+  local p="$1" f d; shift
+  for f; do
+    d="$srcdir/$p/${f#$pkgdir/}"
+    mkdir -p "$(dirname "$d")"
+    mv "$f" "$d"
+    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+  done
+}
+
 package_librest() {
   depends+=(libg{lib,object,io}-2.0.so libxml2.so libsoup-3.0.so
             libjson-glib-1.0.so)
@@ -40,15 +51,24 @@
 
   meson install -C build --destdir "$pkgdir"
 
-  mkdir -p doc/usr/share
-  mv {"$pkgdir",doc}/usr/share/doc
+  cd "$pkgdir"
+
+  _pick docs usr/share/doc
+
+  _pick demo usr/bin/librest-demo
+  _pick demo usr/share/applications/org.gnome.RestDemo.desktop
 }
 
 package_librest-docs() {
   pkgdesc+=" (documentation)"
   depends=()
+  mv docs/* "$pkgdir"
+}
 
-  mv doc/* "$pkgdir"
+package_librest-demos() {
+  pkgdesc+=" (demo applications)"
+  depends=(librest libadwaita gtksourceview5)
+  mv demo/* "$pkgdir"
 }
 
 # vim:set sw=2 et:



More information about the arch-commits mailing list