# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-autoar
pkgver=0.2.4
pkgrel=1
pkgdesc="Automatic archives creating and extracting library"
url="https://wiki.gnome.org/TingweiLan/GSoC2013Final"
arch=(x86_64)
license=(LGPL)
depends=(glib2 libarchive gtk3)
makedepends=(intltool git gobject-introspection gtk-doc vala autoconf-archive)
_commit=064493cb0b6dc89871aa5239f46e0d509987faa4  # tags/0.2.4^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-autoar.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
