# Maintainer (Arch): Brad Fanella <cesura@archlinux.org>
# Contributor (Arch): Martin Wimpress <code@flexion.org>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=engrampa
pkgver=1.24.0
pkgrel=1
pkgrel+=.parabola1
pkgdesc="Archive manipulator for MATE"
pkgdesc+=", without nonfree unace and unrar recommendation"
url="https://mate-desktop.org"
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('GPL')
depends=('gtk3' 'gzip' 'gettext' 'libarchive' 'tar' 'unzip' 'zip')
makedepends=('caja' 'itstool' 'python')
optdepends=('caja: Caja support'
	    'p7zip: 7Z and ARJ archive support'
	    'brotli: Brotli compression support')
groups=('mate-extra')
conflicts=("engrampa-gtk3")
replaces=("engrampa-gtk3")
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('d415f486edc9a5474024b3928ff1127ba4534a703a60993a3912fffcf0988a8d')

build() {
    	cd "${pkgname}-${pkgver}"
    	./configure \
        	--prefix=/usr \
        	--libexecdir=/usr/lib/${pkgname} \
        	--disable-packagekit

    	#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}-${pkgver}"
    	make DESTDIR="${pkgdir}" install
}
