archrelease: copy trunk to extra-x86_64
[arch-packages.git] / low-memory-monitor / trunk / PKGBUILD
blob57980d68731b9f40d6ee9fa19e4ddc3a24762b6f
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgname=low-memory-monitor
4 pkgver=2.0
5 pkgrel=1
6 pkgdesc="Monitors memory pressure and signals applications"
7 url="https://gitlab.freedesktop.org/hadess/low-memory-monitor"
8 arch=(x86_64)
9 license=(GPL3)
10 depends=(glib2 dbus)
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"
15         noinstall.diff)
16 sha256sums=('SKIP'
17             '5fde368c0165f95f8da2fd9d9ac37b5ec688a0861973eae704f42ff2a66cd781')
19 pkgver() {
20   cd $pkgname
21   git describe --tags | sed 's/-/+/g'
24 prepare() {
25   cd $pkgname
28 build() {
29   arch-meson $pkgname build -D trigger_kernel_oom=false
30   meson compile -C build
33 check() {
34   meson test -C build --print-errorlogs
37 package() {
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
43 [Configuration]
44 TriggerKernelOom=false
45 END
47   # Statically enable
48   _wantsdir="$pkgdir/usr/lib/systemd/system/basic.target.wants"
49   _service="$pkgdir/usr/lib/systemd/system/$pkgname.service"
50   mkdir -p "$_wantsdir"
51   ln -srt "$_wantsdir" "$_service"
52   patch "$_service" noinstall.diff