pkgname=mate-vfs
pkgver=1.1.0
pkgrel=1
pkgdesc="The MATE Virtual File System"
arch=(i686 x86_64)
license=('LGPL')
depends=('mate-conf' 'bzip2' 'smbclient' 'mate-mime-data') #  'krb5' 'avahi' 'gnutls' 'fam'
makedepends=('pkgconfig' 'intltool' 'gtk-doc' 'mate-common')
options=('!emptydirs' '!libtool')
url="http://matsusoft.com.ar/projects/mate/"
groups=('mate')
install=mate-vfs.install
source=()
sha256sums=()

build() {
	cd "${srcdir}/../../../"
    #Fix build with new gnutls
    #patch -Np1 -i "${srcdir}/gnutls-config.patch"

    ./autogen.sh \
        --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        --disable-static \
        --libexecdir=/usr/lib/${pkgname} \
        --disable-samba \
        --disable-hal \
        --disable-avahi \
        --disable-howl \
        --disable-openssl || return 1
        #--disable-openssl --enable-gnutls
    make || return 1
}

package() {
	cd "${srcdir}/../../../"
    make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install

    install -d -m755 "${pkgdir}/usr/share/mateconf/schemas"
    mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas
    rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas
}
