# $Id: PKGBUILD 172395 2016-04-28 09:15:47Z eworm $
# Maintainer (Arch):  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor (Arch): IgnorantGuru http://igurublog.wordpress.com/contact-ignorantguru/
# Contributor (Arch): ridikulus_rat <the.ridikulus.rat@gmail.com>
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Edison Ibañez <arkhan.xxx@gmail.com>

pkgname=spacefm
pkgver=1.0.5
pkgrel=2.parabola1
pkgdesc='Multi-panel tabbed file manager, with unar support'
arch=('i686' 'x86_64' 'armv7h')
url='http://ignorantguru.github.com/spacefm/'
license=('GPL3')
depends=('gtk3' 'desktop-file-utils' 'startup-notification' 'ffmpegthumbnailer' 'unar')
makedepends=('intltool' 'gettext')
optdepends=('lsof: device processes'
            'wget: plugin download'
            'gksu: perform as root functionality'
            'udevil: mount as non-root user and mount networks'
            'udisks2: mount as non-root user')
replaces=(${pkgname}-libre)
conflicts=(${pkgname}-libre)
source=($pkgname-$pkgver.tar.gz::https://github.com/IgnorantGuru/spacefm/archive/$pkgver.tar.gz
        libre.patch)
md5sums=('634763f4d3886a00088e06a4295982b2'
         '66cc35023050ff6664bf14b1073700e2')

prepare() {
  cd $pkgname-$pkgver
  # replace nonfree unrar with unar support
  patch -Np1 -i $srcdir/libre.patch
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --disable-pixmaps
  make
}

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