#Packager: George Vlahavas (vlahavas~at~gmail~dot~com)

pkgname=notification-daemon
pkgver=0.5.0
pkgrel=2gv
source=("ftp://ftp.gnome.org/pub/gnome/sources/notification-daemon/0.5/notification-daemon-0.5.0.tar.bz2")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "maintainers")
url=http://www.galago-project.org/about.php
options=('noautodotnew')


slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"notification-daemon (displays passive pop-up notifications)"
"The Desktop Notifications framework provides a standard way of doing"
"passive pop-up notifications on the Linux desktop. These are designed"
"to notify the user of something without interrupting their work with"
"a dialog box that they must close. Passive popups can automatically"
"disappear after a short period of time. as per the Desktop"
"Notifications spec"
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --disable-schemas-install --with-gconf-source="xml::/etc/gconf/gconf.xml.defaults" --disable-static --build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg

	# gconf stuff
        export GCONF_CONFIG_SOURCE="xml::$startdir/pkg/etc/gconf/gconf.xml.defaults"
        if [ -d $startdir/pkg/etc/gconf/schemas ]; then
                install -v -d -m755 $startdir/pkg/etc/gconf/gconf.xml.defaults
                SCHEMAS=$startdir/pkg/etc/gconf/schemas
                for schema in $SCHEMAS/*.schemas; do
                        gconftool-2 --makefile-install-rule $schema
                done
                # Reset / Verify correct permissions
                ( cd $startdir/pkg/etc/gconf ; find . -type d -exec chmod 755 {} \; )
                ( cd $startdir/pkg/etc/gconf ; find . -type f -exec chmod 644 {} \; )
        fi

	sed -i "/^OnlyShowIn=.*/d" $startdir/pkg/usr/share/applications/notification-properties.desktop
	sed -i "/^NoDisplay=.*/d" $startdir/pkg/usr/share/applications/notification-properties.desktop
}