# Maintainer: Brad Fanella <cesura@archlinux.org>
# Contributor: Martin Wimpress <code@flexion.org>

pkgname=python-caja
pkgver=1.26.0
pkgrel=1
pkgdesc="Python binding for Caja, to allow Caja property page and menu item extensions to be written in Python"
url="https://mate-desktop.org"
arch=('x86_64')
license=('GPL')
depends=('caja' 'python-gobject')
makedepends=('intltool')
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/python-caja-${pkgver}.tar.xz")
sha256sums=('21f771efc756fcb183a2fc6dcbbf3c55220290c62a77522113e68c7883663fa0')

prepare() {
    	cd "python-caja-${pkgver}"
}

build() {
    	cd "python-caja-${pkgver}"
    	PYTHON=python3 ./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 "python-caja-${pkgver}"
    	make DESTDIR="${pkgdir}" install
}
