PageRenderTime 19ms CodeModel.GetById 1ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/tortoisehg.spec

Relevant Search: With Applications for Solr and Elasticsearch

For more in depth reading about search, ranking and generally everything you could ever want to know about how lucene, elasticsearch or solr work under the hood I highly suggest this book. Easily one of the most interesting technical books I have read in a long time. If you are tasked with solving search relevance problems even if not in Solr or Elasticsearch it should be your first reference. Amazon Affiliate Link
https://bitbucket.org/tortoisehg/hgtk/
Unknown | 99 lines | 77 code | 22 blank | 0 comment | 0 complexity | 0d9ff9d481869e97f7ae689af4352910 MD5 | raw file
 1%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 2# Pure python package
 3%define debug_package %{nil} 
 4
 5Name:		tortoisehg
 6Version:	hg
 7Release:	hg
 8Summary:	Mercurial GUI command line tool thg
 9Group:		Development/Tools
10License:	GPLv2
11# Few files are under the more permissive GPLv2+
12URL:		http://tortoisehg.org
13Source0:	%{name}-%{version}.tar.gz
14BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15# This package should be noarch, but we can't do it because the nautilus
16# subpackage has to be arch-specific (because of lib64)
17# BuildArch:	noarch
18BuildRequires:	python, python-devel, gettext, python-sphinx
19BuildRequires:	PyQt4-devel
20Requires:	python >= 2.4, python-iniparse, mercurial >= 1.6
21# gconf needs at util/shlib.py for browse_url(url).
22Requires:	gnome-python2-gconf
23Requires:	PyQt4 >= 4.6, qscintilla-python
24
25%description
26This package contains the thg command line tool which provides a 
27graphical user interface to the Mercurial distributed revision control system. 
28
29%package	nautilus
30Summary:	Mercurial GUI plugin to Nautilus file manager 
31Group:		Development/Tools
32Requires:	%{name} = %{version}-%{release}, nautilus-python
33
34%description	nautilus
35This package contains the TortoiseHg Gnome/Nautilus extension,
36which makes the Mercurial distributed revision control 
37system available in the file manager with a graphical interface. 
38
39%prep
40%setup -q
41
42# Fedora Nautilus python extensions lives in lib64 on x86_64 (https://bugzilla.redhat.com/show_bug.cgi?id=509633) ...
43%{__sed} -i "s,lib/nautilus,%{_lib}/nautilus,g" setup.py
44
45cat > tortoisehg/util/config.py << EOT
46bin_path     = "%{_bindir}"
47license_path = "%{_docdir}/%{name}-%{version}/COPYING.txt"
48locale_path  = "%{_datadir}/locale"
49icon_path    = "%{_datadir}/pixmaps/tortoisehg/icons"
50nofork       = True
51EOT
52
53%build
54%{__python} setup.py build
55
56(cd doc && make html)
57rm -f doc/build/html/.buildinfo
58
59%install
60rm -rf $RPM_BUILD_ROOT
61
62%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
63
64install -m 644 -D contrib/_hgtk $RPM_BUILD_ROOT/%{_datadir}/zsh/site-functions/_hgtk
65
66mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
67install contrib/mergetools.rc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/thgmergetools.rc
68
69ln -s tortoisehg/icons/svg/thg_logo.svg %{buildroot}%{_datadir}/pixmaps/%{name}_logo.svg
70desktop-file-install --dir=%{buildroot}%{_datadir}/applications contrib/%{name}.desktop
71
72%find_lang %{name}
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%files -f %{name}.lang
78
79%defattr(-,root,root,-)
80%doc COPYING.txt doc/build/html/
81%{_bindir}/thg
82%{python_sitelib}/tortoisehg/
83%{python_sitelib}/tortoisehg-*.egg-info
84%{_datadir}/pixmaps/tortoisehg/
85%{_datadir}/pixmaps/%{name}_logo.svg
86%{_datadir}/applications/%{name}.desktop
87
88# /usr/share/zsh/site-functions/ is owned by zsh package which we don't want to
89# require. We also don't want to create a sub-package just for this dependency.
90# Instead we just claim ownership of the zsh top folder ...
91%{_datadir}/zsh
92
93%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/thgmergetools.rc
94
95%files nautilus
96%defattr(-,root,root,-)
97%{_libdir}/nautilus/extensions-2.0/python/nautilus-thg.py*
98
99%changelog