#!/bin/bash

# fill it
pkgname=libmate
pkgver=1.1.3
pkgrel=1
pkgdesc="Common libraries for MATE"
depends=('libavahi-client3' 'libavahi-common3' 'libavahi-glib1' 'libc6'
         'libdbus-1-3' 'libdbus-glib-1-2' 'libglib2.0-0' 'libmatecomponent'
         'libpopt0' 'libselinux1' 'libxml2' 'mate-conf' 'mate-corba' 'mate-vfs')
makedepends=('mate-doc-utils' 'mate-common' 'mate-corba' 'mate-conf'
             'libmatecomponent' 'mate-mime-data' 'libglib2.0-dev' 'mate-vfs'
             'libcanberra-dev' 'libpopt-dev')

# editar esta funcion!
build() {
	cd $pkgsrc
	# descomprimir
	tar xvzf download
	# entramos a la carpeta
	cd ${pkgname}

	./configure --prefix=/usr --sysconfdir=/etc \
		--localstatedir=/var --disable-static \
		--libexecdir=/usr/lib/libmate \
		--disable-canberra \
		--disable-schemas-install || return 1

	make || return 1

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

	# esto es para mateconf
	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
}

# esto incluye la parte que se repite en la mayoria de los builds
. /usr/share/mate-doc-utils/mate-debian.sh
