# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=brasero
pkgver=3.12.3
pkgrel=1
pkgdesc="CD/DVD mastering tool"
url="https://wiki.gnome.org/Apps/Brasero"
arch=(x86_64)
license=(GPL)
depends=(gtk3 gst-plugins-good totem-plparser cdrtools cdrdao shared-mime-info
         libcanberra dvd+rw-tools dconf libsm libnotify gvfs tracker3)
makedepends=(gtk-doc yelp-tools gnome-common intltool libburn libisofs
             libnautilus-extension gobject-introspection itstool docbook-xsl
             git)
optdepends=('libburn: alternative back-end'
            'libisofs: libburn back-end'
            'dvdauthor: video project'
            'vcdimager: video project')
_commit=2e516545e548d203496ec7f37ad2d7142f5ff4fb  # tags/3.12.3^0
source=("git+https://gitlab.gnome.org/GNOME/brasero.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 \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-caches \
    --disable-search \
    --disable-schemas-compile \
    --enable-compile-warnings=minimum \
    --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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

