# $Id: PKGBUILD 108196 2014-03-24 15:12:46Z flexiondotorg $
# Maintainer : Martin Wimpress <code@flexion.org>

pkgname=caja
pkgver=1.8.0
pkgrel=2
pkgdesc="The MATE shell and file manager"
url="http://mate-desktop.org"
arch=('i686' 'x86_64')
license=('GPL')
depends=('dbus' 'desktop-file-utils' 'exempi' 'gtk2' 'gvfs' 'libexif' 'libunique'
         'libxt' 'mate-desktop' 'mate-icon-theme' 'startup-notification')
makedepends=('gobject-introspection' 'mate-common' 'pangox-compat')
optdepends=('gstreamer0.10-good-plugins: automatic media playback when mouseover'
            'gvfs-smb: To connect to Samba/Windows shares')
replaces=('mate-file-manager')
provides=('mate-file-manager')
conflicts=('mate-file-manager')
groups=('mate')
source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz"
        "https://github.com/mate-desktop/caja/commit/4f1e756e08e61840eb9a52de4debee30006ea31e.diff")
sha1sums=('3bfb52dceae4fa7b39eb26099b07326fa4197f3f'
          'a8ae80fb181c999deeea5d597d7a8f7a174e62c6')
install=${pkgname}.install

prepare() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    patch -Np1 -i "${srcdir}/4f1e756e08e61840eb9a52de4debee30006ea31e.diff"
}

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    ./configure \
        --prefix=/usr \
        --libexecdir=/usr/lib/${pkgname} \
        --with-gtk=2.0 \
        --enable-unique \
        --enable-introspection \
        --disable-static \
        --disable-update-mimedb
    make
}

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