diff options
author | Gokturk Yuksek <gokturk@binghamton.edu> | 2015-11-03 17:37:32 -0500 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-12-14 13:34:09 -0800 |
commit | 98b9085a94480ad5c5951f99b49848bc182429aa (patch) | |
tree | 82fa3e721f1bd247c5788f2121d0af06af80d575 /app-admin/lastpass/lastpass-3.2.16.ebuild | |
parent | eclass/gnome2-utils.eclass: Ensure we don't rely on dconf/gconf while buildin... (diff) | |
download | gentoo-98b9085a94480ad5c5951f99b49848bc182429aa.tar.gz gentoo-98b9085a94480ad5c5951f99b49848bc182429aa.tar.bz2 gentoo-98b9085a94480ad5c5951f99b49848bc182429aa.zip |
app-admin/lastpass: bump to 3.2.16 #550834 #551312
Bump app-admin/lastpass to 3.2.16. Upstream does not support versioned
tarballs, so remove the old version. Closes a bump request and a
checksum mismatch bug.
Also, add the missing build time dependency on app-arch/unzip.
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=550834
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=551312
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'app-admin/lastpass/lastpass-3.2.16.ebuild')
-rw-r--r-- | app-admin/lastpass/lastpass-3.2.16.ebuild | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/app-admin/lastpass/lastpass-3.2.16.ebuild b/app-admin/lastpass/lastpass-3.2.16.ebuild new file mode 100644 index 000000000000..c5047a64ec1c --- /dev/null +++ b/app-admin/lastpass/lastpass-3.2.16.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils + +DESCRIPTION="Online password manager and form filler that makes web browsing easier and more secure" +HOMEPAGE="https://lastpass.com/misc_download2.php" +# sadly, upstream has no versioned distfiles +MAINDISTFILE=lplinux.tar.bz2 +SRC_URI=" + https://lastpass.com/${MAINDISTFILE} -> ${P}.tar.bz2 + https://lastpass.com/lpchrome_linux.crx -> lpchrome_linux-${PV}.crx + firefox? ( https://lastpass.com/lp_linux.xpi -> lp_linux-${PV}.xpi )" + +LICENSE="LastPass" +SLOT="0" +KEYWORDS="-* ~x86 ~amd64" +IUSE="+chromium +firefox +chrome" +RESTRICT="strip mirror" # We can't mirror it, but we can fetch it + +DEPEND="app-arch/unzip" +RDEPEND=" + chrome? ( || ( + www-client/google-chrome + www-client/google-chrome-beta + www-client/google-chrome-unstable + ) ) + chromium? ( >=www-client/chromium-32.0.1700.102 ) + firefox? ( www-client/firefox )" +REQUIRED_USE="|| ( firefox chromium chrome )" + +LASTPASS_EXEDIR=/opt/lastpass/ + +QA_PREBUILT=" + ${LASTPASS_EXEDIR}nplastpass* + /usr/lib*/nsbrowser/plugins/libnplastpass*.so + /usr/lib*/firefox/browser/extensions/support@lastpass.com/platform/Linux_x86_64-gcc3/components/lpxpcom_x86_64.so + /usr/lib*/firefox/browser/extensions/support@lastpass.com/platform/Linux_x86-gcc3/components/lpxpcom.so +" + +S="${WORKDIR}" + +src_unpack() { + unpack ${P}.tar.bz2 + mkdir -p "${S}"/crx || die + # bug #524864: strip Chrome CRX header + # otherwise the unzip warning can be fatal in some cases + dd bs=306 skip=1 if="${DISTDIR}"/lpchrome_linux-${PV}.crx of="${T}"/lpchrome_linux.zip 2>/dev/null || die + unzip -qq -o "${T}"/lpchrome_linux.zip -d "${S}"/crx || die +} + +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 + + # despite the name, this piece seems used by both firefox+chrome + exeinto /usr/$(get_libdir)/nsbrowser/plugins + doexe "${S}"/crx/lib${bin}.so + + cat >"${T}"/lastpass_policy.json <<-EOF || die + { + "ExtensionInstallSources": [ + "https://lastpass.com/*", + "https://*.lastpass.com/*", + "https://*.cloudfront.net/lastpass/*" + ] + } + EOF + 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/" + ] + } + EOF + + if use chromium; then + insinto /etc/chromium/policies/managed + doins "${T}"/lastpass_policy.json + insinto /etc/opt/chrome/native-messaging-hosts/ + doins "${T}"/com.lastpass.nplastpass.json + fi + if use chrome; then + insinto /etc/opt/chrome/policies/managed/ + doins "${T}"/lastpass_policy.json + insinto /etc/chromium/native-messaging-hosts + doins "${T}"/com.lastpass.nplastpass.json + fi + + if use firefox; then + d="$D/usr/$(get_libdir)/firefox/browser/extensions/support@lastpass.com" + mkdir -p $d || die + unzip -qq -o "${DISTDIR}/lp_linux-${PV}.xpi" -d "$d" || die + fi +} + +pkg_postinst() { + einfo "Visit https://lastpass.com/dl/inline/?full=1 to finish installing for Chrome/Chromium/Firefox" +} |