Created
June 17, 2023 21:15
-
-
Save guilt/7f524d7b676ab9515ef9cf6c9bf625d4 to your computer and use it in GitHub Desktop.
Authy Snap into RPM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define _snapid H8ZpNgIoPyvmkgxOWw5MSzsXK1wRZiHn | |
%define _snaprev 18 | |
Name: authy | |
Version: 2.2.3 | |
Release: 1%{?dist} | |
Summary: Two factor authentication desktop application | |
ExclusiveArch: x86_64 | |
License: Proprietary | |
URL: https://authy.com/ | |
BuildRequires: squashfs, wget | |
Requires: mozilla-nss | |
Requires: gtk3 | |
Requires: filesystem | |
%description | |
Two factor authentication desktop application | |
%prep | |
%{_bindir}/wget -v -O %{_snapid}_%{_snaprev}.snap https://api.snapcraft.io/api/v1/snaps/download/%{_snapid}_%{_snaprev}.snap | |
%{_bindir}/unsquashfs -q -f -d %{_builddir}/authy %{_snapid}_%{_snaprev}.snap | |
%build | |
%install | |
install -d %{buildroot}/opt/authy | |
cp -r %{_builddir}/authy/. %{buildroot}/opt/authy | |
# Desktop Entry | |
sed -i 's|${SNAP}/meta/gui/icon.png|authy|g' %{buildroot}/opt/authy/meta/gui/authy.desktop | |
install -Dm644 %{buildroot}/opt/authy/meta/gui/authy.desktop -t %{buildroot}/usr/share/applications | |
install -Dm644 %{buildroot}/opt/authy/meta/gui/icon.png %{buildroot}/usr/share/pixmaps/authy.png | |
# Clean up unnecessary files | |
rm -rf %{buildroot}/opt/authy/{data-dir,gnome-platform,lib,meta,scripts,usr,*.sh} | |
# Symlink binary to /usr/bin | |
install -d %{buildroot}%{_bindir} | |
# Fixes build error | |
rm -f %{buildroot}%{_bindir}/authy | |
ln -s /opt/authy/authy %{buildroot}%{_bindir} | |
%files | |
/opt/authy/* | |
%{_bindir}/authy | |
%{_datarootdir}/applications/authy.desktop | |
%{_datarootdir}/pixmaps/authy.png | |
%changelog | |
* Sat Jun 17 2023 Karthik Kumar Viswanathan <karthikkumar@gmail.com> | |
- Modify for OpenSUSE | |
* Sun Apr 02 2023 th1nhhdk <th1nhhdk@tutanota.com> | |
- Upgraded to 2.2.3 | |
* Fri Nov 18 2022 th1nhhdk <th1nhhdk@tutanota.com> | |
- Bump version for Fedora Linux 37 | |
* Tue Oct 04 2022 th1nhhdk <th1nhhdk@tutanota.com> | |
- Spec file cleanup | |
* Thu Jul 28 2022 th1nhhdk <th1nhhdk@tutanota.com> | |
- Initial release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment