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)
6 # - Tests fail with python3 (state as of 6.5.1)
9 %bcond_with tests # don't run tests
12 %define webappdir %{_sysconfdir}/webapps/%{webapp}
13 %define appdir %{_datadir}/%{webapp}
14 %define cgibindir %{_prefix}/lib/cgi-bin
15 Summary: Mercurial Distributed SCM
16 Summary(pl.UTF-8): Mercurial - rozproszony system kontroli wersji
21 Group: Development/Version Control
22 Source0: https://www.mercurial-scm.org/release/%{name}-%{version}.tar.gz
23 # Source0-md5: fccff6981f362466b8e9e0fa0de0ddb6
25 Source2: %{name}-%{webapp}.config
26 Source3: %{name}-%{webapp}-httpd.config
28 Patch1: %{name}-clean-environment.patch
29 URL: https://www.mercurial-scm.org/
30 BuildRequires: gettext-tools
31 BuildRequires: python3 >= 1:3.6
32 BuildRequires: python3-devel >= 1:3.6
33 BuildRequires: python3-docutils
34 BuildRequires: python3-pygobject3-devel
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.219
37 %{?with_tests:BuildRequires: unzip}
38 Requires: python3-%{name} = %{version}-%{release}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Mercurial is a fast, lightweight source control management system
43 designed for efficient handling of very large distributed projects.
45 - O(1) delta-compressed file storage and retrieval scheme
46 - Complete cross-indexing of file and changesets for efficient
47 exploration of project history
48 - Robust SHA1-based integrity checking and append-only storage model
49 - Decentralized development model with arbitrary merging between trees
50 - High-speed HTTP-based network merge protocol
51 - Easy-to-use command-line interface
52 - Integrated stand-alone web interface
53 - Small Python codebase
56 %description -l pl.UTF-8
57 Mercurial to szybki, lekki system zarządzania kodem źródłowym
58 zaprojektowany do wydajnej obsługi bardzo dużych rozproszonych
59 projektów. Możliwości obejmują:
60 - przechowywanie skompresowanych plików różnic i schemat odtwarzania
62 - pełne indeksowanie plików i zmian w celu szybkiego przeglądania
64 - silne, oparte na SHA1 sprawdzanie integralności oraz model
65 przechowywania z samym dołączaniem
66 - zdecentralizowany model rozwoju z dowolnym łączeniem między drzewami
67 - szybki protokół łączenia po sieci oparty na HTTP
68 - łatwy w użyciu interfejs linii poleceń
69 - zintegrowany samodzielny interfejs WWW
70 - mały kod podstawowy w Pythonie
73 %package -n python3-%{name}
74 Summary: Mercurial Distributed SCM - Python libraries
75 Summary(pl.UTF-8): Rozproszony system kontroli wersji Mercurial - biblioteki Pythona
76 Group: Libraries/Python
77 Requires: python3-modules >= 1:3.6
78 Obsoletes: python-mercurial < 6.5.1
79 Conflicts: mercurial < 3.5.2-2
81 %description -n python3-%{name}
82 Mercurial Distributed SCM - Python 3 libraries.
84 %description -n python3-%{name} -l pl.UTF-8
85 Rozproszony system kontroli wersji Mercurial - biblioteki Pythona 3.
88 Summary: Scripts for serving Mercurial repositories over HTTP
89 Summary(pl.UTF-8): Skrypty do serwowania repozytoriów Mercuriala przez HTTP
90 Group: Development/Version Control
91 Requires: %{name} = %{version}-%{release}
92 Requires: apache(mod_wsgi) >= 1.1
96 CGI scripts for serving Mercurial repositories.
98 %description hgweb -l pl.UTF-8
99 Skrypty CGI do serwowania repozytoriów Mercuriala.
102 Summary: GUI for mercurial
103 Summary(pl.UTF-8): Graficzny interfejs użytkownika dla systemu Mercurial
104 Group: Development/Version Control
105 Requires: %{name} = %{version}-%{release}
106 Requires: python3-modules
109 A tool called that allows browsing the history of a repository in a
112 To enable it add to .hgrc file:
116 %description hgk -l pl.UTF-8
117 Narzędzie pozwalające na przeglądanie historii repozytorium w
118 graficznym interfejsie użytkownika.
120 Aby je uaktywnić, należy dodać do pliku .hgrc:
124 %package -n bash-completion-%{name}
125 Summary: Bash completion for Mercurial
126 Summary(pl.UTF-8): Bashowe dopełnianie parametrów Mercuriala
127 Group: Applications/Shells
128 Requires: %{name} = %{epoch}:%{version}-%{release}
129 Requires: bash-completion >= 2.0
131 %description -n bash-completion-%{name}
132 Bash completion for Mercurial.
134 %description -n bash-completion-%{name} -l pl.UTF-8
135 Bashowe dopełnianie parametrów Mercuriala.
137 %package -n zsh-completion-%{name}
138 Summary: Zsh completion for Mercurial
139 Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla Mercuriala
140 Group: Applications/Shells
141 Requires: %{name} = %{epoch}:%{version}-%{release}
144 %description -n zsh-completion-%{name}
145 Zsh completion for Mercurial.
147 %description -n zsh-completion-%{name} -l pl.UTF-8
148 Dopełnianie parametrów w zsh dla Mercuriala.
155 # fails on builders due to lack of networking
156 %{__rm} tests/test-clonebundles.t
159 %{__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
161 %{__sed} -i -e '1s|#!/usr/bin/env python3$|#!%{__python3}|' hgweb.cgi
162 %{__sed} -i -e '1s|#!/usr/bin/env wish$|#!/usr/bin/wish|' contrib/hgk
170 %{__python3} run-tests.py %{?_smp_mflags} --verbose
174 rm -rf $RPM_BUILD_ROOT
177 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/mercurial/dummycert.pem
179 install -d $RPM_BUILD_ROOT{%{cgibindir},%{webappdir}}
180 install -p *.cgi $RPM_BUILD_ROOT%{cgibindir}
181 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/%{webapp}.config
182 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
183 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
185 install -p contrib/hgk $RPM_BUILD_ROOT%{_bindir}
187 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5}
188 cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
189 cp -p doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
191 #py_comp $RPM_BUILD_ROOT%{py3_sitedir}
194 rm -rf $RPM_BUILD_ROOT
196 %triggerin hgweb -- apache1 < 1.3.37-3, apache1-base
197 %webapp_register apache %{webapp}
199 %triggerun hgweb -- apache1 < 1.3.37-3, apache1-base
200 %webapp_unregister apache %{webapp}
202 %triggerin hgweb -- apache < 2.2.0, apache-base
203 %webapp_register httpd %{webapp}
205 %triggerun hgweb -- apache < 2.2.0, apache-base
206 %webapp_unregister httpd %{webapp}
209 %defattr(644,root,root,755)
210 %doc CONTRIBUTORS README.rst
211 %attr(755,root,root) %{_bindir}/hg
215 %files -n python3-%{name}
216 %defattr(644,root,root,755)
217 %{py3_sitedir}/hgdemandimport
219 %{py3_sitedir}/hgext3rd
220 %dir %{py3_sitedir}/%{name}
221 %{py3_sitedir}/%{name}/__pycache__
222 %attr(755,root,root) %{py3_sitedir}/%{name}/*.so
223 %{py3_sitedir}/%{name}/*.py
224 %dir %{py3_sitedir}/%{name}/cext
225 %{py3_sitedir}/%{name}/cext/__pycache__
226 %{py3_sitedir}/%{name}/cext/*.py
227 %attr(755,root,root) %{py3_sitedir}/%{name}/cext/*.so
228 %{py3_sitedir}/%{name}/cffi
229 %{py3_sitedir}/%{name}/defaultrc
230 %{py3_sitedir}/%{name}/dirstateutils
231 %{py3_sitedir}/%{name}/helptext
232 %{py3_sitedir}/%{name}/hgweb
233 %{py3_sitedir}/%{name}/interfaces
234 %{py3_sitedir}/%{name}/pure
235 %{py3_sitedir}/%{name}/revlogutils
236 %{py3_sitedir}/%{name}/stabletailgraph
237 %{py3_sitedir}/%{name}/templates
238 %{py3_sitedir}/%{name}/testing
239 %dir %{py3_sitedir}/%{name}/thirdparty
240 %{py3_sitedir}/%{name}/thirdparty/__pycache__
241 %{py3_sitedir}/%{name}/thirdparty/*.py
242 %{py3_sitedir}/%{name}/thirdparty/attr
243 %attr(755,root,root) %{py3_sitedir}/%{name}/thirdparty/*.so
244 %dir %{py3_sitedir}/%{name}/thirdparty/zope
245 %{py3_sitedir}/%{name}/thirdparty/zope/__pycache__
246 %{py3_sitedir}/%{name}/thirdparty/zope/*.py
247 %dir %{py3_sitedir}/%{name}/thirdparty/zope/interface
248 %{py3_sitedir}/%{name}/thirdparty/zope/interface/__pycache__
249 %{py3_sitedir}/%{name}/thirdparty/zope/interface/*.py
250 %attr(755,root,root) %{py3_sitedir}/%{name}/thirdparty/zope/interface/*.so
251 %{py3_sitedir}/%{name}/upgrade_utils
252 %{py3_sitedir}/%{name}/utils
253 %dir %{py3_sitedir}/%{name}/locale
254 %lang(da) %{py3_sitedir}/%{name}/locale/da
255 %lang(de) %{py3_sitedir}/%{name}/locale/de
256 %lang(el) %{py3_sitedir}/%{name}/locale/el
257 %lang(fr) %{py3_sitedir}/%{name}/locale/fr
258 %lang(it) %{py3_sitedir}/%{name}/locale/it
259 %lang(ja) %{py3_sitedir}/%{name}/locale/ja
260 %lang(pt_BR) %{py3_sitedir}/%{name}/locale/pt_BR
261 %lang(ro) %{py3_sitedir}/%{name}/locale/ro
262 %lang(ru) %{py3_sitedir}/%{name}/locale/ru
263 %lang(sv) %{py3_sitedir}/%{name}/locale/sv
264 %lang(zh_CN) %{py3_sitedir}/%{name}/locale/zh_CN
265 %lang(zh_TW) %{py3_sitedir}/%{name}/locale/zh_TW
266 %{py3_sitedir}/mercurial-%{version}-py*.egg-info
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{cgibindir}/hgweb.cgi
272 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/apache.conf
273 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/hgweb.config
274 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/httpd.conf
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_bindir}/hgk
280 %files -n bash-completion-%{name}
281 %defattr(644,root,root,755)
284 %files -n zsh-completion-mercurial
285 %defattr(644,root,root,755)