aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlibertylocked2018-10-11 04:36:43 -0400
committerlibertylocked2018-10-11 04:36:43 -0400
commitf316cba1f6d5f6f5bfa9e895f20290ba0e03d897 (patch)
tree1b6b6996609297a994adafa7d1cf20ed5dd02137
parentef31fb266f5aa9aa63c6899a162540581ee6046f (diff)
downloadaur-f316cba1f6d5f6f5bfa9e895f20290ba0e03d897.tar.gz
update to 1.8.0 source release build
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD67
-rw-r--r--bitwarden.desktop10
-rw-r--r--bitwarden.sh3
-rw-r--r--bump.sh10
6 files changed, 84 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 57be15b30dff..e31170ecd1bc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,14 @@
pkgbase = bitwarden
- pkgdesc = A secure and free password manager for all of your devices.
- pkgver = 1.4.0
+ pkgdesc = Bitwarden Desktop Application
+ pkgver = 1.8.0
pkgrel = 1
- url = https://bitwarden.com
+ url = https://github.com/bitwarden/desktop
arch = x86_64
- license = GPL
+ license = GPL-3.0
+ makedepends = nodejs
+ makedepends = npm
depends = alsa-lib
+ depends = electron
depends = gconf
depends = gtk2
depends = libnotify
@@ -14,10 +17,19 @@ pkgbase = bitwarden
depends = libxtst
depends = nspr
depends = nss
+ provides = bitwarden
+ conflicts = bitwarden-git
+ conflicts = bitwarden-bin
options = !strip
options = !emptydirs
- source_x86_64 = https://github.com/bitwarden/desktop/releases/download/v1.4.0/Bitwarden-1.4.0-amd64.deb
- sha512sums_x86_64 = e4dcf90a34bd891ef7ea1e69689402d1222d215c3315db9031d7fda2720c3a1bdbc6b838fe80e51a8126866c4ca3854216d9b8cdfaf8527e95aab56aea13b0b0
+ source = bitwarden-git-repo::git+https://github.com/bitwarden/desktop.git#tag=v1.8.0
+ source = jslib-git-repo::git+https://github.com/bitwarden/jslib.git
+ source = bitwarden.sh
+ source = bitwarden.desktop
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = 4e12df4144ce40be087ef73987dd83e36f4ea2d92101ac34bfcef52059c6a94e2bdb21c73766d9b3596ac7d36d4ca75e9097f1857370ab9f99d9fbfa1f6d696e
+ sha512sums = 05b771e72f1925f61b710fb67e5709dbfd63855425d2ef146ca3770b050e78cb3933cffc7afb1ad43a1d87867b2c2486660c79fdfc95b3891befdff26c8520fd
pkgname = bitwarden
diff --git a/.gitignore b/.gitignore
index e568d850265f..b33f3ab2c93b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-bitwarden/
pkg/
src/
-*.pkg.tar.xz
-*.deb
+bitwarden-git-repo/
+jslib-git-repo/
+bitwarden-1.*
diff --git a/PKGBUILD b/PKGBUILD
index e4ff8021b05f..c16a36e4880a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,58 @@
-# Generated by debtap
-# Maintainer: Milo Gilad <myl0gcontact@gmail.com>
+# Maintainer: libertylocked <libertylocked@disroot.org>
+# Contributor: Milo Gilad <myl0gcontact@gmail.com>
+
pkgname=bitwarden
-pkgver=1.4.0
+pkgver=1.8.0
pkgrel=1
-pkgdesc="A secure and free password manager for all of your devices."
+pkgdesc='Bitwarden Desktop Application'
arch=('x86_64')
-url="https://bitwarden.com"
-license=('GPL')
-groups=('')
-depends=('alsa-lib' 'gconf' 'gtk2' 'libnotify' 'libsecret' 'libxss' 'libxtst' 'nspr' 'nss')
+url='https://github.com/bitwarden/desktop'
+license=('GPL-3.0')
+makedepends=('nodejs' 'npm')
+depends=('alsa-lib' 'electron' 'gconf' 'gtk2' 'libnotify' 'libsecret' 'libxss' 'libxtst' 'nspr' 'nss')
+provides=('bitwarden')
+conflicts=('bitwarden-git' 'bitwarden-bin')
options=('!strip' '!emptydirs')
-source_x86_64=("https://github.com/bitwarden/desktop/releases/download/v${pkgver}/Bitwarden-${pkgver}-amd64.deb")
-
-package(){
+source=("${pkgname}-git-repo::git+https://github.com/bitwarden/desktop.git#tag=v${pkgver}"
+ 'jslib-git-repo::git+https://github.com/bitwarden/jslib.git'
+ "${pkgname}.sh"
+ "${pkgname}.desktop")
+sha512sums=('SKIP'
+ 'SKIP'
+ '4e12df4144ce40be087ef73987dd83e36f4ea2d92101ac34bfcef52059c6a94e2bdb21c73766d9b3596ac7d36d4ca75e9097f1857370ab9f99d9fbfa1f6d696e'
+ '05b771e72f1925f61b710fb67e5709dbfd63855425d2ef146ca3770b050e78cb3933cffc7afb1ad43a1d87867b2c2486660c79fdfc95b3891befdff26c8520fd')
- # Extract package data
- tar xf data.tar.xz -C "${pkgdir}"
+prepare() {
+ cd "${pkgname}-git-repo"
+ git submodule init
+ git config submodule.jslib.url $srcdir/jslib-git-repo
+ git submodule update
+}
- # Symlink
- install -d "${pkgdir}/usr/bin"
- ln -s "/opt/Bitwarden/bitwarden" "${pkgdir}/usr/bin/${pkgname}"
+build() {
+ cd "${pkgname}-git-repo"
+ npm install
+ npm run build
+ npm run clean:dist
+ # Make unpacked dist using electron-builder.
+ # Because `npm run dist:lin` builds a bunch of other irrelevant platforms as it uses
+ # the config in package.json, so we don't use that run-script here.
+ npx build --dir build
}
-sha512sums_x86_64=('e4dcf90a34bd891ef7ea1e69689402d1222d215c3315db9031d7fda2720c3a1bdbc6b838fe80e51a8126866c4ca3854216d9b8cdfaf8527e95aab56aea13b0b0')
+package() {
+ cd "${pkgname}-git-repo"
+
+ install -dm755 "${pkgdir}/usr/lib/${pkgname}"
+ cp -r dist/linux-unpacked/resources "${pkgdir}/usr/lib/${pkgname}/"
+
+ install -dm755 "${pkgdir}/usr/share/icons/hicolor"
+ for i in 16 32 48 64 128 256 512; do
+ install -Dm644 resources/icons/${i}x${i}.png "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
+ done
+
+ install -dm755 "${pkgdir}/usr/bin"
+ install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}-desktop"
+
+ install -Dm644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
+}
diff --git a/bitwarden.desktop b/bitwarden.desktop
new file mode 100644
index 000000000000..49aecb3a63bd
--- /dev/null
+++ b/bitwarden.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Bitwarden
+GenericName=Password Manager
+Comment=A secure and free password manager for all of your devices.
+Exec=bitwarden-desktop
+Terminal=false
+Type=Application
+Icon=bitwarden
+Categories=Utility;
+StartupWMClass=Bitwarden
diff --git a/bitwarden.sh b/bitwarden.sh
new file mode 100644
index 000000000000..4b9722248435
--- /dev/null
+++ b/bitwarden.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+export ELECTRON_IS_DEV=0
+electron /usr/lib/bitwarden/resources/app.asar $@
diff --git a/bump.sh b/bump.sh
deleted file mode 100644
index e2c571bb145f..000000000000
--- a/bump.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-printf "New version: "
-read NEWVER
-sed -i -e "s/pkgver=.*/pkgver=${NEWVER}/g" PKGBUILD
-
-sed '/sha512sums/d' PKGBUILD
-makepkg -g >> PKGBUILD