[arch-commits] Commit in low-memory-monitor/trunk (PKGBUILD noinstall.diff)

Jan Steffens heftig at archlinux.org
Mon Jul 13 20:07:32 UTC 2020


    Date: Monday, July 13, 2020 @ 20:07:32
  Author: heftig
Revision: 391881

2.0-1

Added:
  low-memory-monitor/trunk/PKGBUILD
  low-memory-monitor/trunk/noinstall.diff

----------------+
 PKGBUILD       |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 noinstall.diff |    9 +++++++++
 2 files changed, 62 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-07-13 20:07:32 UTC (rev 391881)
@@ -0,0 +1,53 @@
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
+
+pkgname=low-memory-monitor
+pkgver=2.0
+pkgrel=1
+pkgdesc="Monitors memory pressure and signals applications"
+url="https://gitlab.freedesktop.org/hadess/low-memory-monitor"
+arch=(x86_64)
+license=(GPL3)
+depends=(glib2 dbus)
+makedepends=(git meson gtk-doc systemd)
+backup=(etc/low-memory-monitor.conf)
+_commit=db42057f8d3c836cf0a6b9e833e3e38c703170a3  # tags/2.0^0
+source=("git+https://gitlab.freedesktop.org/hadess/low-memory-monitor.git#commit=$_commit"
+        noinstall.diff)
+sha256sums=('SKIP'
+            '5fde368c0165f95f8da2fd9d9ac37b5ec688a0861973eae704f42ff2a66cd781')
+
+pkgver() {
+  cd $pkgname
+  git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+  cd $pkgname
+}
+
+build() {
+  arch-meson $pkgname build -D trigger_kernel_oom=false
+  meson compile -C build
+}
+
+check() {
+  meson test -C build --print-errorlogs
+}
+
+package() {
+  depends+=(libg{lib,object,io}-2.0.so)
+
+  DESTDIR="$pkgdir" meson install -C build
+
+  install -Dm644 /dev/stdin "$pkgdir/etc/low-memory-monitor.conf" <<END
+[Configuration]
+TriggerKernelOom=false
+END
+
+  # Statically enable
+  _wantsdir="$pkgdir/usr/lib/systemd/system/basic.target.wants"
+  _service="$pkgdir/usr/lib/systemd/system/$pkgname.service"
+  mkdir -p "$_wantsdir"
+  ln -srt "$_wantsdir" "$_service"
+  patch "$_service" noinstall.diff
+}

Added: noinstall.diff
===================================================================
--- noinstall.diff	                        (rev 0)
+++ noinstall.diff	2020-07-13 20:07:32 UTC (rev 391881)
@@ -0,0 +1,9 @@
+--- service	2020-07-13 20:00:24.131549557 +0000
++++ service.noinstall	2020-07-13 20:00:35.631716959 +0000
+@@ -34,6 +34,3 @@
+ 
+ # Privilege escalation
+ NoNewPrivileges=true
+-
+-[Install]
+-WantedBy=basic.target



More information about the arch-commits mailing list