This instance will be upgraded to Heptapod 0.21.0rc2 on 2021-04-16 at 11:00 UTC+2 (a few minutes of down time)

tortoisehg.spec 2.67 KB
Newer Older
1 2
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

3 4 5 6 7 8
Name:       tortoisehg
Version:    hg
Release:    hg
Summary:    Mercurial GUI command line tool thg
Group:      Development/Tools
License:    GPLv2
9
# Few files are under the more permissive GPLv2+
10
URL:        https://tortoisehg.bitbucket.io
11 12
Source0:    %{name}-%{version}.tar.gz
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13
BuildArch:  noarch
14
BuildRequires:  python, python-devel, gettext, python-sphinx
15
BuildRequires:  PyQt4-devel, desktop-file-utils
16
Requires:   python >= 2.7, python-iniparse, mercurial >= 5.3
17
# gconf needed at util/shlib.py for browse_url(url).
18
Requires:   gnome-python2-gconf
19
Requires:   PyQt4 >= 4.7.5, qscintilla-python, python-pygments
20 21

%description
22 23
This package contains the thg command line tool which provides a
graphical user interface to the Mercurial distributed revision control system.
24

25
%package    nautilus
26
Summary:    Mercurial GUI plug-in to the Nautilus file manager
27 28
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}, nautilus-python
29

30
%description    nautilus
31
This package contains the TortoiseHg Gnome/Nautilus extension,
32 33
which makes the Mercurial distributed revision control
system available in the file manager with a graphical interface.
34 35

%prep
kiilerix's avatar
kiilerix committed
36
%setup -q
37

38
cat > tortoisehg/util/config.py << EOT
39 40 41 42
bin_path     = "%{_bindir}"
license_path = "%{_docdir}/%{name}-%{version}/COPYING.txt"
locale_path  = "%{_datadir}/locale"
icon_path    = "%{_datadir}/pixmaps/tortoisehg/icons"
43
nofork       = True
44 45 46 47 48
EOT

%build
%{__python} setup.py build

49
(cd doc && make html)
50
rm -f doc/build/html/.buildinfo
51

52 53 54 55 56
%install
rm -rf $RPM_BUILD_ROOT

%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

57 58 59
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
install contrib/mergetools.rc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/thgmergetools.rc

60
ln -s tortoisehg/icons/svg/thg_logo.svg %{buildroot}%{_datadir}/pixmaps/thg_logo.svg
61
desktop-file-install --dir=%{buildroot}%{_datadir}/applications contrib/thg.desktop
62

63 64
%find_lang %{name}

65 66 67
%clean
rm -rf $RPM_BUILD_ROOT

68 69
%files -f %{name}.lang

70
%defattr(-,root,root,-)
71
%doc COPYING.txt doc/build/html/
72
%{_bindir}/thg
73
%{python_sitelib}/tortoisehg/
74
%{python_sitelib}/hgext3rd/
75
%if "%{?python_version}" > "2.4"
76
%{python_sitelib}/tortoisehg-*.egg-info
77
%endif
78
%{_datadir}/pixmaps/tortoisehg/
79
%{_datadir}/pixmaps/thg_logo.svg
80
%{_datadir}/applications/thg.desktop
81

82
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/mercurial/hgrc.d/thgmergetools.rc
83

84 85
%files nautilus
%defattr(-,root,root,-)
86
%{_datadir}/nautilus-python/extensions/nautilus-thg.py*
87 88

%changelog