]>
Commit | Line | Data |
---|---|---|
1f630180 | 1 | # TODO: |
1930bef0 | 2 | # - remove net_client_only and add db bcond (then without apache and |
3 | # without db => net_client_only - spec will be more simpler, I think) | |
d46e45ba | 4 | # - finish ruby |
1930bef0 | 5 | # |
bab73684 | 6 | # Conditional build: |
65c1d4bd | 7 | %bcond_with net_client_only # build only net client |
d02cc5b7 | 8 | %bcond_without neon # use neon instead of serf |
65c1d4bd JB |
9 | %bcond_without python # build without python bindings (broken) |
10 | %bcond_without perl # build without perl bindings | |
73ab938a | 11 | %bcond_without ruby # build without ruby bindings |
65c1d4bd JB |
12 | %bcond_without apache # build without apache support (webdav, etc) |
13 | %bcond_without javahl # build without javahl support (Java high-level bindings) | |
14 | %bcond_without tests # don't perform "make check" | |
7b27380f | 15 | # |
bc126282 | 16 | %ifnarch i586 i686 pentium3 pentium4 athlon %{x8664} |
c2f5643d | 17 | %undefine with_javahl |
bc126282 AG |
18 | %endif |
19 | # | |
b56474ff | 20 | %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl} |
f4070f5f | 21 | %define apxs /usr/sbin/apxs |
1f630180 ER |
22 | %define pdir SVN |
23 | %define pnam _Core | |
12ae68c1 | 24 | # |
04129f48 | 25 | %if %{with neon} |
a510fada | 26 | %define webdavlib neon |
04129f48 AG |
27 | %else |
28 | %define webdavlib serf | |
a510fada AM |
29 | %endif |
30 | # | |
67cb9518 | 31 | Summary: A Concurrent Versioning system similar to but better than CVS |
abe3c421 ER |
32 | Summary(pl.UTF-8): System kontroli wersji podobny, ale lepszy, niż CVS |
33 | Summary(pt_BR.UTF-8): Sistema de versionamento concorrente | |
93b78127 | 34 | Name: subversion |
263c941e | 35 | Version: 1.5.2 |
d6d473d2 | 36 | Release: 4 |
6f88d80e | 37 | License: Apache/BSD-like |
93b78127 | 38 | Group: Development/Version Control |
af7b0bac | 39 | Source0: http://subversion.tigris.org/downloads/%{name}-%{version}.tar.bz2 |
263c941e | 40 | # Source0-md5: 8321d0e1964846090f0174cb6bb18838 |
93b78127 | 41 | Source1: %{name}-dav_svn.conf |
65318afa | 42 | Source2: %{name}-authz_svn.conf |
b56474ff AM |
43 | Source3: %{name}-svnserve.init |
44 | Source4: %{name}-svnserve.sysconfig | |
a510fada AM |
45 | # current subversion tarball has correct *.swg files |
46 | # but after regeneration these are broken again, so | |
47 | # we still need this script | |
f313e9a9 | 48 | Source5: %{name}-convert-typemaps-to-ifdef.py |
ed6210a2 | 49 | Patch0: %{name}-home_etc.patch |
d46e45ba | 50 | Patch1: %{name}-DESTDIR.patch |
00664663 | 51 | Patch2: %{name}-ruby-datadir-path.patch |
a510fada | 52 | Patch3: %{name}-tests.patch |
d2bf70bf | 53 | URL: http://subversion.tigris.org/ |
4945947e AM |
54 | %if %{with net_client_only} |
55 | %global apache_modules_api 0 | |
56 | %else | |
f2a757d6 | 57 | %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8} |
7b27380f | 58 | BuildRequires: automake |
3817faf5 | 59 | BuildRequires: db-devel >= 4.1.25 |
e8d9186f | 60 | BuildRequires: rpmbuild(macros) >= 1.268 |
0905b458 | 61 | %if %{with perl} |
522a69b4 | 62 | BuildRequires: perl-devel >= 1:5.8.0 |
63 | BuildRequires: rpm-perlprov >= 4.1-13 | |
15f9818d | 64 | BuildRequires: swig-perl >= 1.3.24 |
536b3fd3 | 65 | %endif |
1cc7453a | 66 | %{?with_javahl:BuildRequires: jdk} |
0905b458 | 67 | %endif |
16429189 | 68 | BuildRequires: apr-devel >= 1:1.0.0 |
a6ecf312 | 69 | BuildRequires: apr-util-devel >= 1:1.2.8-3 |
b0a7a5b2 | 70 | BuildRequires: autoconf >= 2.59 |
79d8c53c | 71 | BuildRequires: bison |
12ae68c1 | 72 | BuildRequires: cyrus-sasl-devel |
93b78127 | 73 | BuildRequires: expat-devel |
86ea8fde | 74 | BuildRequires: gettext-devel |
f4e6a380 | 75 | BuildRequires: libtool >= 1.4-9 |
a562165a JB |
76 | BuildRequires: sed >= 4.0 |
77 | BuildRequires: texinfo | |
78 | BuildRequires: which | |
79 | %if %{with neon} | |
bd3c99a8 | 80 | BuildRequires: neon-devel >= 0.26.0 |
a562165a JB |
81 | %else |
82 | BuildRequires: serf-devel | |
e3ad24ea | 83 | %endif |
53855fbf | 84 | BuildRequires: python >= 2.2 |
ed6210a2 | 85 | BuildRequires: python-modules >= 2.2 |
f313e9a9 | 86 | %if %{with python} |
87 | BuildRequires: python-devel >= 2.2 | |
15f9818d | 88 | BuildRequires: swig-python >= 1.3.24 |
0905b458 | 89 | %endif |
a562165a JB |
90 | %if %{with ruby} |
91 | BuildRequires: ruby-devel | |
92 | BuildRequires: swig-ruby >= 1.3.24 | |
93 | %endif | |
027f8ebe | 94 | Requires: %{name}-libs = %{version}-%{release} |
93b78127 AM |
95 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
96 | ||
f4070f5f | 97 | %define _libexecdir %{_libdir}/svn |
1af5e34d ER |
98 | %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
99 | %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
93b78127 AM |
100 | |
101 | %description | |
102 | The goal of the Subversion project is to build a version control | |
103 | system that is a compelling replacement for CVS in the open source | |
104 | community. | |
105 | ||
106 | Our goals are: | |
107 | - All current CVS features. | |
108 | - Directories, renames, and file meta-data are versioned. | |
109 | - Symbolic links, etc, are supported | |
110 | - Commits are truly atomic. | |
111 | - Branching and tagging are cheap (constant time) operations | |
112 | - Repeated merges are handled gracefully | |
113 | - Support for plug-in client side diff programs | |
114 | - Natively client/server | |
115 | - Client/server protocol sends diffs in both directions | |
116 | - Costs are proportional to change size, not project size | |
117 | - Internationalization | |
118 | - Progressive multi-lingual support | |
119 | ||
aa59005f | 120 | %description -l pl.UTF-8 |
93b78127 AM |
121 | Celem projektu Subversion jest stworzenie systemu kontroli wersji jako |
122 | zamiennika dla CVS. | |
123 | ||
124 | Cele projektu to: | |
aa59005f | 125 | - Wszystkie aktualne możliwości CVS. |
24406120 JB |
126 | - Katalogi, zmiany nazw oraz metadane plików są wersjonowane. |
127 | - Obsługa dowiązań symbolicznych itp. | |
aa59005f JR |
128 | - Commity są w pełni atomowe. |
129 | - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami. | |
24406120 JB |
130 | - Dobra obsługa powtarzanego łączenia (merge). |
131 | - Obsługa wtyczek diff po stronie klienta. | |
93b78127 | 132 | - Natywny klient/serwer. |
aa59005f | 133 | - Klient/Serwer przesyłają diffy w obu kierunkach. |
93b78127 AM |
134 | - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu. |
135 | - Internacjonalizacja. | |
aa59005f | 136 | - Postępujące wsparcie dla wielu języków. |
93b78127 | 137 | |
aa59005f JR |
138 | %description -l pt_BR.UTF-8 |
139 | O objetivo do projeto Subversion é construir um sistema de controle de | |
140 | versões que seja um substituto para o CVS (Concurrent Versioning | |
92066deb | 141 | System) na comunidade opensource, fornecendo grandes melhorias. |
142 | ||
f4e6a380 AM |
143 | %package libs |
144 | Summary: Subversion libraries and modules | |
abe3c421 | 145 | Summary(pl.UTF-8): Biblioteka subversion oraz ładowalne moduły |
f4e6a380 | 146 | Group: Libraries |
04129f48 | 147 | %{?with_neon:Requires: neon >= 0.26.0} |
53855fbf | 148 | Obsoletes: libsubversion0 |
f4e6a380 AM |
149 | |
150 | %description libs | |
151 | Subversion libraries and modules. | |
152 | ||
aa59005f JR |
153 | %description libs -l pl.UTF-8 |
154 | Biblioteka subversion oraz ładowalne moduły. | |
f4e6a380 | 155 | |
93b78127 AM |
156 | %package devel |
157 | Summary: Header files and develpment documentation for subversion | |
abe3c421 ER |
158 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do subversion |
159 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento para o Subversion | |
93b78127 | 160 | Group: Development/Libraries |
9cb7e099 | 161 | Requires: %{name}-libs = %{version}-%{release} |
c5b1d686 | 162 | Requires: apr-util-devel >= 1:1.0.0 |
04129f48 | 163 | %{?with_neon:Requires: neon-devel >= 0.26.0} |
12cf252c | 164 | Obsoletes: libsubversion0-devel |
93b78127 AM |
165 | |
166 | %description devel | |
167 | Header files and develpment documentation for subversion. | |
168 | ||
aa59005f JR |
169 | %description devel -l pl.UTF-8 |
170 | Pliki nagłówkowe i dokumetacja do subversion. | |
93b78127 | 171 | |
aa59005f JR |
172 | %description devel -l pt_BR.UTF-8 |
173 | Este pacote provê os arquivos necessários para desenvolvedores | |
92066deb | 174 | interagirem com o Subversion. |
175 | ||
93b78127 AM |
176 | %package static |
177 | Summary: Static subversion library | |
abe3c421 ER |
178 | Summary(pl.UTF-8): Biblioteka statyczna subversion |
179 | Summary(pt_BR.UTF-8): Sistema de versionamento concorrente | |
93b78127 AM |
180 | Group: Development/Libraries |
181 | Requires: %{name}-devel = %{version} | |
12cf252c | 182 | Obsoletes: libsubversion0-static-devel |
93b78127 AM |
183 | |
184 | %description static | |
185 | Static subversion library. | |
186 | ||
aa59005f | 187 | %description static -l pl.UTF-8 |
93b78127 AM |
188 | Biblioteka statyczna subversion. |
189 | ||
aa59005f JR |
190 | %description static -l pt_BR.UTF-8 |
191 | Este pacote provê um cliente estático do subversion. | |
92066deb | 192 | |
b56474ff AM |
193 | %package svnserve |
194 | Summary: Subversion svnserve | |
abe3c421 | 195 | Summary(pl.UTF-8): Subversion svnserve |
b56474ff | 196 | Group: Networking/Daemons |
3817faf5 | 197 | Requires(post,preun): /sbin/chkconfig |
93f1d402 | 198 | Requires(postun): /usr/sbin/groupdel |
199 | Requires(postun): /usr/sbin/userdel | |
200 | Requires(pre): /bin/id | |
201 | Requires(pre): /usr/bin/getgid | |
202 | Requires(pre): /usr/lib/rpm/user_group.sh | |
203 | Requires(pre): /usr/sbin/groupadd | |
204 | Requires(pre): /usr/sbin/useradd | |
205 | Requires(pre): /usr/sbin/usermod | |
9cb7e099 | 206 | Requires: %{name} = %{version}-%{release} |
7b27380f | 207 | Requires: rc-scripts |
a1bac09d MŁ |
208 | Provides: group(svn) |
209 | Provides: user(svn) | |
b56474ff AM |
210 | |
211 | %description svnserve | |
212 | Subversion svnserve server. | |
213 | ||
aa59005f | 214 | %description svnserve -l pl.UTF-8 |
b56474ff AM |
215 | Serwer subversion svnserve. |
216 | ||
4bbdbbf8 AM |
217 | %package tools |
218 | Summary: Subversion tools and scripts | |
abe3c421 ER |
219 | Summary(pl.UTF-8): Narzędzia oraz skrypty dla subversion |
220 | Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion | |
4bbdbbf8 | 221 | Group: Applications |
4bbdbbf8 | 222 | %pyrequires_eq python |
7b27380f | 223 | Requires: %{name} = %{version}-%{release} |
1271c9bd | 224 | Requires: python-rcsparse >= 0.1-0.20031026.0 |
4bbdbbf8 AM |
225 | Requires: python-subversion = %{version} |
226 | ||
227 | %description tools | |
228 | Subversion tools and scripts. | |
229 | ||
aa59005f JR |
230 | %description tools -l pl.UTF-8 |
231 | Narzędzia oraz skrypty dla subversion. | |
4bbdbbf8 | 232 | |
fe5bb6bb | 233 | %package -n bash-completion-subversion |
234 | Summary: bash completion for subversion | |
abe3c421 | 235 | Summary(pl.UTF-8): Dopełnienia basha dla subversion |
fe5bb6bb | 236 | Group: Applications/Shells |
e30588c4 | 237 | Requires: %{name} = %{version}-%{release} |
53855fbf | 238 | Requires: bash-completion |
e30588c4 | 239 | Conflicts: %{name}-tools <= 1.1.0-0.rc6.1 |
fe5bb6bb | 240 | |
241 | %description -n bash-completion-subversion | |
242 | Bash completion for subversion. | |
243 | ||
aa59005f JR |
244 | %description -n bash-completion-subversion -l pl.UTF-8 |
245 | Dopełnienia basha dla subversion. | |
fe5bb6bb | 246 | |
1cc7453a | 247 | %package -n java-subversion |
65c1d4bd JB |
248 | Summary: Subversion Java bindings |
249 | Summary(pl.UTF-8): Dowiązania do Subversion dla Javy | |
1cc7453a | 250 | Group: Development/Languages/Java |
251 | Requires: %{name}-libs = %{version}-%{release} | |
252 | ||
253 | %description -n java-subversion | |
254 | This is a set of Java classes which provide the functionality of | |
255 | subversion-libs, the Subversion libraries. It is useful if you want | |
256 | to, for example, write a Java class that manipulates a Subversion | |
257 | repository or working copy. See the 'subversion' package for more | |
258 | information. | |
259 | ||
65c1d4bd JB |
260 | %description -n java-subversion -l pl.UTF-8 |
261 | Ten pakiet zawiera zestaw klas Javy udostępniających funkcjonalność | |
262 | subversion-libs, czyli bibliotek Subversion. Jest przydatny przy | |
d46e45ba AM |
263 | pisaniu klas Javy np. modyfikujących repozytorium Subversion lub kopię |
264 | roboczą. Więcej informacji w pakiecie subversion. | |
65c1d4bd | 265 | |
fa3ff1b2 | 266 | %package -n python-subversion |
65c1d4bd JB |
267 | Summary: Subversion Python bindings |
268 | Summary(pl.UTF-8): Dowiązania do Subversion dla Pythona | |
269 | Summary(pt_BR.UTF-8): Módulos Python para acessar os recursos do Subversion | |
f4e6a380 | 270 | Group: Development/Languages/Python |
f4e6a380 | 271 | %pyrequires_eq python |
9cb7e099 | 272 | Requires: %{name}-libs = %{version}-%{release} |
53855fbf | 273 | Obsoletes: subversion-python |
f4e6a380 | 274 | |
fa3ff1b2 | 275 | %description -n python-subversion |
65c1d4bd | 276 | Subversion Python bindings. |
f4e6a380 | 277 | |
aa59005f | 278 | %description -n python-subversion -l pl.UTF-8 |
65c1d4bd | 279 | Dowiązania do Subversion dla Pythona. |
f4e6a380 | 280 | |
aa59005f | 281 | %description -n python-subversion -l pt_BR.UTF-8 |
65c1d4bd | 282 | Módulos Python para acessar os recursos do Subversion. |
92066deb | 283 | |
b56474ff | 284 | %package -n perl-subversion |
65c1d4bd JB |
285 | Summary: Subversion Perl bindings |
286 | Summary(pl.UTF-8): Dowiązania do Subversion dla Perla | |
287 | Summary(pt_BR.UTF-8): Módulos Perl para acessar os recursos do Subversion | |
b56474ff | 288 | Group: Development/Languages/Perl |
9cb7e099 | 289 | Requires: %{name}-libs = %{version}-%{release} |
53855fbf | 290 | Obsoletes: subversion-perl |
b56474ff AM |
291 | |
292 | %description -n perl-subversion | |
65c1d4bd | 293 | Subversion Perl bindings. |
b56474ff | 294 | |
aa59005f | 295 | %description -n perl-subversion -l pl.UTF-8 |
65c1d4bd | 296 | Dowiązania do Subversion dla Perla. |
b56474ff | 297 | |
aa59005f | 298 | %description -n perl-subversion -l pt_BR.UTF-8 |
65c1d4bd | 299 | Módulos Perl para acessar os recursos do Subversion. |
b56474ff | 300 | |
d46e45ba AM |
301 | %package -n ruby-subversion |
302 | Summary: Subversion Ruby bindings | |
d2bf70bf | 303 | Summary(pl.UTF-8): Dowiązania do Subversion dla języka Ruby |
d46e45ba AM |
304 | Summary(pt_BR.UTF-8): Módulos Ruby para acessar os recursos do Subversion |
305 | Group: Development/Languages | |
306 | Requires: %{name}-libs = %{version}-%{release} | |
307 | Obsoletes: subversion-ruby | |
308 | ||
309 | %description -n ruby-subversion | |
310 | Subversion Ruby bindings. | |
311 | ||
312 | %description -n ruby-subversion -l pl.UTF-8 | |
d2bf70bf | 313 | Dowiązania do Subversion dla języka Ruby. |
d46e45ba AM |
314 | |
315 | %description -n ruby-subversion -l pt_BR.UTF-8 | |
316 | Módulos Ruby para acessar os recursos do Subversion. | |
317 | ||
93b78127 AM |
318 | %package -n apache-mod_dav_svn |
319 | Summary: Apache module: Subversion Server | |
abe3c421 | 320 | Summary(pl.UTF-8): Moduł apache: Serwer Subversion |
93b78127 | 321 | Group: Networking/Daemons |
7b27380f | 322 | Requires: %{name} = %{version}-%{release} |
53855fbf | 323 | Requires: apache(modules-api) = %apache_modules_api |
7887b1ac | 324 | Requires: apache-mod_dav |
93b78127 AM |
325 | |
326 | %description -n apache-mod_dav_svn | |
327 | Apache module: Subversion Server. | |
328 | ||
aa59005f JR |
329 | %description -n apache-mod_dav_svn -l pl.UTF-8 |
330 | Moduł apache: Serwer Subversion. | |
93b78127 | 331 | |
65318afa AF |
332 | %package -n apache-mod_authz_svn |
333 | Summary: Apache module: Subversion Server - path-based authorization | |
abe3c421 | 334 | Summary(pl.UTF-8): Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion |
65318afa | 335 | Group: Networking/Daemons |
53855fbf | 336 | Requires: apache(modules-api) = %apache_modules_api |
9cb7e099 | 337 | Requires: apache-mod_dav_svn = %{version}-%{release} |
65318afa AF |
338 | |
339 | %description -n apache-mod_authz_svn | |
340 | Apache module: Subversion Server - path-based authorization. | |
341 | ||
aa59005f JR |
342 | %description -n apache-mod_authz_svn -l pl.UTF-8 |
343 | Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion. | |
e23909be | 344 | |
93b78127 | 345 | %prep |
af7b0bac | 346 | %setup -q |
e30588c4 | 347 | rm -rf apr apr-util neon |
ed6210a2 | 348 | %patch0 -p0 |
d4bccc60 | 349 | %patch1 -p1 |
00664663 | 350 | %patch2 -p0 |
a510fada AM |
351 | %patch3 -p0 |
352 | ||
353 | sed -i -e 's#serf_prefix/lib#serf_prefix/%{_lib}#g' build/ac-macros/serf.m4 | |
354 | ||
355 | # serf.m4 macro is broken and ignores --without serf | |
244bdb04 | 356 | %{?with_neon:sed -i -e 's#serf_found="yes"#serf_found="no"#g' build/ac-macros/serf.m4} |
027f8ebe | 357 | |
93b78127 | 358 | %build |
93f1d402 | 359 | rm subversion/bindings/swig/proxy/*.swg |
24406120 | 360 | cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../.. |
a7bcb345 | 361 | cp -f /usr/share/automake/config.sub ac-helpers |
67cb9518 | 362 | chmod +x ./autogen.sh && ./autogen.sh |
8a3d9172 | 363 | |
93b78127 | 364 | %configure \ |
5dfeafd7 | 365 | --with-editor=vi \ |
12ae68c1 | 366 | --with-zlib=%{_libdir} \ |
536b3fd3 AM |
367 | %if %{with net_client_only} |
368 | --without-apache \ | |
369 | --without-swig \ | |
370 | --without-apxs \ | |
371 | --without-berkeley-db \ | |
372 | %else | |
fa6fa2cf | 373 | --disable-runtime-module-search \ |
86ee97d3 | 374 | --disable-mod-activation \ |
0905b458 | 375 | %if %{with apache} |
536b3fd3 | 376 | --with-apxs=%{_sbindir}/apxs \ |
0905b458 | 377 | %else |
378 | --without-apache \ | |
379 | --without-apxs \ | |
536b3fd3 | 380 | --with-berkeley-db=%{_includedir}/db4:%{_libdir} \ |
0905b458 | 381 | %endif |
73ab938a | 382 | %if !%{with python} && !%{with perl} && !%{with ruby} |
0905b458 | 383 | --without-swig \ |
384 | %endif | |
1cc7453a | 385 | --%{?with_javahl:en}%{!?with_javahl:dis}able-javahl \ |
536b3fd3 | 386 | %endif |
1cc7453a | 387 | --with-jdk="%{java_home}" \ |
04129f48 | 388 | %if %{with neon} |
e3ad24ea | 389 | --without-serf \ |
e30588c4 | 390 | --with-neon=%{_prefix} \ |
78f330c4 | 391 | --disable-neon-version-check \ |
04129f48 AG |
392 | %else |
393 | --with-serf=%{_prefix} \ | |
394 | --without-neon \ | |
e3ad24ea | 395 | %endif |
16429189 | 396 | --with-apr=%{_bindir}/apr-1-config \ |
397 | --with-apr-util=%{_bindir}/apu-1-config | |
536b3fd3 | 398 | |
1f630180 | 399 | %{__make} -j1 |
536b3fd3 | 400 | |
cf353d53 | 401 | %if !%{with net_client_only} |
b56474ff | 402 | # python |
0905b458 | 403 | %if %{with python} |
86a4919e | 404 | %{__make} swig-py \ |
65318afa AF |
405 | swig_pydir=%{py_sitedir}/libsvn \ |
406 | swig_pydir_extra=%{py_sitedir}/svn | |
0905b458 | 407 | %endif |
b56474ff | 408 | # perl |
0905b458 | 409 | %if %{with perl} |
bf539998 AM |
410 | %{__make} swig-pl-lib |
411 | odir=$(pwd) | |
412 | cd subversion/bindings/swig/perl/native | |
413 | %{__perl} Makefile.PL INSTALLDIRS=vendor | |
b445847c | 414 | %{__make} -j1 |
bf539998 | 415 | cd $odir |
536b3fd3 | 416 | %endif |
1cc7453a | 417 | %if %{with javahl} |
b445847c | 418 | %{__make} -j1 javahl \ |
1cc7453a | 419 | javahl_javadir="%{_javadir}" |
420 | %endif | |
d46e45ba AM |
421 | # ruby |
422 | %if %{with ruby} | |
423 | %{__make} swig-rb | |
424 | %endif | |
12ae68c1 AM |
425 | %endif |
426 | ||
427 | %if %{with tests} | |
428 | %{__make} check | |
d46e45ba AM |
429 | %if %{with python} |
430 | %{__make} check-swig-py | |
431 | %endif | |
432 | %if %{with perl} | |
433 | %{__make} check-swig-pl | |
434 | %endif | |
435 | %if %{with ruby} | |
436 | %{__make} check-swig-rb | |
437 | %endif | |
0905b458 | 438 | %endif |
93b78127 AM |
439 | |
440 | %install | |
441 | rm -rf $RPM_BUILD_ROOT | |
1326bb99 | 442 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \ |
1af5e34d | 443 | $RPM_BUILD_ROOT{%{apacheconfdir},%{apachelibdir},%{_infodir}} \ |
afb35189 | 444 | $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \ |
a54611db | 445 | $RPM_BUILD_ROOT/home/services/subversion{,/repos} |
93b78127 | 446 | |
1f630180 | 447 | %{__make} install -j1 \ |
1cc7453a | 448 | %if %{with javahl} |
449 | install-javahl \ | |
450 | javahl_javadir="%{_javadir}" \ | |
451 | %endif | |
d46e45ba AM |
452 | %if !%{with net_client_only} |
453 | %if %{with python} | |
0905b458 | 454 | install-swig-py \ |
d46e45ba AM |
455 | %endif |
456 | %if %{with ruby} | |
457 | install-swig-rb install-swig-rb-doc \ | |
458 | %endif | |
0905b458 | 459 | %endif |
f2a757d6 | 460 | APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \ |
86a4919e | 461 | DESTDIR=$RPM_BUILD_ROOT \ |
65318afa AF |
462 | swig_pydir=%{py_sitedir}/libsvn \ |
463 | swig_pydir_extra=%{py_sitedir}/svn | |
93b78127 | 464 | |
cf353d53 | 465 | %if !%{with net_client_only} && %{with perl} |
bf539998 AM |
466 | %{__make} install-swig-pl-lib \ |
467 | DESTDIR=$RPM_BUILD_ROOT | |
b445847c | 468 | %{__make} -C subversion/bindings/swig/perl/native install \ |
bf539998 AM |
469 | DESTDIR=$RPM_BUILD_ROOT \ |
470 | PREFIX=$RPM_BUILD_ROOT%{_prefix} \ | |
471 | LIBDIR=$RPM_BUILD_ROOT%{_libdir} | |
bf539998 AM |
472 | %endif |
473 | ||
0905b458 | 474 | %if %{with apache} |
1af5e34d ER |
475 | install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/65_mod_dav_svn.conf |
476 | install %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/66_mod_authz_svn.conf | |
b56474ff AM |
477 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve |
478 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve | |
0905b458 | 479 | %endif |
93b78127 | 480 | |
cf353d53 | 481 | %if !%{with net_client_only} |
1326bb99 | 482 | install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup |
0905b458 | 483 | %if %{with python} |
f4e6a380 AM |
484 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
485 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
1326bb99 JK |
486 | find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f |
487 | install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version} | |
536b3fd3 | 488 | %endif |
0905b458 | 489 | %endif |
f4e6a380 | 490 | |
1326bb99 JK |
491 | install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name} |
492 | install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
1326bb99 | 493 | |
205a3ddc AM |
494 | %find_lang %{name} |
495 | ||
b445847c JB |
496 | rm -f $RPM_BUILD_ROOT%{_libdir}/libsvn{javahl,_swig}*.{la,a} |
497 | rm -f $RPM_BUILD_ROOT%{_libdir}/ruby/site_ruby/svn/ext/*.la | |
a6ecf312 | 498 | |
e23909be JB |
499 | %clean |
500 | rm -rf $RPM_BUILD_ROOT | |
501 | ||
a1bac09d MŁ |
502 | %pre svnserve |
503 | %groupadd -g 86 svn | |
504 | %useradd -u 180 -d /home/services/subversion -c "Subversion svnserve" -g svn svn | |
505 | ||
d2bf70bf JB |
506 | %post libs -p /sbin/ldconfig |
507 | %postun libs -p /sbin/ldconfig | |
508 | ||
509 | %post devel -p /sbin/postshell | |
6f99c3bd | 510 | -/usr/sbin/fix-info-dir -c %{_infodir} |
93b78127 | 511 | |
d2bf70bf | 512 | %postun devel -p /sbin/postshell |
6f99c3bd | 513 | -/usr/sbin/fix-info-dir -c %{_infodir} |
93b78127 | 514 | |
d2bf70bf JB |
515 | %post -n perl-subversion -p /sbin/ldconfig |
516 | %postun -n perl-subversion -p /sbin/ldconfig | |
517 | ||
518 | %post -n python-subversion -p /sbin/ldconfig | |
519 | %postun -n python-subversion -p /sbin/ldconfig | |
f4e6a380 | 520 | |
b56474ff | 521 | %post svnserve |
e8d9186f ER |
522 | /sbin/chkconfig --add svnserve |
523 | %service svnserve restart "svnserve daemon" | |
524 | ||
b56474ff AM |
525 | %preun svnserve |
526 | if [ "$1" = "0" ]; then | |
e8d9186f ER |
527 | %service svnserve stop |
528 | /sbin/chkconfig --del svnserve | |
b56474ff AM |
529 | fi |
530 | ||
a1bac09d MŁ |
531 | %postun svnserve |
532 | if [ "$1" = "0" ]; then | |
533 | %userremove svn | |
534 | %groupremove svn | |
535 | fi | |
536 | ||
93b78127 | 537 | %post -n apache-mod_dav_svn |
e8d9186f | 538 | %service -q httpd restart |
93b78127 AM |
539 | |
540 | %preun -n apache-mod_dav_svn | |
541 | if [ "$1" = "0" ]; then | |
e8d9186f | 542 | %service -q httpd restart |
93b78127 AM |
543 | fi |
544 | ||
93b78127 AM |
545 | %files |
546 | %defattr(644,root,root,755) | |
983a49f6 | 547 | %doc BUGS CHANGES COPYING INSTALL README |
d37298dc | 548 | %doc doc/*/*.html |
4bbdbbf8 AM |
549 | %doc tools/hook-scripts/*.{pl,py,example} |
550 | %doc tools/hook-scripts/mailer/*.{py,example} | |
1326bb99 | 551 | %doc tools/xslt/* |
b445847c JB |
552 | %attr(755,root,root) %{_bindir}/svn |
553 | %attr(755,root,root) %{_bindir}/svnadmin | |
554 | %attr(755,root,root) %{_bindir}/svndumpfilter | |
555 | %attr(755,root,root) %{_bindir}/svnlook | |
556 | %attr(755,root,root) %{_bindir}/svnsync | |
557 | %attr(755,root,root) %{_bindir}/svnversion | |
558 | %{_mandir}/man1/svn.1* | |
559 | %{_mandir}/man1/svnadmin.1* | |
560 | %{_mandir}/man1/svndumpfilter.1* | |
561 | %{_mandir}/man1/svnlook.1* | |
562 | %{_mandir}/man1/svnsync.1* | |
563 | %{_mandir}/man1/svnversion.1* | |
f4e6a380 | 564 | |
205a3ddc | 565 | %files libs -f %{name}.lang |
f4e6a380 | 566 | %defattr(644,root,root,755) |
b445847c JB |
567 | %attr(755,root,root) %{_libdir}/libsvn_client-1.so.*.*.* |
568 | %attr(755,root,root) %ghost %{_libdir}/libsvn_client-1.so.0 | |
569 | %attr(755,root,root) %{_libdir}/libsvn_delta-1.so.*.*.* | |
570 | %attr(755,root,root) %ghost %{_libdir}/libsvn_delta-1.so.0 | |
571 | %attr(755,root,root) %{_libdir}/libsvn_diff-1.so.*.*.* | |
572 | %attr(755,root,root) %ghost %{_libdir}/libsvn_diff-1.so.0 | |
573 | %attr(755,root,root) %{_libdir}/libsvn_fs-1.so.*.*.* | |
574 | %attr(755,root,root) %ghost %{_libdir}/libsvn_fs-1.so.0 | |
575 | %attr(755,root,root) %{_libdir}/libsvn_fs_base-1.so.*.*.* | |
576 | %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_base-1.so.0 | |
577 | %attr(755,root,root) %{_libdir}/libsvn_fs_fs-1.so.*.*.* | |
578 | %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_fs-1.so.0 | |
579 | %attr(755,root,root) %{_libdir}/libsvn_fs_util-1.so.*.*.* | |
580 | %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_util-1.so.0 | |
581 | %attr(755,root,root) %{_libdir}/libsvn_ra-1.so.*.*.* | |
582 | %attr(755,root,root) %ghost %{_libdir}/libsvn_ra-1.so.0 | |
583 | %attr(755,root,root) %{_libdir}/libsvn_ra_local-1.so.*.*.* | |
584 | %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_local-1.so.0 | |
a510fada AM |
585 | %attr(755,root,root) %{_libdir}/libsvn_ra_%{webdavlib}-1.so.*.*.* |
586 | %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_%{webdavlib}-1.so.0 | |
b445847c JB |
587 | %attr(755,root,root) %{_libdir}/libsvn_ra_svn-1.so.*.*.* |
588 | %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_svn-1.so.0 | |
589 | %attr(755,root,root) %{_libdir}/libsvn_repos-1.so.*.*.* | |
590 | %attr(755,root,root) %ghost %{_libdir}/libsvn_repos-1.so.0 | |
591 | %attr(755,root,root) %{_libdir}/libsvn_subr-1.so.*.*.* | |
592 | %attr(755,root,root) %ghost %{_libdir}/libsvn_subr-1.so.0 | |
593 | %attr(755,root,root) %{_libdir}/libsvn_wc-1.so.*.*.* | |
594 | %attr(755,root,root) %ghost %{_libdir}/libsvn_wc-1.so.0 | |
93b78127 AM |
595 | |
596 | %files devel | |
597 | %defattr(644,root,root,755) | |
b445847c JB |
598 | %attr(755,root,root) %{_libdir}/libsvn_client-1.so |
599 | %attr(755,root,root) %{_libdir}/libsvn_delta-1.so | |
600 | %attr(755,root,root) %{_libdir}/libsvn_diff-1.so | |
601 | %attr(755,root,root) %{_libdir}/libsvn_fs-1.so | |
602 | %attr(755,root,root) %{_libdir}/libsvn_fs_base-1.so | |
603 | %attr(755,root,root) %{_libdir}/libsvn_fs_fs-1.so | |
604 | %attr(755,root,root) %{_libdir}/libsvn_fs_util-1.so | |
605 | %attr(755,root,root) %{_libdir}/libsvn_ra-1.so | |
606 | %attr(755,root,root) %{_libdir}/libsvn_ra_local-1.so | |
a510fada | 607 | %attr(755,root,root) %{_libdir}/libsvn_ra_%{webdavlib}-1.so |
b445847c JB |
608 | %attr(755,root,root) %{_libdir}/libsvn_ra_svn-1.so |
609 | %attr(755,root,root) %{_libdir}/libsvn_repos-1.so | |
610 | %attr(755,root,root) %{_libdir}/libsvn_subr-1.so | |
611 | %attr(755,root,root) %{_libdir}/libsvn_wc-1.so | |
612 | %{_libdir}/libsvn_client-1.la | |
613 | %{_libdir}/libsvn_delta-1.la | |
614 | %{_libdir}/libsvn_diff-1.la | |
615 | %{_libdir}/libsvn_fs-1.la | |
616 | %{_libdir}/libsvn_fs_base-1.la | |
617 | %{_libdir}/libsvn_fs_fs-1.la | |
618 | %{_libdir}/libsvn_fs_util-1.la | |
619 | %{_libdir}/libsvn_ra-1.la | |
620 | %{_libdir}/libsvn_ra_local-1.la | |
a510fada | 621 | %{_libdir}/libsvn_ra_%{webdavlib}-1.la |
b445847c JB |
622 | %{_libdir}/libsvn_ra_svn-1.la |
623 | %{_libdir}/libsvn_repos-1.la | |
624 | %{_libdir}/libsvn_subr-1.la | |
625 | %{_libdir}/libsvn_wc-1.la | |
626 | %{_includedir}/%{name}-1 | |
1326bb99 | 627 | %{_examplesdir}/%{name}-%{version} |
93b78127 AM |
628 | |
629 | %files static | |
630 | %defattr(644,root,root,755) | |
b445847c JB |
631 | %{_libdir}/libsvn_client-1.a |
632 | %{_libdir}/libsvn_delta-1.a | |
633 | %{_libdir}/libsvn_diff-1.a | |
634 | %{_libdir}/libsvn_fs-1.a | |
635 | %{_libdir}/libsvn_fs_base-1.a | |
636 | %{_libdir}/libsvn_fs_fs-1.a | |
637 | %{_libdir}/libsvn_fs_util-1.a | |
638 | %{_libdir}/libsvn_ra-1.a | |
639 | %{_libdir}/libsvn_ra_local-1.a | |
a510fada | 640 | %{_libdir}/libsvn_ra_%{webdavlib}-1.a |
b445847c JB |
641 | %{_libdir}/libsvn_ra_svn-1.a |
642 | %{_libdir}/libsvn_repos-1.a | |
643 | %{_libdir}/libsvn_subr-1.a | |
644 | %{_libdir}/libsvn_wc-1.a | |
93b78127 | 645 | |
cf353d53 | 646 | %if !%{with net_client_only} |
b56474ff AM |
647 | %files svnserve |
648 | %defattr(644,root,root,755) | |
649 | %attr(755,root,root) %{_bindir}/svnserve | |
b445847c JB |
650 | %{_mandir}/man5/svnserve.conf.5* |
651 | %{_mandir}/man8/svnserve.8* | |
a1bac09d MŁ |
652 | %dir %attr(750,svn,svn) /home/services/subversion |
653 | %dir %attr(750,svn,svn) /home/services/subversion/repos | |
0905b458 | 654 | %if %{with apache} |
b56474ff | 655 | %attr(754,root,root) /etc/rc.d/init.d/svnserve |
86ea8fde | 656 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve |
0905b458 | 657 | %endif |
b56474ff | 658 | |
4bbdbbf8 AM |
659 | %files tools |
660 | %defattr(644,root,root,755) | |
1326bb99 | 661 | %attr(755,root,root) %{_bindir}/svn-hot-backup |
fe5bb6bb | 662 | |
663 | %files -n bash-completion-subversion | |
101e74de | 664 | %defattr(644,root,root,755) |
1326bb99 | 665 | /etc/bash_completion.d/%{name} |
536b3fd3 | 666 | |
1cc7453a | 667 | %if %{with javahl} |
668 | %files -n java-subversion | |
669 | %defattr(644,root,root,755) | |
b445847c JB |
670 | %attr(755,root,root) %{_libdir}/libsvnjavahl-1.so.*.*.* |
671 | %attr(755,root,root) %ghost %{_libdir}/libsvnjavahl-1.so.0 | |
672 | %attr(755,root,root) %{_libdir}/libsvnjavahl-1.so | |
1cc7453a | 673 | %{_javadir}/svn-javahl.jar |
674 | %endif | |
675 | ||
0905b458 | 676 | %if %{with python} |
fa3ff1b2 | 677 | %files -n python-subversion |
f4e6a380 | 678 | %defattr(644,root,root,755) |
4bbdbbf8 | 679 | %doc tools/backup/*.py tools/examples/*.py |
b445847c JB |
680 | %attr(755,root,root) %{_libdir}/libsvn_swig_py-1.so.*.*.* |
681 | %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_py-1.so.0 | |
682 | %attr(755,root,root) %{_libdir}/libsvn_swig_py-1.so | |
65318afa | 683 | %dir %{py_sitedir}/libsvn |
65318afa | 684 | %{py_sitedir}/libsvn/*.py[co] |
b445847c JB |
685 | %dir %{py_sitedir}/svn |
686 | %{py_sitedir}/svn/*.py[co] | |
65318afa | 687 | %attr(755,root,root) %{py_sitedir}/libsvn/*.so |
1326bb99 | 688 | %{_examplesdir}/python-%{name}-%{version} |
0905b458 | 689 | %endif |
f4e6a380 | 690 | |
0905b458 | 691 | %if %{with perl} |
b56474ff AM |
692 | %files -n perl-subversion |
693 | %defattr(644,root,root,755) | |
b445847c JB |
694 | %attr(755,root,root) %{_libdir}/libsvn_swig_perl-1.so.*.*.* |
695 | %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_perl-1.so.0 | |
696 | %attr(755,root,root) %{_libdir}/libsvn_swig_perl-1.so | |
b56474ff AM |
697 | %{perl_vendorarch}/SVN |
698 | %dir %{perl_vendorarch}/auto/SVN | |
699 | %dir %{perl_vendorarch}/auto/SVN/* | |
700 | %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so | |
701 | %{perl_vendorarch}/auto/SVN/*/*.bs | |
702 | %{_mandir}/man3/*.3pm* | |
0905b458 | 703 | %endif |
b56474ff | 704 | |
d46e45ba AM |
705 | %if %{with ruby} |
706 | %files -n ruby-subversion | |
707 | %defattr(644,root,root,755) | |
b445847c JB |
708 | %attr(755,root,root) %{_libdir}/libsvn_swig_ruby-1.so.*.*.* |
709 | %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_ruby-1.so.0 | |
710 | %attr(755,root,root) %{_libdir}/libsvn_swig_ruby-1.so | |
711 | %dir %{_libdir}/ruby/site_ruby/svn | |
712 | %{_libdir}/ruby/site_ruby/svn/*.rb | |
713 | %dir %{_libdir}/ruby/site_ruby/svn/ext | |
714 | %attr(755,root,root) %{_libdir}/ruby/site_ruby/svn/ext/*.so | |
ab6adef9 | 715 | %{_datadir}/ri/*.*/system/OptionParser |
00664663 | 716 | %{_datadir}/ri/*.*/system/Svn |
717 | %{_datadir}/ri/*.*/system/Time | |
718 | %{_datadir}/ri/*.*/system/Uconv | |
719 | %{_datadir}/ri/*.*/system/*.rid | |
720 | %{_datadir}/ri/*.*/system/Kernel/* | |
d46e45ba AM |
721 | %endif |
722 | ||
0905b458 | 723 | %if %{with apache} |
93b78127 AM |
724 | %files -n apache-mod_dav_svn |
725 | %defattr(644,root,root,755) | |
1af5e34d ER |
726 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_dav_svn.conf |
727 | %attr(755,root,root) %{apachelibdir}/mod_dav_svn.so | |
65318afa AF |
728 | |
729 | %files -n apache-mod_authz_svn | |
730 | %defattr(644,root,root,755) | |
731 | %doc subversion/mod_authz_svn/INSTALL | |
1af5e34d ER |
732 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_authz_svn.conf |
733 | %attr(755,root,root) %{apachelibdir}/mod_authz_svn.so | |
536b3fd3 | 734 | %endif |
7b27380f ER |
735 | |
736 | %endif # net_client_only |