# Maintainer: 4javier <4javiereg4 at gmail dot com>
pkgname=notify-osd-customizable
_realname=notify-osd
pkgver=0.9.32
pkgrel=1
pkgdesc="daemon that displays passive pop-up notifications, with leolik patch added"
arch=(i686 x86_64)
url="https://launchpad.net/notify-osd"
license=('GPL')
groups=()
depends=('libwnck3' 'libnotify>=0.7.0' 'dbus-glib>=0.76' 'dconf' 'gsettings-desktop-schemas')
optdepends=('notifyconf:gui to customize notifies appearence')
makedepends=('pkgconfig' 'libnotify' 'gnome-common')
provides=('notification-daemon' 'notify-osd')
conflicts=('notification-daemon' 'notify-osd')
install=$pkgname.install
source=(https://launchpad.net/~leolik/+archive/leolik/+files/${_realname}_${pkgver}-0ubuntu3-leolik~ppa1.tar.gz notify-osd)
md5sums=('b6fdccc6f16ec8ddb7b8c6d6258a8486'
'1b1c942c8caebbdaad8402dbd0a8160a')


build() {
cd "$srcdir/$_realname-$pkgver"
sh ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
--disable-static --disable-schemas-compile

# D-BUS Service fix
for file in $(find . -name 'org.freedesktop.Notifications.service*' -print); do
sed -i -e 's~/usr/lib/notify-osd/notify-osd~/usr/lib/notify-osd-customizable/notify-osd~g' $file
done

make || return 1
}

package() {
cd "$srcdir/$_realname-$pkgver"
make DESTDIR="$pkgdir/" install
install -D -m644 ${srcdir}/notify-osd ${pkgdir}/etc/skel/.notify-osd
}