upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / earlyoom / trunk / PKGBUILD
blob0d90d3f09e781e953fe9e1c239287add6712e4cc
1 # Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
2 # Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
4 pkgname=earlyoom
5 pkgver=1.7
6 pkgrel=1
7 pkgdesc="Early OOM Daemon for Linux"
8 arch=('x86_64')
9 url="https://github.com/rfjakob/earlyoom"
10 license=('MIT')
11 depends=('glibc')
12 makedepends=('pandoc')
13 optdepends=('systembus-notify: desktop notifications')
14 backup=("etc/default/earlyoom")
15 source=("https://github.com/rfjakob/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
16 sha256sums=('ebda1279a813d9b0f7860ce5029ccf5ea9f8868be070f2eaf40f90f2e64b6414')
18 prepare() {
19     cd "$pkgname-$pkgver"
20     sed "/systemctl|chcon/d" -ri Makefile
21     sed '/^DynamicUser=/a SupplementaryGroups=proc' -i earlyoom.service.in
22     sed 's;^EARLYOOM_ARGS="(.*)";EARLYOOM_ARGS="\1 -n --avoid '\''(^|/)(init|systemd|Xorg|sshd)$'\''";' -ri earlyoom.default
25 build() {
26     cd "$pkgname-$pkgver"
27     make PREFIX=/usr SYSTEMDUNITDIR=/usr/lib/systemd/system VERSION=$pkgver earlyoom
30 package() {
31     cd "$pkgname-$pkgver"
32     make install DESTDIR="$pkgdir" PREFIX=/usr SYSTEMDUNITDIR=/usr/lib/systemd/system
33     install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"