diff options
author | libertylocked | 2018-10-10 04:58:23 -0400 |
---|---|---|
committer | libertylocked | 2018-10-10 04:58:23 -0400 |
commit | b8fbfbf6ae780ab1032d06dbabf80b87e5d09c4d (patch) | |
tree | 02e74438808d10e869f9109349c36c56d859fca4 /PKGBUILD | |
download | aur-b8fbfbf6ae780ab1032d06dbabf80b87e5d09c4d.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 49 |
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" +} |