2 # - Warning: tests will fail if at same time tests are running (shared hw for
3 # builders) as fixed port 20059 is used.
4 # - Warning: tests will fail inside vserver as binding to localhost, peername
5 # is not 127.0.0.1 (will be ip of interfaces/0/ip instead)
8 %bcond_without tests # don't run tests
11 %define webappdir %{_sysconfdir}/webapps/%{webapp}
12 %define appdir %{_datadir}/%{webapp}
13 %define cgibindir %{_prefix}/lib/cgi-bin
14 Summary: Mercurial Distributed SCM
15 Summary(pl.UTF-8): Mercurial - rozproszony system kontroli wersji
20 Group: Development/Version Control
21 Source0: https://www.mercurial-scm.org/release/%{name}-%{version}.tar.gz
22 # Source0-md5: a7ba37fb38308218fdb1f7ad37caa305
24 Source2: %{name}-%{webapp}.config
25 Source3: %{name}-%{webapp}-httpd.config
27 Patch1: %{name}-clean-environment.patch
28 URL: https://www.mercurial-scm.org/
29 BuildRequires: gettext-tools
30 BuildRequires: python >= 1:2.6
31 BuildRequires: python-devel >= 1:2.6
32 BuildRequires: python-docutils
33 BuildRequires: python-pygtk-gtk >= 2:2.0
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.219
36 %{?with_tests:BuildRequires: unzip}
37 Requires: python-%{name} = %{version}-%{release}
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Mercurial is a fast, lightweight source control management system
42 designed for efficient handling of very large distributed projects.
44 - O(1) delta-compressed file storage and retrieval scheme
45 - Complete cross-indexing of file and changesets for efficient
46 exploration of project history
47 - Robust SHA1-based integrity checking and append-only storage model
48 - Decentralized development model with arbitrary merging between trees
49 - High-speed HTTP-based network merge protocol
50 - Easy-to-use command-line interface
51 - Integrated stand-alone web interface
52 - Small Python codebase
55 %description -l pl.UTF-8
56 Mercurial to szybki, lekki system zarządzania kodem źródłowym
57 zaprojektowany do wydajnej obsługi bardzo dużych rozproszonych
58 projektów. Możliwości obejmują:
59 - przechowywanie skompresowanych plików różnic i schemat odtwarzania
61 - pełne indeksowanie plików i zmian w celu szybkiego przeglądania
63 - silne, oparte na SHA1 sprawdzanie integralności oraz model
64 przechowywania z samym dołączaniem
65 - zdecentralizowany model rozwoju z dowolnym łączeniem między drzewami
66 - szybki protokół łączenia po sieci oparty na HTTP
67 - łatwy w użyciu interfejs linii poleceń
68 - zintegrowany samodzielny interfejs WWW
69 - mały kod podstawowy w Pythonie
72 %package -n python-%{name}
73 Summary: Mercurial Distributed SCM - Python libraries
74 Summary(pl.UTF-8): Rozproszony system kontroli wersji Mercurial - biblioteki Pythona
75 Group: Libraries/Python
76 Requires: python-modules >= 1:2.6
77 Conflicts: mercurial < 3.5.2-2
79 %description -n python-%{name}
80 Mercurial Distributed SCM - Python libraries.
82 %description -n python-%{name} -l pl.UTF-8
83 Rozproszony system kontroli wersji Mercurial - biblioteki Pythona.
86 Summary: Scripts for serving Mercurial repositories over HTTP
87 Summary(pl.UTF-8): Skrypty do serwowania repozytoriów Mercuriala przez HTTP
88 Group: Development/Version Control
89 Requires: %{name} = %{version}-%{release}
90 Requires: apache(mod_wsgi) >= 1.1
94 CGI scripts for serving Mercurial repositories.
96 %description hgweb -l pl.UTF-8
97 Skrypty CGI do serwowania repozytoriów Mercuriala.
100 Summary: GUI for mercurial
101 Summary(pl.UTF-8): Graficzny interfejs użytkownika dla systemu Mercurial
102 Group: Development/Version Control
103 Requires: %{name} = %{version}-%{release}
104 Requires: python-modules
107 A tool called that allows browsing the history of a repository in a
110 To enable it add to .hgrc file:
114 %description hgk -l pl.UTF-8
115 Narzędzie pozwalające na przeglądanie historii repozytorium w
116 graficznym interfejsie użytkownika.
118 Aby je uaktywnić, należy dodać do pliku .hgrc:
127 # fails on builders due to lack of networking
128 %{__rm} tests/test-clonebundles.t
131 %{__rm} tests/{test-convert-cvs-synthetic,test-convert-cvs,test-convert-cvs-detectmerge,test-convert-cvsnt-mergepoints,test-convert-cvs-branch,test-parse-date,test-gpg}.t
133 %{__sed} -i -e '1s|#!/usr/bin/env python$|#!%{__python3}|' hgweb.cgi
134 %{__sed} -i -e '1s|#!/usr/bin/env wish$|#!/usr/bin/wish|' contrib/hgk
142 %{__python} run-tests.py %{?_smp_mflags} --verbose
146 rm -rf $RPM_BUILD_ROOT
149 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/mercurial/dummycert.pem
151 install -d $RPM_BUILD_ROOT{%{cgibindir},%{webappdir}}
152 install -p *.cgi $RPM_BUILD_ROOT%{cgibindir}
153 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/%{webapp}.config
154 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
155 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
157 install -p contrib/hgk $RPM_BUILD_ROOT%{_bindir}
159 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5}
160 cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
161 cp -p doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
163 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
164 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
168 rm -rf $RPM_BUILD_ROOT
170 %triggerin hgweb -- apache1 < 1.3.37-3, apache1-base
171 %webapp_register apache %{webapp}
173 %triggerun hgweb -- apache1 < 1.3.37-3, apache1-base
174 %webapp_unregister apache %{webapp}
176 %triggerin hgweb -- apache < 2.2.0, apache-base
177 %webapp_register httpd %{webapp}
179 %triggerun hgweb -- apache < 2.2.0, apache-base
180 %webapp_unregister httpd %{webapp}
183 %defattr(644,root,root,755)
184 %doc CONTRIBUTORS README.rst
185 %attr(755,root,root) %{_bindir}/hg
189 %files -n python-%{name}
190 %defattr(644,root,root,755)
191 %{py_sitedir}/hgdemandimport
193 %{py_sitedir}/hgext3rd
194 %dir %{py_sitedir}/%{name}
195 %attr(755,root,root) %{py_sitedir}/%{name}/*.so
196 %{py_sitedir}/%{name}/*.py[co]
197 %dir %{py_sitedir}/%{name}/cext
198 %{py_sitedir}/%{name}/cext/*.py[co]
199 %attr(755,root,root) %{py_sitedir}/%{name}/cext/*.so
200 %{py_sitedir}/%{name}/cffi
201 %{py_sitedir}/%{name}/default.d
202 %{py_sitedir}/%{name}/help
203 %{py_sitedir}/%{name}/hgweb
204 %{py_sitedir}/%{name}/pure
205 %{py_sitedir}/%{name}/templates
206 %dir %{py_sitedir}/%{name}/thirdparty
207 %{py_sitedir}/%{name}/thirdparty/*.py[co]
208 %{py_sitedir}/%{name}/thirdparty/attr
209 %{py_sitedir}/%{name}/thirdparty/cbor
210 %{py_sitedir}/%{name}/thirdparty/concurrent
211 %dir %{py_sitedir}/%{name}/thirdparty/zope
212 %{py_sitedir}/%{name}/thirdparty/zope/*.py[co]
213 %dir %{py_sitedir}/%{name}/thirdparty/zope/interface
214 %{py_sitedir}/%{name}/thirdparty/zope/interface/*.py[co]
215 %attr(755,root,root) %{py_sitedir}/%{name}/thirdparty/zope/interface/*.so
216 %{py_sitedir}/%{name}/utils
217 %dir %{py_sitedir}/%{name}/locale
218 %lang(da) %{py_sitedir}/%{name}/locale/da
219 %lang(de) %{py_sitedir}/%{name}/locale/de
220 %lang(el) %{py_sitedir}/%{name}/locale/el
221 %lang(fr) %{py_sitedir}/%{name}/locale/fr
222 %lang(it) %{py_sitedir}/%{name}/locale/it
223 %lang(ja) %{py_sitedir}/%{name}/locale/ja
224 %lang(pt_BR) %{py_sitedir}/%{name}/locale/pt_BR
225 %lang(ro) %{py_sitedir}/%{name}/locale/ro
226 %lang(ru) %{py_sitedir}/%{name}/locale/ru
227 %lang(sv) %{py_sitedir}/%{name}/locale/sv
228 %lang(zh_CN) %{py_sitedir}/%{name}/locale/zh_CN
229 %lang(zh_TW) %{py_sitedir}/%{name}/locale/zh_TW
230 %{py_sitedir}/mercurial-%{version}-py*.egg-info
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{cgibindir}/hgweb.cgi
236 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/apache.conf
237 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/hgweb.config
238 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/httpd.conf
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_bindir}/hgk