You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yubioath-desktop/yubioath-desktop.spec

113 lines
3.8 KiB

%global debug_package %{nil}
Name: yubioath-desktop
Version: 3.0.1
Release: 3%{?dist}
Summary: Yubikey tool for generating OATH event-based HOTP and time-based TOTP codes
BuildArch: noarch
License: GPLv3+
URL: https://developers.yubico.com/%{name}/
Source0: https://developers.yubico.com/%{name}/Releases/%{name}-%{version}.tar.gz
Source1: https://developers.yubico.com/%{name}/Releases/%{name}-%{version}.tar.gz.sig
Source2: gpgkey-6FBA95E8.gpg
Patch0: 0001-Update-desktop-icon-command.patch
BuildRequires: gnupg2 python2-devel desktop-file-utils
Requires: python2-crypto pyscard python-pyside ykpers pcsc-lite-ccid pyusb python-click
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%description
The Yubico Authenticator is a graphical desktop tool and CLI for generating
Open AuTHentication (OATH) event-based HOTP and time-based TOTP one-time
password codes, with the help of a YubiKey that protects the shared secrets.
%prep
# Signature verification doesn't work in rawhide/F24 due to
# https://bugzilla.redhat.com/show_bug.cgi?id=1292687
# Disabling signature check until resolved
#gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%autosetup -p1
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --root=%{buildroot}
# man pages
mkdir -p %{buildroot}%{_mandir}/man1
cp %{_builddir}/%{buildsubdir}/man/*.1 %{buildroot}%{_mandir}/man1
gzip %{buildroot}%{_mandir}/man1/yubioath.1
gzip %{buildroot}%{_mandir}/man1/yubioath-gui.1
# desktop file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{_builddir}/%{buildsubdir}/resources/yubioath.desktop
# icons
mkdir -p %{buildroot}%{_datadir}/pixmaps
cp %{_builddir}/%{buildsubdir}/resources/yubioath.xpm %{buildroot}%{_datadir}/pixmaps
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
cp %{_builddir}/%{buildsubdir}/resources/yubioath-desktop.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
%files
%license COPYING
%doc ChangeLog NEWS README
%{python2_sitelib}/yubioath/
%{python2_sitelib}/yubioath_desktop*
%{_bindir}/*
%{_mandir}/man1/*
%{_datadir}/icons/hicolor/128x128/apps/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Sep 27 2016 Seth Jennings <spartacus06@gmail.com> - 3.0.1-2
- Fix desktop application executable name
* Mon Jul 25 2016 Seth Jennings <spartacus06@gmail.com> - 3.0.1-1
- Upstream release.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 28 2016 Seth Jennings <spartacus06@gmail.com> - 2.3.0-2
- Add pyusb as a required package to avoid python ImportError (#1302895).
* Fri Nov 20 2015 Seth Jennings <spartacus06@gmail.com> - 2.3.0-1
- Upstream release.
* Thu Aug 27 2015 Seth Jennings <spartacus06@gmail.com> - 2.2.1-1
- Upstream release.
* Thu Aug 06 2015 Seth Jennings <spartacus06@gmail.com> - 2.1.1-3
- Use __python2 macro.
* Thu Aug 06 2015 Seth Jennings <spartacus06@gmail.com> - 2.1.1-2
- Add pcsc-lite-ccid requirement
* Thu Aug 06 2015 Seth Jennings <spartacus06@gmail.com> - 2.1.1-1
- Initial package release.