summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMassimiliano Torromeo2017-09-08 11:25:54 +0200
committerMassimiliano Torromeo2017-09-08 11:25:54 +0200
commitdd54f6834aa2862e03d9dae65555205c0ebc559d (patch)
treea6aa29417589f7a56276176ae2e66f722874efc2
downloadaur-dd54f6834aa2862e03d9dae65555205c0ebc559d.tar.gz
Initial commit
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore17
-rw-r--r--PKGBUILD38
-rw-r--r--amplify-agent.service15
-rw-r--r--tmpfile.conf2
5 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1c3da3167734
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+# Generated by mksrcinfo v8
+# Fri Sep 8 09:25:43 UTC 2017
+pkgbase = nginx-amplify-agent
+ pkgdesc = NGINX Amplify Agent
+ pkgver = 0.45_2
+ pkgrel = 1
+ url = https://www.nginx.com/products/nginx-amplify/
+ arch = any
+ license = BSD
+ makedepends = python2-setuptools
+ depends = python2-netifaces
+ depends = python2-psutil
+ depends = python2-gevent
+ depends = python2-flup
+ depends = python2-pyhamcrest
+ depends = python2-daemon
+ depends = python2-ujson
+ depends = python2-rstr
+ depends = python2-setproctitle
+ depends = python2-pyparsing
+ depends = python2-requests
+ depends = python2-netaddr
+ depends = nginx
+ backup = etc/amplify-agent/agent.conf
+ source = https://github.com/nginxinc/nginx-amplify-agent/archive/v0.45-2/nginx-amplify-agent-0.45_2.tar.gz
+ source = amplify-agent.service
+ source = tmpfile.conf
+ sha256sums = 9fe4db756efb325a0056b863415f045f68694976884498b302f1ac55aacb3fff
+ sha256sums = b848ed0386666a3c03b7f720ee08a40d4e434362c14145d244ef4370bb92f038
+ sha256sums = 3024f05029e2ca4d2565a8f9201f8d72ee29d956fd0c75cdba912607f81e0e05
+
+pkgname = nginx-amplify-agent
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..9b97681014e9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,17 @@
+*.zip
+*.jar
+*.tar
+*.tgz
+*.tbz2
+*.gz
+*.bz2
+*.xz
+*.gem
+*.run
+*.deb
+*.rpm
+*.sig
+*.log
+/src
+/pkg
+*.kate-swp
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..634125040aba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+
+pkgname=nginx-amplify-agent
+pkgver=0.45_2
+_pkgver=${pkgver//_/-}
+pkgrel=1
+pkgdesc="NGINX Amplify Agent"
+arch=(any)
+url="https://www.nginx.com/products/nginx-amplify/"
+license=('BSD')
+depends=('python2-netifaces' 'python2-psutil' 'python2-gevent' 'python2-flup'
+ 'python2-pyhamcrest' 'python2-daemon' 'python2-ujson' 'python2-rstr'
+ 'python2-setproctitle' 'python2-pyparsing' 'python2-requests'
+ 'python2-netaddr' 'nginx')
+makedepends=('python2-setuptools')
+source=("https://github.com/nginxinc/$pkgname/archive/v$_pkgver/$pkgname-$pkgver.tar.gz"
+ "amplify-agent.service"
+ "tmpfile.conf")
+backup=('etc/amplify-agent/agent.conf')
+sha256sums=('9fe4db756efb325a0056b863415f045f68694976884498b302f1ac55aacb3fff'
+ 'b848ed0386666a3c03b7f720ee08a40d4e434362c14145d244ef4370bb92f038'
+ '3024f05029e2ca4d2565a8f9201f8d72ee29d956fd0c75cdba912607f81e0e05')
+
+build() {
+ cd "$srcdir"/$pkgname-$_pkgver
+ python2 setup.py build
+}
+
+package() {
+ install -Dm644 amplify-agent.service "$pkgdir"/usr/lib/systemd/system/amplify-agent.service
+ install -Dm644 tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/amplify-agent
+
+ cd "$srcdir"/$pkgname-$_pkgver
+ python2 setup.py install -O1 --skip-build --root="$pkgdir"
+
+ mv "$pkgdir"/etc/amplify-agent/agent.conf{.default,}
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/amplify-agent.service b/amplify-agent.service
new file mode 100644
index 000000000000..ce0065fe579b
--- /dev/null
+++ b/amplify-agent.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=NGINX Amplify Agent
+After=network.target network-online.target nss-lookup.target
+
+[Service]
+Type=forking
+User=http
+Group=http
+ExecStart=/usr/bin/nginx-amplify-agent.py start --config=/etc/amplify-agent/agent.conf --pid=/run/amplify-agent/amplify-agent.pid
+ExecStop=/usr/bin/nginx-amplify-agent.py stop --config=/etc/amplify-agent/agent.conf --pid=/run/amplify-agent/amplify-agent.pid
+PIDFile=/run/amplify-agent/amplify-agent.pid
+RuntimeDirectory=amplify-agent
+
+[Install]
+WantedBy=multi-user.target
diff --git a/tmpfile.conf b/tmpfile.conf
new file mode 100644
index 000000000000..c458f4c9670f
--- /dev/null
+++ b/tmpfile.conf
@@ -0,0 +1,2 @@
+d /var/log/amplify-agent 0755 http http -
+z /etc/amplify-agent/agent.conf - http http