2 # - add other browsers (opera, google-chrome, firefox...)
3 Summary: LastPass binary version to enable sharing login state between other browsers
4 Name: browser-plugin-lastpass
8 Group: X11/Applications/Networking
9 Source0: https://lastpass.com/lplinux.tar.bz2
10 # Source0-md5: eedb4dcf4f44ba80c4531514aec4d38f
12 Source1: https://lastpass.com/lpchrome_linux.crx
13 # Source1-md5: b1bd0fd75b38ba34b2cbd605746d5e83
15 URL: https://lastpass.com/
16 ExclusiveArch: %{ix86} %{x8664}
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 #%define chromium_cfdir /etc/chromium-browser
20 # FIXME: currently (chrome<34) chromium config dir is wrong: /etc/chromium not /etc/chromium-browser
21 %define chromium_cfdir /etc/chromium
24 %define NPLASTPASS nplastpass64
26 %define NPLASTPASS nplastpass
30 Binary version of LastPass to enable importing passwords from Google
31 Chrome password manager and to enable sharing login state between
37 echo "{ \"ExtensionInstallSources\": [\"https://lastpass.com/*\", \"https://*.lastpass.com/*\", \"https://*.cloudfront.net/lastpass/*\"] }" \
38 > lastpass_policy.json
39 echo "{ \"name\": \"com.lastpass.nplastpass\", \"description\": \"LastPass\", \"path\": \"%{chromium_cfdir}/native-messaging-hosts/%{NPLASTPASS}\", \"type\": \"stdio\", \"allowed_origins\": [ \"chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/\", \"chrome-extension://debgaelkhoipmbjnhpoblmbacnmmgbeg/\" ] }" \
40 > com.lastpass.nplastpass.json
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT%{chromium_cfdir}/{policies/managed,native-messaging-hosts}
45 cp -p lastpass_policy.json $RPM_BUILD_ROOT%{chromium_cfdir}/policies/managed
46 cp -f %{NPLASTPASS} $RPM_BUILD_ROOT%{chromium_cfdir}/native-messaging-hosts
47 cp -p com.lastpass.nplastpass.json $RPM_BUILD_ROOT%{chromium_cfdir}/native-messaging-hosts
50 rm -rf $RPM_BUILD_ROOT
53 %defattr(644,root,root,755)
54 # FIXME: should be owned by chromium itself
55 %dir %{chromium_cfdir}
56 %dir %{chromium_cfdir}/native-messaging-hosts
57 %dir %{chromium_cfdir}/policies
58 %dir %{chromium_cfdir}/policies/managed
59 %config(noreplace) %verify(not md5 mtime size) %{chromium_cfdir}/policies/managed/lastpass_policy.json
60 %config(noreplace) %verify(not md5 mtime size) %{chromium_cfdir}/native-messaging-hosts/com.lastpass.nplastpass.json
61 %attr(755,root,root) %{chromium_cfdir}/native-messaging-hosts/nplastpass64