Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 41 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ install:
$(INSTALL) -Dm644 -t "$(SHARE_DIR)/licenses/browserpass/" LICENSE
$(INSTALL) -Dm644 -t "$(SHARE_DIR)/doc/browserpass/" README.md

$(INSTALL) -Dm644 browser-files/chromium-host.json "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json"
$(INSTALL) -Dm644 browser-files/chromium-policy.json "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json"
$(INSTALL) -Dm644 browser-files/firefox-host.json "$(LIB_DIR)/browserpass/hosts/firefox/$(APP_ID).json"
$(INSTALL) -Dm644 browser-files/chromium-host.json "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json"
$(INSTALL) -Dm644 browser-files/chromium-policy.json "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json"
$(INSTALL) -Dm644 browser-files/firefox-host.json "$(LIB_DIR)/browserpass/hosts/firefox/$(APP_ID).json"

# Browser-specific hosts targets

Expand Down Expand Up @@ -545,6 +545,44 @@ hosts-librewolf-user:
;; \
esac

.PHONY: hosts-thunderbird
hosts-thunderbird:
@case $(OS) in \
Linux) \
mkdir -p "$(LIB_DIR)/mozilla/native-messaging-hosts/"; \
ln -sfv "$(LIB_DIR)/browserpass/hosts/firefox/$(APP_ID).json" "/usr/lib/mozilla/native-messaging-hosts/$(APP_ID).json"; \
[ -e "/usr/lib/mozilla/native-messaging-hosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
Darwin) \
mkdir -p "/Library/Application Support/Mozilla/NativeMessagingHosts/"; \
ln -sfv "$(LIB_DIR)/browserpass/hosts/firefox/$(APP_ID).json" "/Library/Application Support/Mozilla/NativeMessagingHosts/$(APP_ID).json"; \
[ -e "/Library/Application Support/Mozilla/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
*) \
echo "The operating system $(OS) is not supported"; \
exit 1; \
;; \
esac

.PHONY: hosts-thunderbird-user
hosts-thunderbird-user:
@case $(OS) in \
Linux|*BSD|DragonFly) \
mkdir -p "${HOME}/.thunderbird/native-messaging-hosts/"; \
ln -sfv "$(LIB_DIR)/browserpass/hosts/firefox/$(APP_ID).json" "${HOME}/.thunderbird/native-messaging-hosts/$(APP_ID).json"; \
[ -e "${HOME}/.thunderbird/native-messaging-hosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
Darwin) \
mkdir -p "${HOME}/Library/Application Support/Thunderbird/NativeMessagingHosts/"; \
ln -sfv "$(LIB_DIR)/browserpass/hosts/firefox/$(APP_ID).json" "${HOME}/Library/Application Support/Thunderbird/NativeMessagingHosts/$(APP_ID).json"; \
[ -e "${HOME}/Library/Application Support/Thunderbird/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
*) \
echo "The operating system $(OS) is not supported"; \
exit 1; \
;; \
esac

.PHONY: hosts-waterfox
hosts-waterfox:
@case $(OS) in \
Expand Down
2 changes: 1 addition & 1 deletion browser-files/firefox-host.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.browserpass.native",
"description": "Browserpass native component for the Firefox extension",
"description": "Browserpass native component for the Firefox and Thunderbird extension",
"path": "%%replace%%",
"type": "stdio",
"allowed_extensions": ["browserpass@maximbaz.com"]
Expand Down