# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>

pkgname=lxappearance-obconf
pkgver=0.2.4
pkgrel=2
pkgdesc='Plugin for LXAppearance to configure Openbox'
arch=('x86_64')
license=('GPL2')
url='https://lxde.org/'
groups=('lxde')
depends=('lxappearance' 'openbox' 'libobrender.so')
makedepends=('git' 'intltool')
source=(git+https://github.com/lxde/lxappearance-obconf.git#tag=${pkgver})
sha256sums=('63299027fdce3acfc55eb1ae601f4a0ab4b0be0ebe055f21df46d80ff4d3f437')

prepare() {
  cd $pkgname
  autoreconf -fiv
}

build() {
  cd $pkgname
  ./configure --prefix=/usr

  #https://bugzilla.gnome.org/show_bug.cgi?id=656231
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

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