]> git.pld-linux.org Git - packages/mercurial.git/blob - mercurial.spec
2cabb421da3841f4be5a3ac642927cf4ae4165c4
[packages/mercurial.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:        3.7.3
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:  f47c9c76b7bf429dafecb71fa81c01b4
23 Source1:        gtools.py
24 Source2:        %{name}-%{webapp}.config
25 Source3:        %{name}-%{webapp}-httpd.config
26 Patch0:         %{name}-doc.patch
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 %patch0 -p1
125 %patch1 -p0
126 cp -p %{SOURCE1} hgext/gtools.py
127
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
131 # fails on builders due to lack of networking
132 %{__rm} tests/test-clonebundles.t
133
134 # flaky tests
135 %{__rm} tests/{test-template-engine.t,test-convert-cvs-synthetic.t,test-parse-date.t}
136
137 %ifarch x32
138 %{__rm} tests/test-context.py
139 %endif
140
141 %build
142 %py_build
143 %{__make} -C doc
144
145 %if %{with tests}
146 cd tests
147 %{__python} run-tests.py %{?_smp_mflags} --verbose
148 %endif
149
150 %install
151 rm -rf $RPM_BUILD_ROOT
152 %py_install
153
154 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/mercurial/dummycert.pem
155
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
161
162 install -p contrib/hgk $RPM_BUILD_ROOT%{_bindir}
163
164 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5}
165 cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
166 cp -p doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
167
168 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
169 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
170 %py_postclean
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
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
181 %triggerin hgweb -- apache < 2.2.0, apache-base
182 %webapp_register httpd %{webapp}
183
184 %triggerun hgweb -- apache < 2.2.0, apache-base
185 %webapp_unregister httpd %{webapp}
186
187 %files
188 %defattr(644,root,root,755)
189 %doc CONTRIBUTORS README
190 %attr(755,root,root) %{_bindir}/hg
191 %{_mandir}/man1/*.1*
192 %{_mandir}/man5/*.5*
193
194 %files -n python-%{name}
195 %defattr(644,root,root,755)
196 %{py_sitedir}/hgext
197 %dir %{py_sitedir}/%{name}
198 %attr(755,root,root) %{py_sitedir}/%{name}/*.so
199 %{py_sitedir}/%{name}/*.py[co]
200 %{py_sitedir}/%{name}/default.d
201 %{py_sitedir}/%{name}/help
202 %{py_sitedir}/%{name}/hgweb
203 %{py_sitedir}/%{name}/httpclient
204 %{py_sitedir}/%{name}/pure
205 %{py_sitedir}/%{name}/templates
206 %dir %{py_sitedir}/%{name}/locale
207 %lang(da) %{py_sitedir}/%{name}/locale/da
208 %lang(de) %{py_sitedir}/%{name}/locale/de
209 %lang(el) %{py_sitedir}/%{name}/locale/el
210 %lang(fr) %{py_sitedir}/%{name}/locale/fr
211 %lang(it) %{py_sitedir}/%{name}/locale/it
212 %lang(ja) %{py_sitedir}/%{name}/locale/ja
213 %lang(pt_BR) %{py_sitedir}/%{name}/locale/pt_BR
214 %lang(ro) %{py_sitedir}/%{name}/locale/ro
215 %lang(ru) %{py_sitedir}/%{name}/locale/ru
216 %lang(sv) %{py_sitedir}/%{name}/locale/sv
217 %lang(zh_CN) %{py_sitedir}/%{name}/locale/zh_CN
218 %lang(zh_TW) %{py_sitedir}/%{name}/locale/zh_TW
219 %{py_sitedir}/mercurial-%{version}-py*.egg-info
220
221 %files hgweb
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{cgibindir}/hgweb.cgi
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
229 %files hgk
230 %defattr(644,root,root,755)
231 %attr(755,root,root) %{_bindir}/hgk
This page took 0.06691 seconds and 2 git commands to generate.