summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Poulin2015-09-22 01:55:26 -0400
committerMaxime Poulin2015-09-22 01:55:26 -0400
commitb242c7c54e2e61ae55dc24b0e07f729b733cbf88 (patch)
tree7c2bd36831f5963bd6a3aa23665e3ae8e593df0a
downloadaur-b242c7c54e2e61ae55dc24b0e07f729b733cbf88.tar.gz
Move to AUR4 and update to latest
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD41
-rw-r--r--install17
-rw-r--r--system.service12
-rw-r--r--user.service9
5 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..891c37634c8a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = shout-irc
+ pkgdesc = Web-based IRC client
+ pkgver = 0.51.2
+ pkgrel = 1
+ url = http://shout-irc.com/
+ install = install
+ arch = any
+ license = MIT
+ depends = nodejs
+ source = https://github.com/erming/shout/archive/0.51.2.tar.gz
+ source = system.service
+ source = user.service
+ sha256sums = 63ac098ed1a6d2a731369b2b9e08fe9e372aa0e1d64cf23f734cca5605b11ba2
+ sha256sums = beac3a8a25700997f0f2a154ee85e8c89d64082856d194434b01116a0f4edb91
+ sha256sums = 322d152da59c066617dbab9604099bf25ca2b175ae6bd508643b38344be043d8
+
+pkgname = shout-irc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b9c31dcada1d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Maxime Poulin <maxpoulin64@gmail.com>
+# Contributor: Duncan K. <duncank@fastmail.fm>
+pkgname=shout-irc
+_upstreamname=shout
+pkgver=0.51.2
+pkgrel=1
+pkgdesc="Web-based IRC client"
+url='http://shout-irc.com/'
+arch=('any')
+license=('MIT')
+depends=('nodejs')
+install=install
+source=("https://github.com/erming/${_upstreamname}/archive/${pkgver}.tar.gz"
+ "system.service"
+ "user.service")
+sha256sums=('63ac098ed1a6d2a731369b2b9e08fe9e372aa0e1d64cf23f734cca5605b11ba2'
+ 'beac3a8a25700997f0f2a154ee85e8c89d64082856d194434b01116a0f4edb91'
+ '322d152da59c066617dbab9604099bf25ca2b175ae6bd508643b38344be043d8'
+)
+
+prepare() {
+ cd ${srcdir}/${_upstreamname}-${pkgver}
+ npm install
+}
+
+package() {
+ _share=$pkgdir/usr/share/$pkgname
+ _etc=$pkgdir/etc/$pkgname
+
+ cd ${srcdir}/${_upstreamname}-${pkgver}
+
+ install -dm755 $pkgdir/usr/bin
+ install -dm755 $_share
+ install -dm700 $_etc $_etc/users
+ install -Dm600 defaults/config.js $_etc/config-dist.js
+ cp -RT . $_share
+ ln -s /usr/share/$pkgname/index.js $pkgdir/usr/bin/$pkgname
+
+ install -Dm644 $srcdir/system.service $pkgdir/usr/lib/systemd/system/${pkgname}.service
+ install -Dm644 $srcdir/user.service $pkgdir/usr/lib/systemd/user/${pkgname}.service
+}
diff --git a/install b/install
new file mode 100644
index 000000000000..2f952587ed71
--- /dev/null
+++ b/install
@@ -0,0 +1,17 @@
+post_install() {
+ groupadd -g 138 shout-irc &>/dev/null
+ useradd -u 138 -g shout-irc -d /etc/shout-irc -s /bin/false shout-irc &> /dev/null
+ chown -R shout-irc:shout-irc etc/shout-irc &> /dev/null
+ chmod -R 700 etc/shout-irc &> /dev/null
+}
+
+post_upgrade() {
+ getent group shout-irc &>/dev/null || groupadd -g 138 shout-irc &>/dev/null
+ getent passwd shout-irc &>/dev/null || useradd -u 138 -g shout-irc -d /etc/shout-irc -s /bin/false shout-irc &> /dev/null
+ chown -R shout-irc:shout-irc etc/shout-irc &> /dev/null
+}
+
+pre_remove() {
+ getent passwd shout-irc &>/dev/null && userdel shout-irc &> /dev/null
+ getent group shout-irc &>/dev/null && groupdel shout-irc &> /dev/null
+}
diff --git a/system.service b/system.service
new file mode 100644
index 000000000000..ead49578b54e
--- /dev/null
+++ b/system.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shout IRC client
+After=network.target
+
+[Service]
+User=shout-irc
+Group=shout-irc
+Type=simple
+ExecStart=/usr/bin/shout-irc --home /etc/shout-irc
+
+[Install]
+WantedBy=multi-user.target
diff --git a/user.service b/user.service
new file mode 100644
index 000000000000..d61ac9e6cab7
--- /dev/null
+++ b/user.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Shout IRC client
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/shout-irc
+
+[Install]
+WantedBy=default.target