summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ed51848105b1ef9e1caf3767e15b2f95baf84941 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
# Previous maintainer: Swift Geek <swiftgeek@gmail.com>

pkgname=earlyoom-git
pkgver=1.6.2.r35.g788fe49
pkgrel=1
pkgdesc="Early OOM Daemon for Linux"
arch=('i686' 'x86_64')
url="https://github.com/rfjakob/earlyoom"
license=('MIT')
depends=('glibc')
makedepends=('git' 'pandoc')
#checkdepends=('go')
provides=('earlyoom')
conflicts=('earlyoom')
backup=("etc/default/earlyoom")
source=("git+https://github.com/rfjakob/earlyoom.git")
sha256sums=('SKIP')


pkgver() {
  cd "earlyoom"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "earlyoom"

  make
}

check() {
  cd "earlyoom"

  #make test
}

package() {
  cd "earlyoom"

  make \
    DESTDIR="$pkgdir" \
    PREFIX="/usr" \
    earlyoom.service \
    install-bin \
    install-default \
    install-man
    # install
  install -Dm644 "earlyoom.service" -t "$pkgdir/usr/lib/systemd/system"
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/earlyoom"
}