# Generated by go2rpm 1.9.0 %bcond_without check # https://github.com/browserpass/browserpass-native %global goipath github.com/browserpass/browserpass-native Version: 3.1.0 %global tag %{version} %global native_mozpath %{_prefix}/%{_lib}/mozilla/native-messaging-hosts %global native_chromepath %{_sysconfdir}/chromium/native-messaging-hosts %global native_id com.github.browserpass.native %gometa -f %global common_description %{expand: This is a host application for browserpass browser extension} Name: browserpass Release: %autorelease -b 2 Summary: Browserpass native client app License: ISC URL: %{gourl} Source: %{gourl}/releases/download/%{version}/%{name}-native-%{version}-src.tar.gz Source: %{gourl}/releases/download/%{version}/%{name}-native-%{version}-src.tar.gz.asc Source: https://maximbaz.com/pgp_keys.asc BuildRequires: jq BuildRequires: gnupg2 %description %{common_description} %package firefox Summary: Native component for the Firefox extension BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: mozilla-filesystem Recommends: firefox %description firefox Browserpass native component for the Firefox extension %package chromium Summary: Native component for the Chromium extension BuildArch: noarch Requires: %{name} = %{version}-%{release} # Note: we probably should need/require an hypothetical `chromium-filesystem` Recommends: chromium %description chromium Browserpass native component for the Chromium extension %gopkg %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{gobuilddir}/bin/browserpass-native %{goipath} %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{native_mozpath} jq '.path = "%{_bindir}/browserpass-native"' browser-files/firefox-host.json > %{buildroot}%{native_mozpath}/%{native_id}.json install -m 0755 -vd %{buildroot}%{native_chromepath} jq '.path = "%{_bindir}/browserpass-native"' browser-files/chromium-host.json > %{buildroot}%{native_chromepath}/%{native_id}.json %if %{with check} %check %gocheck %endif %files %license LICENSE %doc PROTOCOL.md README.md %{_bindir}/browserpass-native %files firefox %{native_mozpath}/%{native_id}.json %files chromium %dir %{_sysconfdir}/chromium %dir %{native_chromepath} %{native_chromepath}/%{native_id}.json %changelog %autochangelog