%global commit 61af2bf4c5a1071f973e661f6145cf606bf30e80
%global owner wting
Name: autojump
Version: 22.3.2
Release: 2%{?dist}
Summary: A fast way to navigate your filesystem from the command line
Group: Applications/Productivity
License: GPLv3+
URL: http://wiki.github.com/%{owner}/%{name}
Source: https://github.com/%{owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
Patch0: remove-homebrew-check.patch
Patch1: install-add-distribution-arg.patch
BuildArch: noarch
# June 27th, pandoc is broken in rawhide, uncomment when working again
# BuildRequires: pandoc
BuildRequires: python2-devel
Requires: python
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires: python-argparse
%endif
Requires(pre): coreutils
%description
autojump is a faster way to navigate your filesystem. It works by maintaining
a database of the directories you use the most from the command line.
%package zsh
Requires: %{name} = %{version}-%{release}
Group: Applications/Productivity
Summary: Autojump for zsh
%description zsh
autojump is a faster way to navigate your filesystem. It works by maintaining
a database of the directories you use the most from the command line.
autojump-zsh is designed to work with zsh.
%package fish
Requires: %{name} = %{version}-%{release}
Group: Applications/Productivity
Summary: Autojump for fish shell
%description fish
autojump is a faster way to navigate your filesystem. It works by maintaining
a database of the directories you use the most from the command line.
autojump-fish is designed to work with fish shell.
%prep
%setup -q -n %{name}-%{commit}
%patch0 -p1
%patch1 -p1
# Use system argparse
sed -i 's|autojump_argparse|argparse|' bin/%{name}
# Fix shebang
sed -i 's|/usr/bin/env python|/usr/bin/python|' bin/%{name}
sed -i '1{/^#!/d}' bin/%{name}_*.py
%build
# June 27th, pandoc is broken in rawhide, uncomment when working again
# make docs
%install
./install.py --destdir %{buildroot} --prefix usr --zshshare %{buildroot}%{_datadir}/zsh/site-functions --distribution
# Do not need bundled modules
rm %{buildroot}%{_bindir}/%{name}_argparse.py
# Move modules to proper directory
mkdir -p %{buildroot}%{python2_sitelib}
mv %{buildroot}%{_bindir}/%{name}_*.py %{buildroot}%{python2_sitelib}/
%pre
# Cleanup previous .pyc files from %{_bindir}
rm -f %{_bindir}/%{name}_*.pyc
%files
%license LICENSE
%doc README.md AUTHORS
%{_bindir}/%{name}
%{python2_sitelib}/%{name}_data.py*
%{python2_sitelib}/%{name}_utils.py*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/icon.png
%{_mandir}/man1/%{name}.1*
%config(noreplace) %{_sysconfdir}/profile.d/%{name}.sh
%config(noreplace) %{_datadir}/%{name}/%{name}.bash
%files zsh
%config(noreplace) %{_datadir}/%{name}/%{name}.zsh
%{_datadir}/zsh/site-functions/_j
%files fish
%config(noreplace) %{_datadir}/%{name}/%{name}.fish
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 22.3.2-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Jun 24 2016 Tomas Tomecek <ttomecek@redhat.com> - 22.3.2-1
- update to 22.3.2
* Wed May 4 2016 Orion Poplawski <orion@cora.nwra.com> - 22.3.0-3
- Cleanup old .pyc files in /usr/bin
* Mon May 2 2016 Orion Poplawski <orion@cora.nwra.com> - 22.3.0-2
- Use system argparse
- Install python modules to python module directory
- Fix duplicate file ownership
- Drop %%defattr()
- Use %%license
* Tue Mar 22 2016 Tomas Tomecek <ttomecek@redhat.com> - 22.3.0-1
- update to 22.3.0
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 22.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Nov 06 2015 Tomas Tomecek <ttomecek@redhat.com> - 22.2.4-2
- patch: don't check for homebrew
* Tue Sep 08 2015 Tomas Tomecek <ttomecek@redhat.com> - 22.2.4-1
- update to 22.2.4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 21.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Oct 01 2014 Dan HorĂ¡k <dan[at]danny.cz> - 21.7.1-4
- drop ExclusiveArch workaround
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 21.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 15 2014 Tomas Tomecek <ttomecek@redhat.com> - 21.7.1-2
- Python 3.4 rebuild
* Wed Apr 23 2014 Tomas Tomecek <ttomecek@redhat.com> - 21.7.1-1
- Update to 21.7.1
* Thu Mar 20 2014 Tomas Tomecek <ttomecek@redhat.com> - 21.6.9-1
- Update to 21.6.9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 21.1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 21.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Dec 12 2012 Thibault North <tnorth@fedoraproject.org> - 21.1.2-2
- Fix builrequires section
* Wed Dec 12 2012 Thibault North <tnorth@fedoraproject.org> - 21.1.2-1
- Update to 21.1.2
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon May 07 2012 Thibault North <tnorth@fedoraproject.org> - 20-1
- Update to version 20
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 19-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sun Dec 11 2011 Thibault North <tnorth@fedoraproject.org> - 19-2
- Add symlink for jumpapplet
* Sun Dec 11 2011 Thibault North <tnorth@fedoraproject.org> - 19-1
- Update to version 19
* Sun Apr 10 2011 Thibault North <tnorth@fedoraproject.org> - 15-1
- New upstream release
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Dec 20 2010 Thibault North <tnorth@fedoraproject.org> - 14-2
- Fixes for review
* Sat Dec 18 2010 Thibault North <tnorth@fedoraproject.org> - 14-1
- Initial package