aboutsummaryrefslogtreecommitdiffstats
path: root/testing/slurm/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/slurm/APKBUILD')
-rw-r--r--testing/slurm/APKBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/slurm/APKBUILD b/testing/slurm/APKBUILD
new file mode 100644
index 0000000000..4b61db8a59
--- /dev/null
+++ b/testing/slurm/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: prspkt <prspkt@protonmail.com>
+# Maintainer: prspkt <prspkt@protonmail.com>
+pkgname=slurm
+pkgver=0.4.3
+pkgrel=0
+pkgdesc="Yet another network load monitor"
+url="https://github.com/mattthias/slurm"
+arch="all"
+options="!check" # no upstream/available test-suite
+license="GPL-2.0-or-later"
+makedepends="cmake linux-headers ncurses-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mattthias/slurm/archive/upstream/$pkgver.tar.gz
+ fix-includes.patch"
+
+builddir="$srcdir/$pkgname-upstream-$pkgver"
+
+build() {
+ cd "$builddir"
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+
+ # Optimizations beyond -O0 result in the binary failing to execute past the help
+ # screen. Upon execution, the failing binary will exit producing the message:
+ # "Illegal instruction"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_C_FLAGS="${CFLAGS/-Os/-O0} -Wno-aggressive-loop-optimizations" \
+ ${CMAKE_CROSSOPTS}
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 slurm.1 "$pkgdir"/usr/share/man/man1/slurm.1
+}
+
+sha512sums="de67d661fbad564f4a3a8f94f1209d466e11a8094b79c25e0beb1b2d07ad680fe2c6f832dc0f8c3a85f7f2d0d02363b4842cbca58ba9d30ca8d7b3133ecc64c9 slurm-0.4.3.tar.gz
+f6cf0d23c9b311b7b9b2384f00a751d091304f518caf8d4882bbf15c95ea5724e8e1c90b55f175d8781cd1edc917bf65ec09f8cf1c7665c2cb1412b0a5f8cba3 fix-includes.patch"