summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMaxime Poulin2016-02-12 18:01:24 -0500
committerMaxime Poulin2016-02-12 18:01:24 -0500
commit72ce7c1c277a83f6b6d07170e4cf9a674aedcb82 (patch)
treeacbf1962a1588b6319606d317448d457899e6b58 /PKGBUILD
downloadaur-72ce7c1c277a83f6b6d07170e4cf9a674aedcb82.tar.gz
Initial package of TheLounge IRC client
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c3833625a8e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Maxime Poulin <maxpoulin64@gmail.com>
+pkgname='thelounge'
+_npmname='thelounge'
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Web-based IRC client - Official community for of Shout"
+url='https://thelounge.github.io//'
+arch=('any')
+license=('MIT')
+depends=('nodejs')
+makedepends=('npm')
+install=install
+backup=('etc/thelounge/config.js')
+source=(
+ "http://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz"
+ "system.service"
+ "user.service"
+)
+noextract=("$_npmname-$pkgver.tgz")
+sha256sums=(
+ 'c809b71ded3fe87826117e42ed79383e654fc23e5b0587c041dbd1f141140822'
+ 'SKIP'
+ 'SKIP'
+)
+
+package() {
+ local _etc="$pkgdir/etc/$pkgname"
+
+ npm install -g --prefix "$pkgdir/usr" "$srcdir/$_npmname-$pkgver.tgz"
+
+ install -dm700 "$_etc" "$_etc/users"
+ install -Dm600 \
+ "$pkgdir/usr/lib/node_modules/$_npmname/defaults/config.js" \
+ "$_etc/config.js"
+
+ install -Dm644 "$srcdir/system.service" \
+ "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ install -Dm644 "$srcdir/user.service" \
+ "$pkgdir/usr/lib/systemd/user/$pkgname.service"
+
+ grep -FRlZ "$startdir" "$pkgdir" | \
+ xargs -0 -- sed -i "s|$startdir|/tmp/build|g"
+}