summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorÓscar García Amor2016-11-18 20:04:31 +0100
committerÓscar García Amor2016-11-18 20:04:31 +0100
commit0eb6608526de1eda1f1089dfbdd2c09d1f666301 (patch)
tree0d2ffc1d363bab92e68da8213d6c0af864522122 /PKGBUILD
downloadaur-0eb6608526de1eda1f1089dfbdd2c09d1f666301.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..36b03d827d6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me)
+
+pkgname=sysdweb
+pkgver=0.1
+pkgrel=1
+pkgdesc='Control systemd services through Web or REST API'
+arch=('any')
+url='https://github.com/ogarcia/sysdweb'
+license=('GPL')
+depends=('python-bottle' 'python-dbus')
+makedepends=('python-setuptools' 'python2-setuptools')
+backup=("etc/${pkgname}.conf")
+source=("https://github.com/ogarcia/${pkgname}/archive/${pkgver}.tar.gz"
+ "${pkgname}.patch")
+sha256sums=('d780c5628b0d8bf671681d0291b98e9faa0a45ee2f18629d071557e9b8c7334f'
+ '14764eebefa1a1037f915033cc3523a9140cd5066287315c8997cde5551a0148')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/${pkgname}.patch"
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ python setup.py install --root="${pkgdir}" --optimize='1'
+
+ # config file
+ install -D -m644 "${pkgname}.conf" \
+ "${pkgdir}/etc/${pkgname}.conf"
+
+ # doc file
+ install -D -m644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+
+ # service files
+ install -D -m644 "systemd/${pkgname}-system.service" \
+ "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+ install -D -m644 "systemd/${pkgname}-user.service" \
+ "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
+}