summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-07-19 00:30:53 +0200
committerXZS2016-07-19 00:30:53 +0200
commit6dbbce4faddbf0aa2d79172281f46dbe99be4fcc (patch)
treeed9d7c55e4f3eb5e25cc6a2352b066e2e9d69547 /PKGBUILD
downloadaur-6dbbce4faddbf0aa2d79172281f46dbe99be4fcc.tar.gz
package Node.js module
The PKGBUILD in mostly inspired from the NodeJS packages already in the community repository [1], some from the AUR [2] and the template used by the npm2arch generator [3]. [1]: https://www.archlinux.org/packages/?q=nodejs [2]: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nodejs-jpm [3]: https://github.com/Filirom1/npm2arch/blob/master/lib/npm2PKGBUILD.coffee
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..02a84de4c4a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+_npmname=vinefeed
+pkgname="nodejs-$_npmname"
+pkgver=0.1.0
+pkgrel=1
+pkgdesc="RSS/Atom feed generator for Vine users"
+arch=(any)
+url="http://github.com/tremby/vinefeed"
+license=('GPL')
+depends=('nodejs' 'npm')
+optdepends=()
+
+makedepends+=('git')
+source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}")
+md5sums+=('SKIP')
+provides+=("$_gitname=$pkgver")
+conflicts+=("$_gitname")
+
+pkgver() {
+ cd "$_gitname"
+ grep -Po '(?<="version": ").*(?=")' package.json | tr '\n' '.'
+printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "$_gitname"
+ npm install -g --prefix "$pkgdir/usr" --production
+ rmdir "$pkgdir/usr/etc"
+}