pkgname=libmate
pkgver=1.1.3
pkgrel=1
pkgdesc="Common libraries for MATE"
arch=('i686' 'x86_64')
license=('LGPL')
depends=('ttf-freefont' 'mate-conf')
makedepends=('mate-doc-utils' 'mate-common' 'mate-corba' 'mate-conf' 'libmatecomponent' 'mate-mime-data' 'gvfs' 'mate-vfs') #  'libcanberra'
options=('!emptydirs' '!libtool')
url="http://matsusoft.com.ar/projects/mate/"
groups=('mate')
install=libmate.install

# mirrors
# http://cptl.org/mate/${pkgname}.tar.gz
# http://hax0r.se/mate/${pkgname}.tar.gz
# http://matsusoft.com.ar/uploads/gnu-linux/mate/${pkgname}.tar.gz
# http://matsusoft.com.ar/projects/mate/source/${pkgname}.tar.gz

source=()
sha256sums=()

build() {
	cd "${srcdir}/../../../"

    # Optional Features:
    #    --enable-esd            Enable ESounD (default=no)
    #    --enable-canberra       Enable canberra (default=yes)
    ./autogen.sh \
        --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        --disable-static \
        --libexecdir=/usr/lib/libmate \
        --disable-canberra \
        --disable-schemas-install || return 1

    make || return 1
}

package() {
	cd "${srcdir}/../../../"

    make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1  DESTDIR="${pkgdir}" install || return 1

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