diff options
author | XZS | 2016-07-19 00:53:01 +0200 |
---|---|---|
committer | XZS | 2016-07-19 00:53:01 +0200 |
commit | 662f588667e444a9acef89bf306f7a54d9f1a422 (patch) | |
tree | f4b753e2b82277ea0e478c2d68aba19f29c64939 /PKGBUILD | |
parent | 6dbbce4faddbf0aa2d79172281f46dbe99be4fcc (diff) | |
download | aur-662f588667e444a9acef89bf306f7a54d9f1a422.tar.gz |
support systemd socket activation
This makes the feeds accessible as a system-wide service started on
demand.
A pull request to incorporate the changes and additions was made to the
upstream project. [1] Should it be accepted, all supplementary files added
in this commit can be removed again.
[1]: https://github.com/tremby/vinefeed/pull/3
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,13 +1,20 @@ _npmname=vinefeed pkgname="nodejs-$_npmname" pkgver=0.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="RSS/Atom feed generator for Vine users" arch=(any) url="http://github.com/tremby/vinefeed" license=('GPL') depends=('nodejs' 'npm') optdepends=() +source=("$_npmname".{service,socket} + 'binary.patch' + 'socket-activation.patch') +md5sums=('8e09674dfcf9ba971f2a436bb2c55e1a' + '7e5a337a2598b938d605d8c49f8984ea' + 'ad657d580e728305638c1285dd47d77c' + 'e9346c6ee335dff8fc4e28ac6843d2af') makedepends+=('git') source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}") @@ -15,6 +22,12 @@ md5sums+=('SKIP') provides+=("$_gitname=$pkgver") conflicts+=("$_gitname") +prepare() { + cd "$_gitname" + patch -p1 -i ../binary.patch + patch -F3 -p1 -i ../socket-activation.patch +} + pkgver() { cd "$_gitname" grep -Po '(?<="version": ").*(?=")' package.json | tr '\n' '.' @@ -22,6 +35,8 @@ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } package() { + install -Dt "$pkgdir/usr/lib/systemd/user/" "$_npmname".{service,socket} + cd "$_gitname" npm install -g --prefix "$pkgdir/usr" --production rmdir "$pkgdir/usr/etc" |