summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTad Fisher2016-08-06 22:00:16 -0700
committerTad Fisher2016-08-06 23:05:21 -0700
commit449161727d541ef2195ba2fc6f01555cc447f43a (patch)
tree55dabbaa4416ebdd34c464462751abcc6add2a84
downloadaur-nodejs-pass-server-node.tar.gz
Init at 0.3.0
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD29
-rw-r--r--nodejs-pass-server-node.install26
-rw-r--r--pass-server-node.service14
4 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..db4b08ad577
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = nodejs-pass-server-node
+ pkgdesc = Read-only portal to pass, the standard password manager
+ pkgver = 0.3.0
+ pkgrel = 1
+ url = https://github.com/cpoppema/pass-server-node
+ install = nodejs-pass-server-node.install
+ arch = any
+ license = GPL3
+ depends = npm
+ source = https://github.com/cpoppema/pass-server-node/archive/v0.3.0.tar.gz
+ source = pass-server-node.service
+ md5sums = 742c4cc62b478ab39b3942bc3801d534
+ md5sums = 4e7a1f04f5088a0db7f34508866076ae
+
+pkgname = nodejs-pass-server-node
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ebeee48d679
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Tad Fisher <tadfisher at gmail dot com>
+
+_npmname=pass-server-node
+pkgname=nodejs-pass-server-node
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="Read-only portal to pass, the standard password manager"
+arch=('any')
+url="https://github.com/cpoppema/pass-server-node"
+license=('GPL3')
+depends=('npm')
+optdepends=()
+makedepends=()
+install=$pkgname.install
+source=(https://github.com/cpoppema/pass-server-node/archive/v0.3.0.tar.gz
+ 'pass-server-node.service')
+md5sums=('742c4cc62b478ab39b3942bc3801d534'
+ '4e7a1f04f5088a0db7f34508866076ae')
+
+package() {
+ local _npmdir="$pkgdir/usr/lib/node_modules/"
+ mkdir -p "$_npmdir"
+ cd $_npmdir
+ npm install -g --prefix "$pkgdir/usr" $srcdir/$_npmname-$pkgver
+ install -Dm644 "${srcdir}/pass-server-node.service" "${pkgdir}/usr/lib/systemd/user/pass-server-node.service"
+
+ # Cleanup npm crap
+ rmdir $pkgdir/usr/etc
+}
diff --git a/nodejs-pass-server-node.install b/nodejs-pass-server-node.install
new file mode 100644
index 00000000000..06e9356c769
--- /dev/null
+++ b/nodejs-pass-server-node.install
@@ -0,0 +1,26 @@
+# Some colored makepkg-like functions
+msg_blue() {
+ printf "${BLUE}==>${ALL_OFF}${BOLD} ${1}${ALL_OFF}\n"
+}
+
+note() {
+ printf "${BLUE}==>${ALL_OFF}${YELLOW} NOTE:${ALL_OFF}${BOLD} ${1}${ALL_OFF}\n"
+}
+
+ALL_OFF="$(tput sgr0)"
+BOLD="$(tput bold)"
+BLUE="${BOLD}$(tput setaf 4)"
+YELLOW="${BOLD}$(tput setaf 3)"
+
+post_install() {
+ note "To use with systemd, call 'systemctl --user enable pass-server-node' to enable the service for the first login session. You may configure the server using npm:
+
+ npm config set pass-server-node:port 8080
+ npm config set pass-server-node:password_store_dir ~/.password-store
+
+See https://github.com/cpoppema/pass-server-node for documentation."
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/pass-server-node.service b/pass-server-node.service
new file mode 100644
index 00000000000..3a7e3fcf42d
--- /dev/null
+++ b/pass-server-node.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Read-only portal to pass, the standard password manager
+
+[Service]
+WorkingDirectory=/usr/lib/node_modules/pass-server-node
+ExecStart=/usr/bin/npm start
+StandardOutput=syslog
+StandardError=syslog
+SyslogIdentifier=pass-server-node
+Environment="LOG_LEVEL=error"
+Environment="LOG_DIR="
+
+[Install]
+WantedBy=default.target