README: add install instructions (#25)

This commit is contained in:
Maxim Baz
2019-03-13 01:08:41 +01:00
committed by GitHub
parent 06a86da820
commit 14af1dc700
2 changed files with 75 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
PKG_NAME ?= browserpass
BIN ?= browserpass
APP_ID = com.github.browserpass.native
OS = $(shell uname -s)
@@ -57,7 +57,7 @@ dist: clean browserpass-linux64 browserpass-darwinx64 browserpass-openbsd64 brow
.PHONY: install
install:
install -Dm755 -t "$(DESTDIR)/usr/bin/" $(PKG_NAME)
install -Dm755 -t "$(DESTDIR)/usr/bin/" $(BIN)
install -Dm644 -t "$(DESTDIR)/usr/lib/browserpass/" Makefile
install -Dm644 -t "$(DESTDIR)/usr/share/licenses/browserpass/" LICENSE
install -Dm644 -t "$(DESTDIR)/usr/share/doc/browserpass/" README.md
@@ -66,8 +66,8 @@ install:
install -Dm644 browser-files/chromium-policy.json "$(DESTDIR)/usr/lib/browserpass/policies/chromium/$(APP_ID).json"
install -Dm644 browser-files/firefox-host.json "$(DESTDIR)/usr/lib/browserpass/hosts/firefox/$(APP_ID).json"
sed -i "s|%%replace%%|$(DESTDIR)/usr/bin/$(PKG_NAME)|" "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json"
sed -i "s|%%replace%%|$(DESTDIR)/usr/bin/$(PKG_NAME)|" "$(DESTDIR)/usr/lib/browserpass/hosts/firefox/$(APP_ID).json"
sed -i "s|%%replace%%|$(DESTDIR)/usr/bin/$(BIN)|" "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json"
sed -i "s|%%replace%%|$(DESTDIR)/usr/bin/$(BIN)|" "$(DESTDIR)/usr/lib/browserpass/hosts/firefox/$(APP_ID).json"
# Browser-specific hosts targets

View File

@@ -1,8 +1,70 @@
# Browserpass - native host
## Build locally
## Installation
Make sure you have Golang installed.
### Install via package manager
The following operating systems provide a browserpass package that can be installed using a package manager:
- TODO
- TODO
Once the package is installed, refer to the section [Configure browsers](#configure-browsers).
If your OS is not listed above, proceed with the manual installation steps below.
### Install manually
Download [the latest Github release](https://github.com/browserpass/browserpass-native/releases), choose either the source code archive (if you want to compile the app yourself) or an archive for your operating system (it contains a pre-built binary).
All release files are signed with [this PGP key](https://keybase.io/maximbaz). To verify the signature of a given file, use `$ gpg --verify <file>.sig`.
It should report:
```
gpg: Signature made ...
gpg: using RSA key 8053EB88879A68CB4873D32B011FDC52DA839335
gpg: Good signature from "Maxim Baz <...>"
gpg: aka ...
Primary key fingerprint: EB4F 9E5A 60D3 2232 BB52 150C 12C8 7A28 FEAC 6B20
Subkey fingerprint: 8053 EB88 879A 68CB 4873 D32B 011F DC52 DA83 9335
```
Unpack the archive. If you decided to compile the application yourself, refer to the [Building the app](#building-the-app) section on how to do so. Once complete, continue with the steps below.
Finally install the app using `make install` (if you compiled it using `make browserpass`) or `make BIN=browserpass-XXXX install` (if you downloaded a release with pre-built binary).
### Configure browsers
The Makefile (which is also available in `/usr/lib/browserpass/`, if you installed via package manager) contains the following `make` goals to configure the browsers you use:
| Command | Description |
| -------------------------- | -------------------------------------------------------------------------- |
| `make hosts-chromium` | Configure browserpass for Chromium browser, system-wide |
| `make hosts-chromium-user` | Configure browserpass for Chromium browser, for the current user only |
| `make hosts-chrome` | Configure browserpass for Google Chrome browser, system-wide |
| `make hosts-chrome-user` | Configure browserpass for Google Chrome browser, for the current user only |
| `make hosts-vivaldi` | Configure browserpass for Vivaldi browser, system-wide |
| `make hosts-vivaldi-user` | Configure browserpass for Vivaldi browser, for the current user only |
| `make hosts-firefox` | Configure browserpass for Firefox browser, system-wide |
| `make hosts-firefox-user` | Configure browserpass for Firefox browser, for the current user only |
In addition, Chromium-based browsers support the following `make` goals:
| Command | Description |
| ----------------------------- | -------------------------------------------------------------------------------------------- |
| `make policies-chromium` | Automatically install browser extension for Chromium browser, system-wide |
| `make policies-chromium-user` | Automatically install browser extension for Chromium browser, for the current user only |
| `make policies-chrome` | Automatically install browser extension for Google Chrome browser, system-wide |
| `make policies-chrome-user` | Automatically install browser extension for Google Chrome browser, for the current user only |
| `make policies-vivaldi` | Automatically install browser extension for Vivaldi browser, system-wide |
| `make policies-vivaldi-user` | Automatically install browser extension for Vivaldi browser, for the current user only |
## Building the app
### Build locally
Make sure you have the latest stable Go installed.
The following `make` goals are available:
@@ -17,7 +79,7 @@ The following `make` goals are available:
| `make browserpass-freebsd64` | Compile the app for FreeBSD 64-bit |
| `make test` | Run tests |
## Build using Docker
### Build using Docker
First build the docker image using the following command in the project root:
@@ -38,3 +100,9 @@ docker run --rm -v "$(pwd)":/src browserpass-native test
```
Refer to the list of available `make` goals above.
## Updates
If you installed the app using a package manager for your OS, you will likely update it in the same way.
If you installed manually, repeat the steps in the [Install manually](#install-manually) section.