1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgname=low-memory-monitor
6 pkgdesc="Monitors memory pressure and signals applications"
7 url="https://gitlab.freedesktop.org/hadess/low-memory-monitor"
11 makedepends=(git meson gtk-doc systemd)
12 backup=(etc/low-memory-monitor.conf)
13 _commit=db42057f8d3c836cf0a6b9e833e3e38c703170a3 # tags/2.0^0
14 source=("git+https://gitlab.freedesktop.org/hadess/low-memory-monitor.git#commit=$_commit"
17 '5fde368c0165f95f8da2fd9d9ac37b5ec688a0861973eae704f42ff2a66cd781')
21 git describe --tags | sed 's/-/+/g'
29 arch-meson $pkgname build -D trigger_kernel_oom=false
30 meson compile -C build
34 meson test -C build --print-errorlogs
38 depends+=(libg{lib,object,io}-2.0.so)
40 DESTDIR="$pkgdir" meson install -C build
42 install -Dm644 /dev/stdin "$pkgdir/etc/low-memory-monitor.conf" <<END
44 TriggerKernelOom=false
48 _wantsdir="$pkgdir/usr/lib/systemd/system/basic.target.wants"
49 _service="$pkgdir/usr/lib/systemd/system/$pkgname.service"
51 ln -srt "$_wantsdir" "$_service"
52 patch "$_service" noinstall.diff