]>
Commit | Line | Data |
---|---|---|
adde08c6 ER |
1 | # NOTE |
2 | # - Warning: tests will fail if at same time tests are running (shared hw for | |
3 | # builders) as fixed port 20059 is used. | |
16082de7 ER |
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) | |
4e0b2d15 JB |
6 | # |
7 | # Conditional build: | |
8 | %bcond_without tests # don't run tests | |
246e7e3a | 9 | |
31134157 AZ |
10 | %define webapp hgweb |
11 | %define webappdir %{_sysconfdir}/webapps/%{webapp} | |
12 | %define appdir %{_datadir}/%{webapp} | |
13 | %define cgibindir %{_prefix}/lib/cgi-bin | |
3389c39a | 14 | Summary: Mercurial Distributed SCM |
6145427b | 15 | Summary(pl.UTF-8): Mercurial - rozproszony system kontroli wersji |
3389c39a | 16 | Name: mercurial |
2eab62f5 | 17 | Version: 3.7.3 |
3ff483b4 | 18 | Release: 2 |
6145427b | 19 | License: GPL v2+ |
3389c39a | 20 | Group: Development/Version Control |
6145427b | 21 | Source0: https://www.mercurial-scm.org/release/%{name}-%{version}.tar.gz |
2eab62f5 | 22 | # Source0-md5: f47c9c76b7bf429dafecb71fa81c01b4 |
d968fef6 | 23 | Source1: gtools.py |
31134157 | 24 | Source2: %{name}-%{webapp}.config |
de44d27e | 25 | Source3: %{name}-%{webapp}-httpd.config |
f5febaf0 | 26 | Patch0: %{name}-doc.patch |
ebd2c384 | 27 | Patch1: %{name}-clean-environment.patch |
6145427b | 28 | URL: https://www.mercurial-scm.org/ |
9b468815 | 29 | BuildRequires: gettext-tools |
6145427b JB |
30 | BuildRequires: python >= 1:2.6 |
31 | BuildRequires: python-devel >= 1:2.6 | |
69d0b03c | 32 | BuildRequires: python-docutils |
6145427b | 33 | BuildRequires: python-pygtk-gtk >= 2:2.0 |
450b5e9f | 34 | BuildRequires: rpm-pythonprov |
4e0b2d15 | 35 | BuildRequires: rpmbuild(macros) >= 1.219 |
d1ba3182 | 36 | %{?with_tests:BuildRequires: unzip} |
00cd48bc | 37 | Requires: python-%{name} = %{version}-%{release} |
3389c39a AM |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
41 | Mercurial is a fast, lightweight source control management system | |
42 | designed for efficient handling of very large distributed projects. | |
43 | Features include: | |
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 | |
53 | - GPL license | |
54 | ||
d4c687a2 JR |
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 | |
4260c403 | 60 | O(1) |
d4c687a2 | 61 | - pełne indeksowanie plików i zmian w celu szybkiego przeglądania |
4260c403 | 62 | historii projektu |
d4c687a2 JR |
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ń | |
4260c403 | 68 | - zintegrowany samodzielny interfejs WWW |
d4c687a2 | 69 | - mały kod podstawowy w Pythonie |
4260c403 JB |
70 | - licencja GPL |
71 | ||
00cd48bc | 72 | %package -n python-%{name} |
6145427b JB |
73 | Summary: Mercurial Distributed SCM - Python libraries |
74 | Summary(pl.UTF-8): Rozproszony system kontroli wersji Mercurial - biblioteki Pythona | |
00cd48bc | 75 | Group: Libraries/Python |
6145427b | 76 | Requires: python-modules >= 1:2.6 |
034a503e | 77 | Conflicts: mercurial < 3.5.2-2 |
00cd48bc ER |
78 | |
79 | %description -n python-%{name} | |
6145427b JB |
80 | Mercurial Distributed SCM - Python libraries. |
81 | ||
82 | %description -n python-%{name} -l pl.UTF-8 | |
83 | Rozproszony system kontroli wersji Mercurial - biblioteki Pythona. | |
00cd48bc | 84 | |
31134157 | 85 | %package hgweb |
6145427b JB |
86 | Summary: Scripts for serving Mercurial repositories over HTTP |
87 | Summary(pl.UTF-8): Skrypty do serwowania repozytoriów Mercuriala przez HTTP | |
f5febaf0 ŁK |
88 | Group: Development/Version Control |
89 | Requires: %{name} = %{version}-%{release} | |
3ff483b4 | 90 | Requires: apache(mod_wsgi) >= 1.1 |
f5febaf0 | 91 | Requires: webapps |
31134157 AZ |
92 | |
93 | %description hgweb | |
6145427b | 94 | CGI scripts for serving Mercurial repositories. |
31134157 AZ |
95 | |
96 | %description hgweb -l pl.UTF-8 | |
6145427b | 97 | Skrypty CGI do serwowania repozytoriów Mercuriala. |
31134157 | 98 | |
c307bc15 AM |
99 | %package hgk |
100 | Summary: GUI for mercurial | |
52f9d671 | 101 | Summary(pl.UTF-8): Graficzny interfejs użytkownika dla systemu Mercurial |
c307bc15 | 102 | Group: Development/Version Control |
04fa3935 | 103 | Requires: %{name} = %{version}-%{release} |
246e7e3a | 104 | Requires: python-modules |
c307bc15 AM |
105 | |
106 | %description hgk | |
107 | A tool called that allows browsing the history of a repository in a | |
539d5d89 AM |
108 | GUI. |
109 | ||
110 | To enable it add to .hgrc file: | |
111 | [extensions] | |
112 | hgk= | |
c307bc15 | 113 | |
d4c687a2 JR |
114 | %description hgk -l pl.UTF-8 |
115 | Narzędzie pozwalające na przeglądanie historii repozytorium w | |
116 | graficznym interfejsie użytkownika. | |
04fa3935 | 117 | |
d4c687a2 | 118 | Aby je uaktywnić, należy dodać do pliku .hgrc: |
04fa3935 JB |
119 | [extensions] |
120 | hgk= | |
121 | ||
3389c39a AM |
122 | %prep |
123 | %setup -q | |
f5febaf0 | 124 | %patch0 -p1 |
ebd2c384 | 125 | %patch1 -p0 |
246e7e3a | 126 | cp -p %{SOURCE1} hgext/gtools.py |
3389c39a | 127 | |
2eab62f5 JR |
128 | # remove flaky tests failing due to glib deprecation warnings |
129 | %{__rm} tests/{test-help.t,test-extension.t,test-alias.t,test-status-color.t,test-i18n.t,test-qrecord.t,test-strict.t,test-duplicateoptions.py} | |
130 | ||
611c0bf8 JR |
131 | # fails on builders due to lack of networking |
132 | %{__rm} tests/test-clonebundles.t | |
133 | ||
543a5934 JR |
134 | # flaky tests |
135 | %{__rm} tests/{test-template-engine.t,test-convert-cvs-synthetic.t,test-parse-date.t} | |
611c0bf8 JR |
136 | |
137 | %ifarch x32 | |
543a5934 | 138 | %{__rm} tests/test-context.py |
611c0bf8 JR |
139 | %endif |
140 | ||
3389c39a | 141 | %build |
2eab62f5 | 142 | %py_build |
3307d15f | 143 | %{__make} -C doc |
3389c39a | 144 | |
246e7e3a ER |
145 | %if %{with tests} |
146 | cd tests | |
147 | %{__python} run-tests.py %{?_smp_mflags} --verbose | |
148 | %endif | |
2c53a060 | 149 | |
3389c39a AM |
150 | %install |
151 | rm -rf $RPM_BUILD_ROOT | |
2eab62f5 | 152 | %py_install |
3389c39a | 153 | |
1bd6c33b ER |
154 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/mercurial/dummycert.pem |
155 | ||
246e7e3a ER |
156 | install -d $RPM_BUILD_ROOT{%{cgibindir},%{webappdir}} |
157 | install -p *.cgi $RPM_BUILD_ROOT%{cgibindir} | |
158 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/%{webapp}.config | |
159 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf | |
160 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf | |
31134157 | 161 | |
246e7e3a | 162 | install -p contrib/hgk $RPM_BUILD_ROOT%{_bindir} |
95f88bfb JB |
163 | |
164 | install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5} | |
246e7e3a ER |
165 | cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
166 | cp -p doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5 | |
95f88bfb | 167 | |
539d5d89 AM |
168 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
169 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
0bc1cadd | 170 | %py_postclean |
c307bc15 | 171 | |
3389c39a AM |
172 | %clean |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
31134157 AZ |
175 | %triggerin hgweb -- apache1 < 1.3.37-3, apache1-base |
176 | %webapp_register apache %{webapp} | |
177 | ||
178 | %triggerun hgweb -- apache1 < 1.3.37-3, apache1-base | |
179 | %webapp_unregister apache %{webapp} | |
180 | ||
de44d27e | 181 | %triggerin hgweb -- apache < 2.2.0, apache-base |
31134157 AZ |
182 | %webapp_register httpd %{webapp} |
183 | ||
de44d27e | 184 | %triggerun hgweb -- apache < 2.2.0, apache-base |
31134157 AZ |
185 | %webapp_unregister httpd %{webapp} |
186 | ||
3389c39a AM |
187 | %files |
188 | %defattr(644,root,root,755) | |
3307d15f | 189 | %doc CONTRIBUTORS README |
c307bc15 | 190 | %attr(755,root,root) %{_bindir}/hg |
00cd48bc ER |
191 | %{_mandir}/man1/*.1* |
192 | %{_mandir}/man5/*.5* | |
193 | ||
194 | %files -n python-%{name} | |
195 | %defattr(644,root,root,755) | |
d23331ad | 196 | %{py_sitedir}/hgext |
3389c39a AM |
197 | %dir %{py_sitedir}/%{name} |
198 | %attr(755,root,root) %{py_sitedir}/%{name}/*.so | |
199 | %{py_sitedir}/%{name}/*.py[co] | |
f4d2f4f0 | 200 | %{py_sitedir}/%{name}/default.d |
57f91a7c | 201 | %{py_sitedir}/%{name}/help |
d23331ad | 202 | %{py_sitedir}/%{name}/hgweb |
69d0b03c | 203 | %{py_sitedir}/%{name}/httpclient |
2eab62f5 | 204 | %{py_sitedir}/%{name}/pure |
3389c39a | 205 | %{py_sitedir}/%{name}/templates |
ced76801 AM |
206 | %dir %{py_sitedir}/%{name}/locale |
207 | %lang(da) %{py_sitedir}/%{name}/locale/da | |
5a3b4339 AM |
208 | %lang(de) %{py_sitedir}/%{name}/locale/de |
209 | %lang(el) %{py_sitedir}/%{name}/locale/el | |
210 | %lang(fr) %{py_sitedir}/%{name}/locale/fr | |
ced76801 AM |
211 | %lang(it) %{py_sitedir}/%{name}/locale/it |
212 | %lang(ja) %{py_sitedir}/%{name}/locale/ja | |
5a3b4339 | 213 | %lang(pt_BR) %{py_sitedir}/%{name}/locale/pt_BR |
727fddc7 | 214 | %lang(ro) %{py_sitedir}/%{name}/locale/ro |
69d0b03c | 215 | %lang(ru) %{py_sitedir}/%{name}/locale/ru |
57f91a7c | 216 | %lang(sv) %{py_sitedir}/%{name}/locale/sv |
5a3b4339 AM |
217 | %lang(zh_CN) %{py_sitedir}/%{name}/locale/zh_CN |
218 | %lang(zh_TW) %{py_sitedir}/%{name}/locale/zh_TW | |
6145427b | 219 | %{py_sitedir}/mercurial-%{version}-py*.egg-info |
c307bc15 | 220 | |
31134157 AZ |
221 | %files hgweb |
222 | %defattr(644,root,root,755) | |
6145427b | 223 | %attr(755,root,root) %{cgibindir}/hgweb.cgi |
31134157 AZ |
224 | %dir %{webappdir} |
225 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/apache.conf | |
226 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/hgweb.config | |
227 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/httpd.conf | |
228 | ||
c307bc15 AM |
229 | %files hgk |
230 | %defattr(644,root,root,755) | |
231 | %attr(755,root,root) %{_bindir}/hgk |