summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 87fd12a2a2eb14d7b6e80f01e5f422097b4b8dca (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
# Maintainer: Edison Ibáñez <arkhan at riseup [dot] net>

pkgname=mons-git
_pkgname=${pkgname%-git}
pkgver=r120.375bbba
pkgrel=2
pkgdesc="KISS and POSIX Shell script to quickly manage three monitors on X"
arch=("any")
url="https://github.com/Ventto/mons"
license=("MIT")
depends=("xorg-xrandr")
makedepends=("git"
             "help2man")
provides=(${_pkgname})
conflicts=(${_pkgname})
source=("git+${url}"
        "git+https://github.com/Ventto/libshlist")
md5sums=("SKIP"
         "SKIP")

pkgver() {
  cd "${_pkgname}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd ${srcdir}
  sed -i -e "s#%LIBDIR%#/usr/lib/libshlist#" ${_pkgname}/mons.sh
  rm -r ${_pkgname}/libshlist
  mv libshlist ${_pkgname}/libshlist
}

package() {
  cd ${srcdir}/${_pkgname}
  make DESTDIR="${pkgdir}" install
}