# Maintainer (arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: durbatuluk <dvdscripter@gmail.org>
# Contributor: Steve Ponsford <sp4d@lavabit.com>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=blackbox
pkgver=0.76
pkgrel=1
pkgrel+=.parabola1
pkgdesc="A window manager for X11"
pkgdesc+=", without nonfree programs on the menu"
url="https://github.com/bbidulock/blackboxwm"
arch=('x86_64')
arch+=('i686' 'armv7h')
depends=('gcc-libs' 'libxft' 'libxext' 'libx11' 'libxt')
replaces=($pkgname-libre)
conflicts=($pkgname-libre)
license=('MIT')
source=($pkgname-$pkgver.tar.gz::"https://github.com/bbidulock/blackboxwm/archive/$pkgver.tar.gz"
        menu)
sha256sums=('dfb7f2a75b359fff3e119e24baa89cbd381fd9307b81cbd20785f760aa7eb671'
            'f7daa30ed0360ece14d14ddece602e1161b5dfc84098411531e4e02fa20ddc71')

prepare() {
  cd blackboxwm-$pkgver
  sed -e '/AC_DISABLE_SHARED/d' -i configure.ac # Build shared library
  ./autogen.sh
}

build() {
  cd blackboxwm-$pkgver
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

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