summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérôme Deuchnord2019-10-04 13:10:07 +0200
committerJérôme Deuchnord2019-10-04 13:56:23 +0200
commite98a82e65b5944ddb85a6da7b802782780d4cc5d (patch)
tree38c987a42adcc5bd73f3f1ca2d4f124b83b28f22
downloadaur-e98a82e65b5944ddb85a6da7b802782780d4cc5d.tar.gz
Bump version 0.6.2
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD23
-rw-r--r--mercure.install25
-rw-r--r--mercure.service12
4 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..24932a84347d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = mercure
+ pkgdesc = Server-sent live updates: protocol and reference implementation
+ pkgver = 0.6.2
+ pkgrel = 1
+ url = https://mercure.rocks
+ arch = i686
+ arch = x86_64
+ license = AGPL-3.0
+ source_i686 = mercure-0.6.2_i686::https://github.com/dunglas/mercure/releases/download/v0.6.2/mercure_0.6.2_Linux_i386.tar.gz
+ sha256sums_i686 = 7dd0dabb10e38eb0bce5fcc9905b6bc2d8e8753cd43a34d5a7060df8cfacb1b9
+ source_x86_64 = mercure-0.6.2_x86_64::https://github.com/dunglas/mercure/releases/download/v0.6.2/mercure_0.6.2_Linux_x86_64.tar.gz
+ sha256sums_x86_64 = 0cd0c6307f4f9eec9922c84e1f3a42226d398a9466998d225562deea23bf11cc
+
+pkgname = mercure
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f232bc2b8c68
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,23 @@
+# Maintainer: Jérôme Deuchnord <jerome@deuchnord.fr>
+
+pkgname=mercure
+pkgver=0.6.2
+pkgrel=1
+pkgdesc='Server-sent live updates: protocol and reference implementation'
+arch=('i686' 'x86_64')
+url='https://mercure.rocks'
+install='mercure.install'
+license=('AGPL-3.0')
+
+source=('mercure.service')
+source_i686=("mercure-${pkgver}_i686::https://github.com/dunglas/mercure/releases/download/v${pkgver}/mercure_${pkgver}_Linux_i386.tar.gz")
+source_x86_64=("mercure-${pkgver}_x86_64::https://github.com/dunglas/mercure/releases/download/v${pkgver}/mercure_${pkgver}_Linux_x86_64.tar.gz")
+
+sha256sums=('277572c9cbc93b74b368aec4fd40a8a9542d220e74b14383ef68e24630b2a4dc')
+sha256sums_i686=('7dd0dabb10e38eb0bce5fcc9905b6bc2d8e8753cd43a34d5a7060df8cfacb1b9')
+sha256sums_x86_64=('0cd0c6307f4f9eec9922c84e1f3a42226d398a9466998d225562deea23bf11cc')
+
+package(){
+ install -Dm 755 mercure "$pkgdir/usr/bin/mercure"
+ install -Dm 755 mercure.service "$pkgdir"/usr/lib/systemd/system/mercure.service
+}
diff --git a/mercure.install b/mercure.install
new file mode 100644
index 000000000000..31b8c2343842
--- /dev/null
+++ b/mercure.install
@@ -0,0 +1,25 @@
+post_install() {
+ if [[ -z $(getent group mercure) ]]; then
+ groupadd mercure
+ fi
+
+ if [[ -z $(getent passwd mercure) ]]; then
+ useradd -c 'Mercure' -g mercure -d / -s /usr/bin/nologin mercure
+ fi
+
+ passwd -l mercure > /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if [[ -n $(getent passwd mercure) ]]; then
+ userdel mercure
+ fi
+
+ if [[ -n $(getent group mercure) ]]; then
+ groupdel mercure
+ fi
+}
diff --git a/mercure.service b/mercure.service
new file mode 100644
index 000000000000..6215c3652b83
--- /dev/null
+++ b/mercure.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Mercure - Server-sent live updates
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/mercure
+User=mercure
+Group=mercure
+RuntimeDirectory=mercure
+
+[Install]
+WantedBy=multi-user.target