summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlibertylocked2018-10-11 14:11:52 -0400
committerlibertylocked2018-10-11 14:11:52 -0400
commite5e3691f49f214160e90b4a5567f92adb843f9c4 (patch)
tree054f873f27e3dbcb24f8328f3269db04b93bf977
parentb8fbfbf6ae780ab1032d06dbabf80b87e5d09c4d (diff)
downloadaur-e5e3691f49f214160e90b4a5567f92adb843f9c4.tar.gz
no more bundled nodejs. now has dep on nodejs
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD34
-rw-r--r--bw.sh2
4 files changed, 28 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ab25e1432f1c..63084f28362b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,22 @@
pkgbase = bitwarden-cli-git
pkgdesc = Bitwarden Command-line Interface
pkgver = 1.3.0.r21.gbd38107
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/bitwarden/cli
arch = x86_64
license = GPL3
makedepends = nodejs
makedepends = npm
+ depends = nodejs
provides = bitwarden-cli
conflicts = bitwarden-cli
options = !strip
- source = bitwarden-cli-git::git+https://github.com/bitwarden/cli.git
- source = jslib::git+https://github.com/bitwarden/jslib.git
+ source = bitwarden-cli-git-repo::git+https://github.com/bitwarden/cli.git
+ source = jslib-git-repo::git+https://github.com/bitwarden/jslib.git
+ source = bw.sh
sha512sums = SKIP
sha512sums = SKIP
+ sha512sums = 71729c0ee95429ab03fa586de6bbf8ebad29d6d5544775564bb35eaa68cc4a915007db54b5928e99234bfe7828491829a5d32750f641056a0b68e05aa842f9ee
pkgname = bitwarden-cli-git
diff --git a/.gitignore b/.gitignore
index 6bd95cf313bd..4782637367b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
pkg/
src/
-bitwarden-cli-git/
-jslib/
-bitwarden-cli-git-1*
+bitwarden-cli-git-repo/
+jslib-git-repo/
+bitwarden-cli-git-1.*
diff --git a/PKGBUILD b/PKGBUILD
index 9956200eb2ef..a6ac3d886192 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,47 +3,47 @@
pkgname=bitwarden-cli-git
_pkgname=bitwarden-cli
pkgver=1.3.0.r21.gbd38107
-pkgrel=1
+pkgrel=2
pkgdesc='Bitwarden Command-line Interface'
arch=('x86_64')
url='https://github.com/bitwarden/cli'
license=('GPL3')
makedepends=('nodejs' 'npm')
+depends=('nodejs')
provides=('bitwarden-cli')
conflicts=('bitwarden-cli')
options=('!strip')
-source=("${pkgname}::git+https://github.com/bitwarden/cli.git"
- 'jslib::git+https://github.com/bitwarden/jslib.git')
+source=("${_pkgname}-git-repo::git+https://github.com/bitwarden/cli.git"
+ 'jslib-git-repo::git+https://github.com/bitwarden/jslib.git'
+ 'bw.sh')
sha512sums=('SKIP'
- 'SKIP')
+ 'SKIP'
+ '71729c0ee95429ab03fa586de6bbf8ebad29d6d5544775564bb35eaa68cc4a915007db54b5928e99234bfe7828491829a5d32750f641056a0b68e05aa842f9ee')
pkgver() {
- cd "${pkgname}"
+ cd "${_pkgname}-git-repo"
git describe --long --tags | sed 's/^v//' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- cd "${pkgname}"
+ cd "${_pkgname}-git-repo"
git submodule init
- git config submodule.jslib.url $srcdir/jslib
+ git config submodule.jslib.url $srcdir/jslib-git-repo
git submodule update
}
build() {
- cd "${pkgname}"
-
- # Download modules
+ cd "${_pkgname}-git-repo"
npm install
-
- # Build prod bundle
npm run build:prod
-
- # Build binary
- npm run package:lin
}
package() {
- cd "${pkgname}"
+ cd "${_pkgname}-git-repo"
+
+ install -dm755 "${pkgdir}/usr/lib/${_pkgname}"
+ cp -a build/. "${pkgdir}/usr/lib/${_pkgname}/"
+
install -dm755 "${pkgdir}/usr/bin"
- install -Dm755 "dist/linux/bw" "${pkgdir}/usr/bin/bw"
+ install -Dm755 "${srcdir}/bw.sh" "${pkgdir}/usr/bin/bw"
}
diff --git a/bw.sh b/bw.sh
new file mode 100644
index 000000000000..6814da8ae156
--- /dev/null
+++ b/bw.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+node /usr/lib/bitwarden-cli/bw.js $@