summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorlibertylocked2018-10-10 04:58:23 -0400
committerlibertylocked2018-10-10 04:58:23 -0400
commitb8fbfbf6ae780ab1032d06dbabf80b87e5d09c4d (patch)
tree02e74438808d10e869f9109349c36c56d859fca4 /PKGBUILD
downloadaur-b8fbfbf6ae780ab1032d06dbabf80b87e5d09c4d.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9956200eb2ef
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: libertylocked <libertylocked@disroot.org>
+
+pkgname=bitwarden-cli-git
+_pkgname=bitwarden-cli
+pkgver=1.3.0.r21.gbd38107
+pkgrel=1
+pkgdesc='Bitwarden Command-line Interface'
+arch=('x86_64')
+url='https://github.com/bitwarden/cli'
+license=('GPL3')
+makedepends=('nodejs' 'npm')
+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')
+sha512sums=('SKIP'
+ 'SKIP')
+
+pkgver() {
+ cd "${pkgname}"
+ git describe --long --tags | sed 's/^v//' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${pkgname}"
+ git submodule init
+ git config submodule.jslib.url $srcdir/jslib
+ git submodule update
+}
+
+build() {
+ cd "${pkgname}"
+
+ # Download modules
+ npm install
+
+ # Build prod bundle
+ npm run build:prod
+
+ # Build binary
+ npm run package:lin
+}
+
+package() {
+ cd "${pkgname}"
+ install -dm755 "${pkgdir}/usr/bin"
+ install -Dm755 "dist/linux/bw" "${pkgdir}/usr/bin/bw"
+}