# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libproxy
pkgver=0.4.11
pkgrel=4
pkgdesc="A library that provides automatic proxy configuration management"
arch=(i686 x86_64)
license=('LGPL')
depends=('gcc-libs')
optdepends=('perl: Perl bindings'
            'python2: Python bindings'
            'glib2: gsettings configuration module')
makedepends=('cmake' 'python2' 'perl')
url="http://libproxy.googlecode.com"
source=(http://libproxy.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
md5sums=('3cd1ae2a4abecf44b3f24d6639d2cd84')

build() {
  mkdir build
  cd build
  cmake ../${pkgname}-${pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIBEXEC_INSTALL_DIR=/usr/lib/libproxy \
    -DCMAKE_SKIP_RPATH=ON \
    -DPERL_VENDORINSTALL=yes \
    -DCMAKE_BUILD_TYPE=Release \
    -DWITH_WEBKIT=OFF \
    -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
    -DCMAKE_C_FLAGS="${CFLAGS}" \
    -DWITH_KDE4=OFF \
    -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2
  make
}

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