Blob Blame History Raw
%global debug_package %{nil}
Name:           git-remote-hg
Version:        0.2
Release:        5%{?dist}
BuildArch:      noarch
Summary:        Mercurial wrapper for git
License:        GPLv2+
Group:          Development/Tools
URL:            https://github.com/felipec/git-remote-hg
Source0:        https://github.com/felipec/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# https://github.com/fingolfin/git-remote-hg/commit/e716a9e1a9e460a45663694ba4e9e8894a8452b2.patch
# https://github.com/felipec/git-remote-hg/pull/28
# Makes it work with Mercurial 3.2
# The second commit (to the tests) isn't needed against 0.2
Patch0:         git-remote-hg-0.2-fix_mercurial_32.patch

BuildRequires:  asciidoc >= 8.4.1
BuildRequires:  hg-git
BuildRequires:  python2-devel
Requires:       python
Requires:       git >= 2.0.0
Requires:       mercurial >= 3.0
Obsoletes:      git-hg

%description
git-remote-hg is the semi-official Mercurial bridge from Git project.
Once installed, it allows you to clone, fetch and push to and from Mercurial
repositories as if they were Git ones.

%prep
%setup -q
sed -i -e "1 s|^#!.*|#!%{__python2}|" git-remote-hg
sed -i -e 's|\tinstall|\tinstall -p|' Makefile
%patch0 -p1 -b .merc32

%build
make doc

%check
#make test

%install
export HOME=%{_prefix}
export DESTDIR=%{buildroot}
make install
make install-doc

%files
%doc LICENSE
%{_bindir}/git-remote-hg
%{_mandir}/man1/*

%changelog
* Mon Jan 12 2015 Adam Williamson <awilliam@redhat.com> - 0.2-5
- backport an upstream PR to make it work with Mercurial 3.2

* Mon Dec 8 2014 Petr Stodulka <pstodulk@redhat.com> - 0.2-4
- added obsoletes of git-hg

* Mon Jun 23 2014 Ondrej Oprala <ooprala@redhat.com> - 0.2-3
- Explicitly disable debug_package, (noarch by itself
  still runs find-debuginfo.sh)

* Sun Jun 22 2014 Ondrej Oprala <ooprala@redhat.com> - 0.2-2
- Every single test fails(suspicious), disabling them for now

* Thu Jun 19 2014 Ondrej Oprala <ooprala@redhat.com> - 0.2-1
- initial git-remote-hg spec file