# Maintainer: Judd Vinet <jvinet@zeroflux.org>
pkgname=enlightenment
pkgver=0.16.8.9
pkgrel=2
pkgdesc="A fast, flexible, and very extensible Window Manager"
arch=('i686' 'x86_64')
url="http://www.enlightenment.org"
license=('BSD')
depends=('freetype2' 'libxinerama' 'libxft' 'libsm' 'libxxf86vm' 'imlib2' 'perl' 'libxcomposite' 'libxdamage' 'libxrandr')
makedepends=('xbitmaps')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/e16-$pkgver.tar.gz \
  http://downloads.sourceforge.net/sourceforge/$pkgname/e16-theme-BrushedMetal-Tigert-0.16.8.tar.gz \
  e_gen_menu.patch starting.patch)

build() {
  cd $startdir/src/e16-$pkgver
  patch -Np0 -i $startdir/src/e_gen_menu.patch || return 1
  patch -Np0 -i $startdir/src/starting.patch || return 1
  ./configure --prefix=/usr --enable-fsstd --disable-sound --sysconfdir=/etc  --disable-nls
  make || return 1
  make DESTDIR=$startdir/pkg install
  rm -rf $startdir/pkg/opt/share
  install -D -m644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
  for theme in BrushedMetal-Tigert; do
    cd $startdir/src/e16-theme-$theme-0.16.8
    ./configure --prefix=/usr --enable-fsstd
    make DESTDIR=$startdir/pkg install
  done
  chown -R root.root $startdir/pkg/usr/share/*
}