From 4c2f427c3f87a21d96d8069f3356b7e374360349 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 6 Mar 2021 22:32:47 +0300 Subject: import pacman packaging from master --- .SRCINFO | 16 ++++++++++++++++ .gitattributes | 1 + .gitignore | 2 ++ PKGBUILD | 31 +++++++++++++++++++++++++++++++ linux-status.install | 19 +++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 linux-status.install diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..e250d88 --- /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 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9228191 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.tar.zst +*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..f3c311b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Egor Tensin +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 0000000..32b9a90 --- /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" +} -- cgit v1.2.3