From 763c0e172628705476bfc4fefe3ee2b4904d9d65 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Wed, 13 Mar 2019 01:25:08 +0100 Subject: [PATCH] Add Brave browser (#26) --- Makefile | 32 ++++++++++++++++++++++++++++++++ README.md | 6 ++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8bea986..3f7c2c8 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,22 @@ hosts-vivaldi-user: *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ esac +.PHONY: hosts-brave +hosts-brave: + @case $(OS) in \ + Linux) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "/etc/opt/brave/native-messaging-hosts/" ;; \ + Darwin) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/" ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac + +.PHONY: hosts-brave-user +hosts-brave-user: + @case $(OS) in \ + Linux|OpenBSD|FreeBSD) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/" ;; \ + Darwin) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/" ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac + .PHONY: hosts-firefox hosts-firefox: @case $(OS) in \ @@ -184,3 +200,19 @@ policies-vivaldi-user: Darwin) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/Vivaldi/policies/managed/" ;; \ *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ esac + +.PHONY: policies-brave +policies-brave: + @case $(OS) in \ + Linux) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "/etc/opt/brave/policies/managed/" ;; \ + Darwin) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "/Library/Application Support/BraveSoftware/Brave-Browser/policies/managed/" ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac + +.PHONY: policies-brave-user +policies-brave-user: + @case $(OS) in \ + Linux|OpenBSD|FreeBSD) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/.config/BraveSoftware/Brave-Browser/policies/managed/" ;; \ + Darwin) ln -sf "$(DESTDIR)/usr/lib/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/BraveSoftware/Brave-Browser/policies/managed/" ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac diff --git a/README.md b/README.md index 165c188..98f298f 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ The Makefile (which is also available in `/usr/lib/browserpass/`, if you install | `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-brave` | Configure browserpass for Brave browser, system-wide | +| `make hosts-brave-user` | Configure browserpass for Brave 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 | @@ -59,8 +61,8 @@ In addition, Chromium-based browsers support the following `make` goals: | `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 | +| `make policies-brave` | Automatically install browser extension for Brave browser, system-wide | +| `make policies-brave-user` | Automatically install browser extension for Brave browser, for the current user only | ## Building the app