# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Jérémie Astor <astor.jeremie@wanadoo.fr>
pkgname=xombrero-git
pkgver=20121219
pkgrel=1
pkgdesc="minimalist web browser"
arch=('i686' 'x86_64')
url="http://opensource.conformal.com/wiki/xombrero"
license=('custom:ISC')
depends=('webkitgtk3' 'libbsd' 'desktop-file-utils')
makedepends=('git')
provides=('xombrero')
conflicts=('xxxterm' 'xombrero' 'xombrero3')
_gitroot=git://opensource.conformal.com/xombrero.git
_gitname=xombrero
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [[ -d "$srcdir/$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone --depth 1 "$_gitroot"
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
cd "$srcdir/$_gitname"
sed -i 's|/etc/ssl/cert.pem|/etc/ssl/certs/ca-certificates.crt|' xombrero.conf
sed -i 's|https://www.cyphertite.com|http://archlinux.org|' xombrero.{c,conf}
sed -i 's|/usr/local|/usr|' xombrero.{h,conf}
cd "linux"
sed -i 's|LIBS= gtk+-2.0|& javascriptcoregtk-1.0|' Makefile
sed -i 's/gnutls/& libbsd/' Makefile
make javascript.h
make PREFIX="/usr"
}
package() {
cd "$srcdir/$_gitname/"
make PREFIX="/usr" DESTDIR="$pkgdir" install -C linux GTK-VERSION=gtk3
install -Dm644 xombrero.conf "$pkgdir/etc/xombrero.conf"
}