updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / dunst-git / PKGBUILD
blob280a1fc53255d42270d355c821df5ac82abde81a
1 # Maintainer: Army <uli armbruster who uses the google mail service>
3 _pkgname=dunst
4 pkgname=${_pkgname}-git
5 pkgver=20111119
6 pkgrel=1
7 pkgdesc="dmenu-ish notification system "
8 arch=(i686 x86_64)
9 url="https://github.com/knopwob/dunst"
10 license=(MIT)
11 depends=(dbus-core libxinerama)
12 makedepends=('git' 'perl')
13 optdepends=('libnotify: dunst is able to listen to notifications from libnotify')
14 provides=(${_pkgname} notification-daemon)
15 conflicts=(${_pkgname})
17 _gitroot="https://github.com/knopwob/dunst.git"
18 _gitname="${_pkgname}"
20 build() {
21         cd "$srcdir"
22         msg "Connecting to GIT server...."
23         
24         if [ -d ${_gitname} ] ; then
25                 cd ${_gitname} && git pull origin
26                 msg "The local files are updated."
27         else
28                 git clone ${_gitroot} ${_gitname}
29         fi
30         msg "GIT checkout done or server timeout"
31         msg "Starting make..."
33         rm -rf "${srcdir}/${_gitname}-build"
34         cp -a "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
35         cd "${srcdir}/${_gitname}-build"
36         
37         if test -e ${startdir}/config.h
38         then
39                 msg "use custom config.h"
40                 cp ${startdir}/config.h .
41         else
42                 msg "use default config.h"
43         fi
44         
45         sed -i \
46                 -e 's/^CPPFLAGS =/CPPFLAGS +=/g' \
47                 -e 's/^CFLAGS   =/CFLAGS   +=/g' \
48                 -e 's/^LDFLAGS  =/LDFLAGS  +=/g' \
49                 config.mk
50         
51         make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
54 package() {
55         cd "${srcdir}/${_gitname}-build"
56         make PREFIX=${pkgdir}/usr install
57         install -Dm644 "${srcdir}/dunst-build/LICENSE.dmenu" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"