diff options
author | libertylocked | 2018-10-15 17:36:37 -0400 |
---|---|---|
committer | libertylocked | 2018-10-15 17:36:37 -0400 |
commit | f4a7e433fdcd3d2d8ce376469bbdd34741e0697b (patch) | |
tree | 083e2cf601f2c3e95a963dfc23e8a6fde9c558e8 /PKGBUILD | |
parent | 6f858ad30276d980254511cd575fe4052790bd32 (diff) | |
download | aur-f4a7e433fdcd3d2d8ce376469bbdd34741e0697b.tar.gz |
Make pkgbuild build bw from source
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 33 insertions, 5 deletions
@@ -1,15 +1,43 @@ +# Maintainer: libertylocked <libertylocked@disroot.org> # Contributor: Stephen Brown II <Stephen [dot] Brown2 [at] gmail.com> pkgname=bitwarden-cli +_pkgname=bitwarden-cli pkgver=1.3.0 -pkgrel=1 +pkgrel=2 pkgdesc="The command line vault (Windows, macOS, & Linux). bitwarden.com" arch=('x86_64') url="https://bitwarden.com" license=('GPL3') +makedepends=('nodejs' 'npm') +depends=('nodejs') +conflicts=('bitwarden-cli-git') options=('!strip') -source_x86_64=("https://github.com/bitwarden/cli/releases/download/v${pkgver}/bw-linux-${pkgver}.zip") -sha512sums_x86_64=('b2b7cce07085009e3d26ad2da70310d3af0a3e6129d399278e494eb455a930d6953c1c57f85659ac0eac35747da91005f3a50d5a260ff8e6e57a9d756e96e978') +source=("${_pkgname}-git-repo::git+https://github.com/bitwarden/cli.git#tag=v${pkgver}" + 'jslib-git-repo::git+https://github.com/bitwarden/jslib.git' + 'bw.sh') +sha512sums=('SKIP' + 'SKIP' + '71729c0ee95429ab03fa586de6bbf8ebad29d6d5544775564bb35eaa68cc4a915007db54b5928e99234bfe7828491829a5d32750f641056a0b68e05aa842f9ee') -package(){ - install -D "${srcdir}/bw" "${pkgdir}/usr/bin/bw" +prepare() { + cd "${_pkgname}-git-repo" + git submodule init + git config submodule.jslib.url $srcdir/jslib-git-repo + git submodule update +} + +build() { + cd "${_pkgname}-git-repo" + npm install + npm run build:prod +} + +package() { + cd "${_pkgname}-git-repo" + + install -dm755 "${pkgdir}/usr/lib/${_pkgname}" + cp -a build/. "${pkgdir}/usr/lib/${_pkgname}/" + + install -dm755 "${pkgdir}/usr/bin" + install -Dm755 "${srcdir}/bw.sh" "${pkgdir}/usr/bin/bw" } |