%global commit 4bbd9f95ed3470b542a1a2c6dad56f31806cd8fa
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global checkout 20150728git%{shortcommit}
Name: dex-autostart
Version: 0.8
Release: 0.4.%{checkout}%{?dist}
Summary: Generate and execute DesktopEntry files
License: GPLv3+
URL: https://github.com/jceb/dex
Source0: https://github.com/jceb/dex/archive/%{commit}/dex-%{commit}.tar.gz
BuildRequires: python3-devel
BuildRequires: python-sphinx
BuildArch: noarch
Requires: python3
%description
dex-autostart, DesktopEntry Execution, is a program to generate and execute
DesktopEntry files of the Application type.
%prep
%autosetup -n dex-%{commit}
%build
make %{?_smp_mflags}
# fix name in man page
sed "s/dex/dex-autostart/g" man/dex.1 > man/dex-autostart.1
mv man/dex-autostart.1 man/dex.1
# fix name in README
sed "s/dex/dex-autostart/g" README.rst > README.renamed.rst
mv README.renamed.rst README.rst
%install
%make_install PREFIX=/usr MANPREFIX=%{_mandir} NAME=%{name} VERSION=%{version}
# do not install the license twice
rm %{buildroot}/%{_defaultdocdir}/%{name}/LICENSE
%check
%{buildroot}/%{_bindir}/%{name} --test -v
%files
%license LICENSE
%{_defaultdocdir}/%{name}
%{_mandir}/man1/%{name}.1.gz
%{_bindir}/%{name}
%changelog
* Tue Jul 28 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8-0.4.20150728git4bbd9f9
- Update to new upstream 4bbd9f9 (patch included upstream)
- Properly rename dex -> dex-autostart in README
- Add check section
* Sun Jul 26 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8-0.3.20150714gita98fa2f
- Fix name in man page
* Sun Jul 12 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8-0.2.20150714gita98fa2f
- Remove LICENSE from docdir
* Sun Jul 12 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8-0.1.20150714gita98fa2f
- Initial package