makedeb


dunst-git 11280c9a2022.04.14-2


Lightweight and customizable notification daemon

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for dunst-git.

# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=dunst-git
_pkgname=dunst
pkgver=11280c9a2022.04.14
pkgrel=2
pkgdesc="Lightweight and customizable notification daemon"
arch=('i686' 'amd64' 'armv7h')
url="https://dunst-project.org/"
license=('BSD')
makedepends=('git' 'perl' 'wayland-protocols' 'libnotify-dev' 'libxss-dev' 'libxdg-basedir-dev' 'libghc-pango-dev' 'libxinerama-dev' 'libxrandr-dev' 'libwayland-client++0' 'libwayland-client-extra++0' 'libwayland-client0' 'libwayland-dev' 'libdbus-1-dev')
provides=('dunst' 'notification-daemon' 'dunstify')
conflicts=('dunst' 'dunstify')
# replaces=('dunst')
source=("${_pkgname}::git+https://github.com/dunst-project/dunst")
md5sums=('SKIP')
MAKEFLAGS="-j$(nproc)"

pkgver() {
  cd "$_pkgname"
    _always=$(git describe --always | sed -e 's:-:.:g' -e 's:v::') # always is mobile, and switches between numbers and letters, can't use it for versioning
    _commits=$(git rev-list --count HEAD | sed 's:-:.:g') # total commits is the most sane way of getting incremental pkgver
    _date=$(git log -1 --date=short --pretty=format:%cd)
    printf "%s%s%s\n" "${_commits}" "${_always}" "${_date}" | sed -e 's:-:.:g'  -e 's:_:.:g'
}

build() {
  cd "${_pkgname}"
  make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
  make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 dunstify
}

package() {
  cd "${_pkgname}"
  make DESTDIR="${pkgdir}" PREFIX=/usr install
  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"
}