# $Id: PKGBUILD 124111 2014-12-19 18:38:06Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=buoh
pkgver=0.8.2
pkgrel=8
pkgdesc="Online strips comics reader for GNOME"
arch=('i686' 'x86_64')
url="http://buoh.steve-o.org/"
license=('GPL')
depends=('gtk3' 'libsoup' 'gconf')
makedepends=('intltool' 'gnome-common')
options=('!emptydirs')
install=buoh.install
source=("http://buoh.steve-o.org/downloads/$pkgname-$pkgver.tar.bz2"
        buoh-libsoup24.patch
        gtk3-port.patch
        hide-help.patch)
md5sums=('50474a8712ad20ab36d8f8058a4647fb'
         'c44f0e1828492a5d7d8efee764558fb4'
         '7647016612381fd6bbfd8862d8314039'
         '14859095081954a3902f741a4fd673c7')

prepare() {
  cd $pkgname-$pkgver

  # Port to libsoup 2.4
  patch -Np1 -i ../buoh-libsoup24.patch

  # Port to gtk3
  patch -Np1 -i ../gtk3-port.patch

  # Hide unimplemented Help menuitem
  patch -Np1 -i ../hide-help.patch

  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
              --disable-schemas-install \
              --with-gconf-schema-file-dir=/usr/share/gconf/schemas
  make AM_CFLAGS=-lxml2
}

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