git » appstream.git » main » tree

[main] / PKGBUILD

# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Jameson Pugh <imntreal@gmail.com>
# Contributor: Tim Jester-Pfadt <t.jp<at>gmx.de>

pkgbase=appstream
pkgname=(appstream
#        appstream-qt5
#         appstream-qt
)
pkgver=1.0.3
pkgrel=1
pkgdesc='Provides a standard for creating app stores across distributions'
arch=(armv7h)
url='https://distributions.freedesktop.org/wiki/AppStream'
license=(LGPL-2.1-or-later)
depends=(cairo
         curl
         fontconfig
         freetype2
         gcc-libs
         gdk-pixbuf2
         glib2
         glibc
         librsvg
         libstemmer
         libxml2
         libxmlb
         libyaml
         pango
         systemd-libs
         zstd)
makedepends=(gi-docgen
             git
             gobject-introspection
             gperf
             itstool
             meson
#             qt5-tools
#             qt6-tools
             vala
             xmlto)
source=(git+https://github.com/ximion/appstream#tag=v$pkgver?signed
        update-appstream-cache.hook)
sha256sums=('2cab23b2cb57c5598aea4d99e657e20fbb806d8225aa4a201bf662e9fb1e4a63'
            'edc632e4a76ebe5efc76a56fe5f797e5c981cca6f2f0111c7ce0170d1330c788')
validpgpkeys=(D33A3F0CA16B0ACC51A60738494C8A5FBF4DECEB) # Matthias Klumpp <matthias@tenstral.net>

build() {
  meson build appstream \
    --prefix=/usr \
    -Dqt=false \
    -Dvapi=true \
    -Dcompose=true
#    -Dqt-versions=5,6 \

  meson compile -C build
}

package_appstream() {
  meson install --destdir "$pkgdir" -C build

# provided by -qt subpackage
  rm -rf "$pkgdir"/usr/{include/AppStreamQt{,5},lib/cmake,lib/libAppStreamQt{,5}.*}

  install -Dm644 update-appstream-cache.hook "$pkgdir"/usr/share/libalpm/hooks/90-update-appstream-cache.hook
}

package_appstream-qt5() {
  pkgdesc='Qt5 interface for AppStream'
  depends=(appstream
           gcc-libs
           glib2
           glibc
           qt5-base)
  conflicts=('appstream-qt<1')
  replaces=('appstream-qt<1')

  meson install --destdir "$pkgdir" -C build

# provided by appstream
  rm -r "$pkgdir"/usr/{bin,include/appstream{,-compose},lib/{appstreamcli-compose,girepository-1.0,libappstream*,pkgconfig},share}
# provided by appstream-qt
  rm -r "$pkgdir"/usr/{include/AppStreamQt,lib/{libAppStreamQt.so*,cmake/AppStreamQt}}
}

package_appstream-qt() {
  pkgdesc='Qt6 interface for AppStream'
  depends=(appstream
           gcc-libs
           glib2
           glibc
           qt6-base)

  meson install --destdir "$pkgdir" -C build

# provided by appstream
  rm -r "$pkgdir"/usr/{bin,include/appstream{,-compose},lib/{appstreamcli-compose,girepository-1.0,libappstream*,pkgconfig},share}
# provided by appstream-qt5
  rm -r "$pkgdir"/usr/{include/AppStreamQt5,lib/{libAppStreamQt5.so*,cmake/AppStreamQt5}}
}