summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöktürk Yüksek <gokturk@gentoo.org>2017-12-10 19:52:35 -0500
committerGöktürk Yüksek <gokturk@gentoo.org>2017-12-11 21:55:43 -0500
commitb0fdfbee88ccedbcbd60305419104edc6183c65b (patch)
tree0f5ace5ee87538a4110adefbd6566bc6f4dc4427 /app-admin/lastpass-binary-component/lastpass-binary-component-4.1.44_p20171210.ebuild
parentapp-forensics/libewf: fix the build failure #568738 (diff)
downloadgentoo-b0fdfbee88ccedbcbd60305419104edc6183c65b.tar.gz
gentoo-b0fdfbee88ccedbcbd60305419104edc6183c65b.tar.bz2
gentoo-b0fdfbee88ccedbcbd60305419104edc6183c65b.zip
app-admin/lastpass-binary-component: bump (!) and fix the fetch failure #640506
"Let's extend LastPass support to Firefox using Native Messaging. While doing so, let's modify our closed binary and change who-knows-what too. And yeah, let's release it under the same version 4.1.44 because version bumps are sissies and only losers release versioned tarballs." Also separate the app manifest files for Chrome and Chromium because allowed-origins are not the same. Add more comments to clarify the file system locations for various installed files. Update the postinst message to reflect that for some browsers users have to enable the binary component manually after installing the extension. Closes: https://bugs.gentoo.org/640506 Package-Manager: Portage-2.3.8, Repoman-2.3.2
Diffstat (limited to 'app-admin/lastpass-binary-component/lastpass-binary-component-4.1.44_p20171210.ebuild')
-rw-r--r--app-admin/lastpass-binary-component/lastpass-binary-component-4.1.44_p20171210.ebuild118
1 files changed, 118 insertions, 0 deletions
diff --git a/app-admin/lastpass-binary-component/lastpass-binary-component-4.1.44_p20171210.ebuild b/app-admin/lastpass-binary-component/lastpass-binary-component-4.1.44_p20171210.ebuild
new file mode 100644
index 000000000000..beff308bc57f
--- /dev/null
+++ b/app-admin/lastpass-binary-component/lastpass-binary-component-4.1.44_p20171210.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Binary component required by the LastPass Password Manager browser extension"
+HOMEPAGE="https://helpdesk.lastpass.com/downloading-and-installing/#h5"
+# sadly, upstream has no versioned distfiles
+SRC_URI="https://lastpass.com/lplinux.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="LastPass"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+RESTRICT="strip mirror" # We can't mirror it, but we can fetch it
+
+RDEPEND="
+ !!app-admin/lastpass
+"
+
+LASTPASS_EXEDIR=/opt/lastpass/
+
+QA_PREBUILT="
+ ${LASTPASS_EXEDIR}nplastpass*
+"
+
+S="${WORKDIR}"
+
+src_install() {
+ # This is based on the upstream installer script that's in the tarball
+ bin=nplastpass
+ use amd64 && bin="${bin}64"
+ exeinto ${LASTPASS_EXEDIR}
+ doexe "${S}"/${bin}
+
+ # Generate the policy file for Chrome/Chromium/Opera
+ cat >"${T}"/lastpass_policy.json <<-EOF || die
+ {
+ "ExtensionInstallSources": [
+ "https://lastpass.com/*",
+ "https://*.lastpass.com/*",
+ "https://d1jxck0p3rkj0.cloudfront.net/lastpass/*"
+ ]
+ }
+ EOF
+ # Install the policy file for Chrome/Chromium/Opera
+ for d in /etc/chromium /etc/opt/chrome; do
+ insinto ${d}/policies/managed
+ doins "${T}"/lastpass_policy.json
+ done
+
+ # Generate the app manifest for Chrome/Opera
+ cat >"${T}"/com.lastpass.nplastpass.json <<-EOF || die
+ {
+ "name": "com.lastpass.nplastpass",
+ "description": "LastPass",
+ "path": "${LASTPASS_EXEDIR}${bin}",
+ "type": "stdio",
+ "allowed_origins": [
+ "chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/",
+ "chrome-extension://debgaelkhoipmbjnhpoblmbacnmmgbeg/",
+ "chrome-extension://hnjalnkldgigidggphhmacmimbdlafdo/",
+ "chrome-extension://hgnkdfamjgnljokmokheijphenjjhkjc/"
+ ]
+ }
+ EOF
+ # Install the app manifest for Chrome/Opera
+ # https://developer.chrome.com/apps/nativeMessaging
+ # https://dev.opera.com/extensions/message-passing/
+ insinto /etc/opt/chrome/native-messaging-hosts
+ doins "${T}"/com.lastpass.nplastpass.json
+
+ # Generate the app manifest for Chromium
+ cat >"${T}"/com.lastpass.nplastpass.json <<-EOF || die
+ {
+ "name": "com.lastpass.nplastpass",
+ "description": "LastPass",
+ "path": "${LASTPASS_EXEDIR}${bin}",
+ "type": "stdio",
+ "allowed_origins": [
+ "chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/",
+ "chrome-extension://debgaelkhoipmbjnhpoblmbacnmmgbeg/",
+ "chrome-extension://hgnkdfamjgnljokmokheijphenjjhkjc/"
+ ]
+ }
+ EOF
+ # Install the app manifest for Chromium
+ # https://developer.chrome.com/apps/nativeMessaging
+ insinto /etc/chromium/native-messaging-hosts/
+ doins "${T}"/com.lastpass.nplastpass.json
+
+ # Generate the app manifest for Firefox
+ cat >"${T}"/com.lastpass.nplastpass.json <<-EOF || die
+ {
+ "name": "com.lastpass.nplastpass",
+ "description": "LastPass",
+ "path": "${LASTPASS_EXEDIR}${bin}",
+ "type": "stdio",
+ "allowed_extensions": [
+ "support@lastpass.com"
+ ]
+ }
+ EOF
+ # Install the app manifest for Firefox
+ # https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_manifests#Manifest_location
+ insinto /usr/lib/mozilla/native-messaging-hosts/
+ doins "${T}"/com.lastpass.nplastpass.json
+}
+
+pkg_postinst() {
+ einfo "This package only installs the components required by the browser extension."
+ einfo "Visit the links below for your browser to install the extension itself:"
+ einfo "Chrome/Chromium: https://lastpass.com/dl/inline/?full=1"
+ einfo "Firefox: https://lastpass.com/lastpassffx/"
+ einfo "Opera: https://lastpass.com/dl/"
+ einfo
+ einfo "Chrome, Chromium and Opera users need to manually enable the binary component."
+ einfo "For more info, visit: https://lastpass.com/support.php?cmd=showfaq&id=5576"
+}