summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5d7bd65d942a368bf1a1ff8409bf17c18f054e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Contributor: Army
# Maintainer: Moritz Maxeiner <moritz@ucworks.org>
# Co-Maintainer: Stefan-Husmann@t-online.de

pkgname=dunst-git
_gitname=dunst
pkgver=1.2.0.140.990.gfd81bd1
pkgrel=1
pkgdesc="a lightweight notification-daemon - git version"
arch=('i686' 'x86_64' 'armv7h')
url="https://dunst-project.org/"
license=('BSD')
depends=('libxinerama' 'libxss' 'pango' 'libnotify' 'gtk3')
if [ ! -e ${SRCDEST}/config.h ]; then
  depends+=('libxdg-basedir')
fi
makedepends=('git' 'perl')
provides=('dunst' 'notification-daemon' 'dunstify')
conflicts=('dunst' 'dunstify')
source=('git+https://github.com/dunst-project/dunst')
md5sums=('SKIP')
options=('!makeflags')

pkgver() {
  cd ${srcdir}/${_gitname}
  printf %s $(git describe --tags | tr -d v | sed 's+-+.+'|sed "s+-+.$(git rev-list --count HEAD).+")
}

prepare() {
  cd ${srcdir}/${_gitname}
  if [ -e ${srcdir}/config.h ]; then
    msg "Using custom config.h"
    cp ${srcdir}/config.h .
  fi
}

build() {
  cd ${srcdir}/${_gitname}
  if [ -e ${SRCDEST}/config.h ]; then
    CFLAGS=-DSTATIC_CONFIG make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
    CFLAGS=-DSTATIC_CONFIG make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 dunstify
  else
    make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
    make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 dunstify
  fi
}

package() {
  cd ${srcdir}/${_gitname}
  if [ -e ${SRCDEST}/config.h ]; then
    CFLAGS=-DSTATIC_CONFIG make DESTDIR="${pkgdir}" PREFIX=/usr install
  else
    make DESTDIR="${pkgdir}" PREFIX=/usr install
  fi
  install -Dm755 dunstify "${pkgdir}"/usr/bin/dunstify
  install -Dm755 contrib/dunst_espeak.sh "${pkgdir}"/usr/bin/dunst_espeak.sh
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}