### this file is sourced not run
PKGVER=1.4.1
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=dunst-$PKGVER.tar.gz
MD5SUM=ea22e152ae40a1fc8e0e4da5b762ad20
SRC_URL=https://github.com/dunst-project/dunst/archive/v$PKGVER.tar.gz
BUNDLE=

SLACKREQ='dbus glib' # up to 1.3.2 libxdg-basedir build-time only
SLACKDESC="dunst: dunst $PKGVER (Desktop notification server)
dunst:  
dunst: Dunst is a lightweight replacement for the notification-daemons
dunst: provided by most desktop environments. It's very customizable, doesn't
dunst: depend on any toolkits and therefore fits in those windowmanager
dunst: centric setups we all love to customize to perfection.
dunst: 
dunst: 
dunst: 
dunst: 
dunst: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package

### build
pkg_build() {
	cd /tmp/dunst*

	# patch to build with older libnotify
	sed -i -e '/notify_notification_new/ s|icon)|icon,NULL)|' dunstify.c &&

	patch -i /tmp/pkg/dunstify-action-label.patch &&

	# build
	make $MAKEFLAGS PREFIX=/usr &&
	make $MAKEFLAGS PREFIX=/usr dunstify &&
	make PREFIX=/usr install &&
	pkg_build_slackdesc &&

	# patch default dunstrc to fatdog's liking and system location
	( cd /usr/share/dunst && patch -i /tmp/pkg/dunstrc-fatdog.patch ) &&
	install -dm755 /etc/xdg/dunst &&
	install -m644 /usr/share/dunst/dunstrc /etc/xdg/dunst/dunstrc &&
	rm /usr/share/dunst/dunstrc && # keeping both versions around is confusing

	install -m755 dunstify /usr/bin/dunstify &&

	install -dm755 /usr/share/dunst/examples &&
	install -m644 -t /usr/share/dunst/examples /tmp/pkg/examples/* &&
	true
}

#vim: ft=sh
