Andreas Schneider f4e47d0
%global gitexecdir %{_libexecdir}/git-core
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
Name:           git-filter-repo
Andreas Schneider ad0c1c4
Version:        2.27.0
Andreas Schneider ad0c1c4
Release:        1%{?dist}
Andreas Schneider f4e47d0
Summary:        Quickly rewrite git repository history (git-filter-branch replacement)
Andreas Schneider f4e47d0
License:        MIT
Andreas Schneider f4e47d0
Group:          Development/Tools/Version Control
Andreas Schneider f4e47d0
Url:            https://github.com/newren/git-filter-repo
Andreas Schneider f4e47d0
#
Andreas Schneider f4e47d0
Source0:        https://github.com/newren/git-filter-repo/releases/download/v%{version}/%{name}-%{version}.tar.xz
Andreas Schneider f4e47d0
#
Andreas Schneider f4e47d0
BuildArch:      noarch
Andreas Schneider f4e47d0
#
Andreas Schneider ad0c1c4
BuildRequires:  git >= 2.26.0
Andreas Schneider 32f4d4b
BuildRequires:  python3-rpm-macros
Andreas Schneider f4e47d0
BuildRequires:  python3-devel
Andreas Schneider f4e47d0
#
Andreas Schneider ad0c1c4
Requires:       git >= 2.26.0
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
%description
Andreas Schneider f4e47d0
git filter-repo is a versatile tool for rewriting history, which includes
Andreas Schneider f4e47d0
capabilities not found anywhere else. It roughly falls into the same space of
Andreas Schneider f4e47d0
tool as git filter-branch but without the capitulation-inducing poor
Andreas Schneider f4e47d0
performance, with far more capabilities, and with a design that scales
Andreas Schneider f4e47d0
usability-wise beyond trivial rewriting cases.
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
%prep
Andreas Schneider f4e47d0
%autosetup -p1
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
# Change shebang in all relevant files in this directory and all subdirectories
Andreas Schneider f4e47d0
find -type f -exec sed -i '1s=^#!%{_bindir}/\(python\|env python\)[23]\?=#!%{_bindir}/python3=' {} +
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
%build
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
%install
Andreas Schneider f4e47d0
install -d -m 0755 %{buildroot}%{gitexecdir}
Andreas Schneider f4e47d0
install -m 0755 git-filter-repo %{buildroot}%{gitexecdir}/git-filter-repo
Andreas Schneider f4e47d0
Andreas Schneider 916c086
install -d -m 0755 %{buildroot}%{python3_sitelib}
Andreas Schneider 916c086
ln -sf %{gitexecdir}/git-filter-repo %{buildroot}%{python3_sitelib}/git_filter_repo.py
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
install -d -m 0755 %{buildroot}%{_mandir}/man1
Andreas Schneider f4e47d0
install -m 0644 Documentation/man1/git-filter-repo.1 %{buildroot}%{_mandir}/man1/git-filter-repo.1
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
%files
Andreas Schneider f4e47d0
%license COPYING
Andreas Schneider f4e47d0
%doc README.md contrib/filter-repo-demos
Andreas Schneider f4e47d0
%{gitexecdir}/git-filter-repo
Andreas Schneider 916c086
%{python3_sitelib}/git_filter_repo.py
Andreas Schneider f4e47d0
%{_mandir}/man1/git-filter-repo.1*
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
%changelog
Andreas Schneider ad0c1c4
* Tue Jun 02 2020 Andreas Schneider <asn@redhat.com> - 2.27.0-1
Andreas Schneider ad0c1c4
- Update to version 2.27.0
Andreas Schneider ad0c1c4
Andreas Schneider 32f4d4b
* Thu Jan 30 2020 Andreas Schneider <asn@redhat.com> - 2.25.0-4
Andreas Schneider 32f4d4b
- Add missing BR for python3-rpm-macros
Andreas Schneider 32f4d4b
e042588
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.25.0-3
e042588
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e042588
Andreas Schneider 916c086
* Tue Jan 21 2020 Andreas Schneider <asn@redhat.com> - 2.25.0-1
Andreas Schneider 916c086
- Update to version 2.25.0
Andreas Schneider 916c086
- Fix installation to python3 sitelib
Andreas Schneider 916c086
Andreas Schneider f4e47d0
* Fri Dec 20 2019 Andreas Schneider <asn@redhat.com> - 2.24.0-2
Andreas Schneider f4e47d0
- Fixed source tarball permissions
Andreas Schneider f4e47d0
- Fixed souperfluous space in Summary
Andreas Schneider f4e47d0
Andreas Schneider f4e47d0
* Thu Dec 19 2019 Andreas Schneider <asn@redhat.com> - 2.24.0-1
Andreas Schneider f4e47d0
- Initial version 2.24.0