summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgor Tensin2021-03-06 22:32:47 +0300
committerEgor Tensin2021-03-06 22:32:47 +0300
commit4c2f427c3f87a21d96d8069f3356b7e374360349 (patch)
tree73ad79c58ec87794714853a11bfcf1fc64bfe87d
downloadaur-4c2f427c3f87a21d96d8069f3356b7e374360349.tar.gz
import pacman packaging from master
-rw-r--r--.SRCINFO16
-rw-r--r--.gitattributes1
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD31
-rw-r--r--linux-status.install19
5 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e250d88840a5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = linux-status
+ pkgdesc = Simple Linux status web page
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://github.com/egor-tensin/linux-status
+ install = linux-status.install
+ arch = any
+ license = MIT
+ depends = procps-ng
+ depends = python
+ depends = systemd
+ source = linux-status-0.0.1.tar.gz::https://github.com/egor-tensin/linux-status/archive/v0.0.1.tar.gz
+ md5sums = SKIP
+
+pkgname = linux-status
+
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000000..176a458f94e0
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..9228191b4726
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.tar.zst
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f3c311bab47e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Egor Tensin <Egor.Tensin@gmail.com>
+pkgname=linux-status
+pkgver=0.0.1
+pkgrel=1
+pkgdesc='Simple Linux status web page'
+arch=(any)
+url='https://github.com/egor-tensin/linux-status'
+license=(MIT)
+depends=(procps-ng python systemd)
+install=linux-status.install
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+md5sums=(SKIP)
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -D -m 0644 -t "$pkgdir/usr/share/linux-status" LICENSE.txt
+
+ install -D -m 0644 -t "$pkgdir/usr/share/doc/linux-status" README.md
+ install -D -m 0644 -t "$pkgdir/usr/share/doc/linux-status/img" img/example.png
+
+ install -D -m 0755 -t "$pkgdir/srv/linux-status" app.py
+ install -D -m 0755 -t "$pkgdir/srv/linux-status" server.py
+
+ install -D -m 0644 -t "$pkgdir/srv/linux-status" index.html
+ install -D -m 0644 -t "$pkgdir/srv/linux-status/css" css/bootstrap.min.css
+ install -D -m 0644 -t "$pkgdir/srv/linux-status/js" js/bootstrap.bundle.min.js
+ install -D -m 0644 -t "$pkgdir/srv/linux-status/js" js/jquery-3.3.1.min.js
+
+ install -D -m 0644 -t "$pkgdir/usr/lib/systemd/system" dist/systemd/linux-status.service
+}
diff --git a/linux-status.install b/linux-status.install
new file mode 100644
index 000000000000..32b9a90736c1
--- /dev/null
+++ b/linux-status.install
@@ -0,0 +1,19 @@
+post_install() {
+ systemctl --system daemon-reload
+ systemctl --system enable linux-status
+ systemctl --system start linux-status
+}
+
+pre_remove() {
+ systemctl --system stop linux-status.service
+ systemctl --system disable linux-status.service
+ systemctl --system daemon-reload
+}
+
+pre_upgrade() {
+ pre_remove "$1"
+}
+
+post_upgrade() {
+ post_install "$1"
+}