summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXuanwo2019-12-09 13:00:48 +0800
committerXuanwo2019-12-09 13:00:48 +0800
commite5ca5d8b07bef46f8956f635407cb71b46c6708b (patch)
treeabaff88b4c3dcae0008ca947229c7814f3d0ff17
downloadaur-e5ca5d8b07bef46f8956f635407cb71b46c6708b.tar.gz
Bump to version 0.3.1
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD34
3 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..805abd59485a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = gridsome-cli
+ pkgdesc = A command line tool for creating new Gridsome projects.
+ pkgver = 0.3.1
+ pkgrel = 1
+ url = https://github.com/gridsome/gridsome/tree/master/packages/cli
+ arch = any
+ license = MIT
+ makedepends = npm
+ makedepends = jq
+ depends = nodejs
+ provides = gridsome
+ source = https://registry.npmjs.org/@gridsome/cli/-/cli-0.3.1.tgz
+ md5sums = d9f4d0f6d1e8839b191abc0526d766eb
+
+pkgname = gridsome-cli
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..3481d9a22fae
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.tar
+*.gz
+*.xz
+*.tgz
+*.log
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..05fb46b02c1c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Xuanwo <xuanwo@archlinuxcn.org>
+_npmname=@gridsome/cli
+pkgname=gridsome-cli
+pkgver=0.3.1
+pkgrel=1
+pkgdesc="A command line tool for creating new Gridsome projects."
+arch=(any)
+url="https://github.com/gridsome/gridsome/tree/master/packages/cli"
+license=('MIT')
+depends=('nodejs')
+makedepends=('npm' 'jq')
+provides=('gridsome')
+source=("https://registry.npmjs.org/$_npmname/-/cli-$pkgver.tgz")
+md5sums=('d9f4d0f6d1e8839b191abc0526d766eb')
+
+package() {
+ npm install -g --cache $srcdir/npm-cache --user root --prefix $pkgdir/usr $srcdir/cli-$pkgver.tgz
+ find "$pkgdir"/usr -type d -exec chmod 755 {} +
+ chown -R root:root "$pkgdir"
+
+ # Remove references to $pkgdir
+ find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"
+
+ # Remove references to $srcdir
+ local tmppackage="$(mktemp)"
+ local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
+ jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
+ mv "$tmppackage" "$pkgjson"
+ chmod 644 "$pkgjson"
+
+ # Install license file
+ mkdir -p "$pkgdir/usr/share/licenses/$pkgdir"
+ mv "$pkgdir/usr/lib/node_modules/$_npmname/LICENSE" "$pkgdir/usr/share/licenses/$pkgdir/LICENSE"
+}