]> git.pld-linux.org Git - SPECS.git/blob - mercurial.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / mercurial.spec
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.
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 #
7 # Conditional build:
8 %bcond_without  tests   # don't run tests
9
10 %define         webapp          hgweb
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
16 Name:           mercurial
17 Version:        4.7
18 Release:        1
19 License:        GPL v2+
20 Group:          Development/Version Control
21 Source0:        https://www.mercurial-scm.org/release/%{name}-%{version}.tar.gz
22 # Source0-md5:  a7ba37fb38308218fdb1f7ad37caa305
23
24 Source2:        %{name}-%{webapp}.config
25 Source3:        %{name}-%{webapp}-httpd.config
26
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)
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
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
60   O(1)
61 - pełne indeksowanie plików i zmian w celu szybkiego przeglądania
62   historii projektu
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
70 - licencja GPL
71
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
78
79 %description -n python-%{name}
80 Mercurial Distributed SCM - Python libraries.
81
82 %description -n python-%{name} -l pl.UTF-8
83 Rozproszony system kontroli wersji Mercurial - biblioteki Pythona.
84
85 %package hgweb
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
91 Requires:       webapps
92
93 %description hgweb
94 CGI scripts for serving Mercurial repositories.
95
96 %description hgweb -l pl.UTF-8
97 Skrypty CGI do serwowania repozytoriów Mercuriala.
98
99 %package hgk
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
105
106 %description hgk
107 A tool called that allows browsing the history of a repository in a
108 GUI.
109
110 To enable it add to .hgrc file:
111 [extensions]
112 hgk=
113
114 %description hgk -l pl.UTF-8
115 Narzędzie pozwalające na przeglądanie historii repozytorium w
116 graficznym interfejsie użytkownika.
117
118 Aby je uaktywnić, należy dodać do pliku .hgrc:
119 [extensions]
120 hgk=
121
122 %prep
123 %setup -q
124
125 %patch1 -p1
126
127 # fails on builders due to lack of networking
128 %{__rm} tests/test-clonebundles.t
129
130 # flaky tests
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
132
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
135
136 %build
137 %py_build
138 %{__make} -C doc
139
140 %if %{with tests}
141 cd tests
142 %{__python} run-tests.py %{?_smp_mflags} --verbose
143 %endif
144
145 %install
146 rm -rf $RPM_BUILD_ROOT
147 %py_install
148
149 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/mercurial/dummycert.pem
150
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
156
157 install -p contrib/hgk $RPM_BUILD_ROOT%{_bindir}
158
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
162
163 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
164 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
165 %py_postclean
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %triggerin hgweb -- apache1 < 1.3.37-3, apache1-base
171 %webapp_register apache %{webapp}
172
173 %triggerun hgweb -- apache1 < 1.3.37-3, apache1-base
174 %webapp_unregister apache %{webapp}
175
176 %triggerin hgweb -- apache < 2.2.0, apache-base
177 %webapp_register httpd %{webapp}
178
179 %triggerun hgweb -- apache < 2.2.0, apache-base
180 %webapp_unregister httpd %{webapp}
181
182 %files
183 %defattr(644,root,root,755)
184 %doc CONTRIBUTORS README.rst
185 %attr(755,root,root) %{_bindir}/hg
186 %{_mandir}/man1/*.1*
187 %{_mandir}/man5/*.5*
188
189 %files -n python-%{name}
190 %defattr(644,root,root,755)
191 %{py_sitedir}/hgdemandimport
192 %{py_sitedir}/hgext
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
231
232 %files hgweb
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{cgibindir}/hgweb.cgi
235 %dir %{webappdir}
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
239
240 %files hgk
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_bindir}/hgk
This page took 0.131512 seconds and 3 git commands to generate.