# Template file for 'muffin'
pkgname=muffin
version=1.8.0
revision=1
hostmakedepends="which automake gettext-devel pkg-config intltool
 gnome-doc-utils gnome-common>=3.7.4 gobject-introspection>=1.36.0_2"
makedepends="clutter-devel>=1.14 GConf-devel libcanberra-devel libXxf86vm-devel
 libSM-devel startup-notification-devel gsettings-desktop-schemas-devel>=3.8 zenity"
short_desc="The Cinnamon window manager"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-3"
homepage="http://github.com/linuxmint/muffin.git"

nofetch=yes
noextract=yes

do_fetch() {
	local url="git://github.com/linuxmint/muffin.git"
	msg_normal "Fetching source from $url ...\n"
	git clone -b ${version} $url ${pkgname}-${version}
}

pre_configure() {
	./autogen.sh
}

do_configure() {
	./configure ${configure_args} --disable-static
}

do_build() {
	make ${makejobs}
}

do_install() {
	make DESTDIR=${DESTDIR} install
}

libmuffin_package() {
	short_desc+=" - runtime library"
	pkg_install() {
		vmove "usr/lib/*.so*"
		vmove "usr/lib/muffin/*.typelib"
	}
}

libmuffin-devel_package() {
	depends="libmuffin-${version}_${revision}"
	short_desci+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/muffin/*.gir"
	}
}

muffin_package() {
	depends="zenity desktop-file-utils gsettings-desktop-schemas>=3.6.0"
	pkg_install() {
		vmove all
	}
}
