git » appstream-glib.git » main » tree

[main] / PKGBUILD

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=appstream-glib
pkgver=0.8.2
pkgrel=4
pkgdesc="Objects and methods for reading and writing AppStream metadata"
url="https://people.freedesktop.org/~hughsient/appstream-glib/"
arch=(armv7h 'aarch64')
license=(LGPL-2.1-or-later)
depends=(
  curl
  gtk3
  libstemmer
  libyaml
  pacman
  json-glib
)
makedepends=(
  git
  gobject-introspection
  gperf
  gtk-doc
  meson
)
provides=(
  appdata-tools
  libappstream-glib.so
)
conflicts=(appdata-tools)
replaces=(appdata-tools)
_commit=02c8ad3b66075d9b2c9094dff816cd44839a4b45  # tags/appstream_glib_0_8_2^0
source=(
  "git+https://github.com/hughsie/appstream-glib#commit=$_commit"
  as-yaml-support-application-yaml-mimetype.patch
)
b2sums=('SKIP'
        '63c82bb52fbe1aeab2aeb33147d99690a81a0528f9438c934a5fe7295581145b385e55b7d67c98a43e21cdb529883eaed750e2b4d842c56e21d8faf583f57580')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^appstream_glib_//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname

  # Unbreak tests
  # https://gitlab.alpinelinux.org/alpine/aports/-/commit/8538b3b2f0e0eae7af5e6c38827c907d483efd6c
  git apply -3 ../as-yaml-support-application-yaml-mimetype.patch
}

build() {
  local meson_options=(
    -D alpm=true
    -D gtk-doc=true
    -D rpm=false
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

#check() {
#  meson test -C build --print-errorlogs
#}

package() {
  meson install -C build --destdir "$pkgdir"
  rm -r "$pkgdir/usr/share/installed-tests"
}

# vim:set sw=2 sts=-1 et: