PKGBUILDs/extra/earlyoom/PKGBUILD

37 lines
1.2 KiB
Bash
Raw Normal View History

2022-08-08 23:43:59 +00:00
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
# ALARM: Maxim Baz <$pkgname at maximbaz dot com>
# - remove makedepend on pandoc
pkgname=earlyoom
2024-04-21 14:15:34 +00:00
pkgver=1.8
2022-08-08 23:43:59 +00:00
pkgrel=1
pkgdesc="Early OOM Daemon for Linux"
arch=('x86_64')
url="https://github.com/rfjakob/earlyoom"
license=('MIT')
depends=('glibc')
optdepends=('systembus-notify: desktop notifications')
backup=("etc/default/earlyoom")
source=("https://github.com/rfjakob/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
2024-04-21 14:15:34 +00:00
sha256sums=('bbb050a2294e60dafc0b129fcec705ef95d9d27f4c9dae1d3b4f25e4f698ae41')
2022-08-08 23:43:59 +00:00
prepare() {
cd "$pkgname-$pkgver"
sed "/systemctl|chcon/d" -ri Makefile
sed '/^DynamicUser=/a SupplementaryGroups=proc' -i earlyoom.service.in
sed 's;^EARLYOOM_ARGS="(.*)";EARLYOOM_ARGS="\1 -n --avoid '\''(^|/)(init|systemd|Xorg|sshd)$'\''";' -ri earlyoom.default
}
build() {
cd "$pkgname-$pkgver"
make PREFIX=/usr SYSTEMDUNITDIR=/usr/lib/systemd/system VERSION=$pkgver earlyoom
}
package() {
cd "$pkgname-$pkgver"
make install DESTDIR="$pkgdir" PREFIX=/usr SYSTEMDUNITDIR=/usr/lib/systemd/system
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}