archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gnome-software / trunk / PKGBUILD
blobb46ff1fd6aadeda3d01968e0d82eb72be7ac252a
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Fabian Bornschein <fabiscafe-cat-mailbox-dog-org>
3 # Contributor: Jan de Groot <jgc@archlinux.org>
4 # Contributor: Yosef Or Boczko <yoseforb@gnome.org>
6 pkgbase=gnome-software
7 pkgname=(gnome-software gnome-software-packagekit-plugin)
8 pkgver=42.2
9 pkgrel=1
10 pkgdesc="GNOME Software Tools"
11 url="https://wiki.gnome.org/Apps/Software/"
12 arch=(x86_64)
13 license=(GPL)
14 makedepends=(appstream gsettings-desktop-schemas libpackagekit-glib flatpak
15              fwupd docbook-xsl git gobject-introspection gtk-doc meson
16              valgrind gnome-online-accounts libxmlb malcontent gtk4 libadwaita
17              libsysprof-capture)
18 options=(debug)
19 _commit=09cafc9ef92587b3d3326d3fa751328c0a28dcf9  # tags/42.2^0
20 source=("git+https://gitlab.gnome.org/GNOME/gnome-software.git#commit=$_commit")
21 sha256sums=('SKIP')
23 pkgver() {
24   cd $pkgbase
25   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
28 prepare() {
29   cd $pkgbase
32 build() {
33   # Ensure static library is non-LTO compatible
34   CFLAGS+=" -ffat-lto-objects"
36   # Building with soup3 requires flatpak to be built with soup3
37   arch-meson $pkgbase build -D soup2=true
38   meson compile -C build
41 check() {
42   meson test -C build --print-errorlogs
45 _pick() {
46   local p="$1" f d; shift
47   for f; do
48     d="$srcdir/$p/${f#$pkgdir/}"
49     mkdir -p "$(dirname "$d")"
50     mv "$f" "$d"
51     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
52   done
55 package_gnome-software() {
56   groups=(gnome)
57   depends=(libxmlb gsettings-desktop-schemas libpackagekit-glib gtk4 libadwaita
58            gnome-online-accounts appstream libsysprof-capture)
59   optdepends=('flatpak: Flatpak support plugin'
60               'fwupd: fwupd support plugin'
61               'malcontent: Parental control plugin')
63   meson install -C build --destdir "$pkgdir"
65   local pkglibdir="$pkgdir/usr/lib/gnome-software"
66   _pick packagekit-plugin "$pkglibdir"/plugins-*/libgs_plugin_packagekit*.so
69 package_gnome-software-packagekit-plugin() {
70   pkgdesc="PackageKit support plugin for GNOME Software"
71   depends=(archlinux-appstream-data gnome-software packagekit)
72   mv packagekit-plugin/* "$pkgdir"