# $Id: PKGBUILD 229565 2015-01-19 04:52:45Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=fluxbox
pkgver=1.3.6
pkgrel=1
pkgdesc="A lightweight and highly-configurable window manager"
arch=('i686' 'x86_64')
url="http://www.fluxbox.org"
license=('MIT')
depends=('libxft' 'libxpm' 'libxinerama' 'libxrandr' 'imlib2' 'fribidi')
optdepends=('xorg-xmessage: for using the fbsetbg and fluxbox-generate_menu utilities')
options=('!makeflags')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.xz
        fluxbox.desktop fluxbox.patch)
sha1sums=('2bcf7a02394b01652be05f6b6108a1e67a12afb5'
          'f3f83b8ce84d79c2f8670ef687e0dd89ab0552b8'
          '2718219744cf0f588ce90074a38317699e720ac0')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 -i "${srcdir}/fluxbox.patch"
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --enable-xft --enable-xinerama \
    --enable-imlib2 --enable-nls
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -D -m644 "${srcdir}/fluxbox.desktop" "${pkgdir}/usr/share/xsessions/fluxbox.desktop"
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
