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)
6 %bcond_with net_client_only # build only net client
7 %bcond_without python # build without python bindings (broken)
8 %bcond_without perl # build without perl bindings
9 %bcond_without apache # build without apache support (webdav, etc)
11 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
12 %define apxs /usr/sbin/apxs
15 Summary: A Concurrent Versioning system similar to but better than CVS
16 Summary(pl.UTF-8): System kontroli wersji podobny, ale lepszy, niż CVS
17 Summary(pt_BR.UTF-8): Sistema de versionamento concorrente
21 License: Apache/BSD Style
22 Group: Development/Version Control
23 Source0: http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
24 # Source0-md5: 3caf1d93e13ed09d76c42eff0f52dfaf
25 Source1: %{name}-dav_svn.conf
26 Source2: %{name}-authz_svn.conf
27 Source3: %{name}-svnserve.init
28 Source4: %{name}-svnserve.sysconfig
29 Source5: %{name}-convert-typemaps-to-ifdef.py
30 Patch0: %{name}-home_etc.patch
31 Patch1: %{name}-DESTDIR.patch
32 Patch2: %{name}-neon.patch
33 Patch3: %{name}-python_bindings.patch
34 Patch4: %{name}-swig.patch
35 URL: http://subversion.tigris.org/
36 %if %{with net_client_only}
37 %global apache_modules_api 0
39 %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8}
40 BuildRequires: automake
41 BuildRequires: db-devel >= 4.1.25
42 BuildRequires: rpmbuild(macros) >= 1.268
44 BuildRequires: perl-devel >= 1:5.8.0
45 BuildRequires: rpm-perlprov >= 4.1-13
46 BuildRequires: swig-perl >= 1.3.24
49 BuildRequires: apr-devel >= 1:1.0.0
50 BuildRequires: apr-util-devel >= 1:1.2.8-3
51 BuildRequires: autoconf >= 2.59
53 BuildRequires: expat-devel
54 BuildRequires: gettext-devel
55 BuildRequires: libtool >= 1.4-9
56 BuildRequires: neon-devel >= 0.26.0
57 BuildRequires: python >= 2.2
58 BuildRequires: python-modules >= 2.2
60 BuildRequires: python-devel >= 2.2
61 BuildRequires: sed >= 4.0
62 BuildRequires: swig-python >= 1.3.24
64 BuildRequires: texinfo
66 Requires: %{name}-libs = %{version}-%{release}
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 %define _apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
70 %define _libexecdir %{_libdir}/svn
73 The goal of the Subversion project is to build a version control
74 system that is a compelling replacement for CVS in the open source
78 - All current CVS features.
79 - Directories, renames, and file meta-data are versioned.
80 - Symbolic links, etc, are supported
81 - Commits are truly atomic.
82 - Branching and tagging are cheap (constant time) operations
83 - Repeated merges are handled gracefully
84 - Support for plug-in client side diff programs
85 - Natively client/server
86 - Client/server protocol sends diffs in both directions
87 - Costs are proportional to change size, not project size
88 - Internationalization
89 - Progressive multi-lingual support
91 %description -l pl.UTF-8
92 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
96 - Wszystkie aktualne możliwości CVS.
97 - Katalogi, zmiany nazw oraz metadane plików są wersjonowane.
98 - Obsługa dowiązań symbolicznych itp.
99 - Commity są w pełni atomowe.
100 - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami.
101 - Dobra obsługa powtarzanego łączenia (merge).
102 - Obsługa wtyczek diff po stronie klienta.
103 - Natywny klient/serwer.
104 - Klient/Serwer przesyłają diffy w obu kierunkach.
105 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
106 - Internacjonalizacja.
107 - Postępujące wsparcie dla wielu języków.
109 %description -l pt_BR.UTF-8
110 O objetivo do projeto Subversion é construir um sistema de controle de
111 versões que seja um substituto para o CVS (Concurrent Versioning
112 System) na comunidade opensource, fornecendo grandes melhorias.
115 Summary: Subversion libraries and modules
116 Summary(pl.UTF-8): Biblioteka subversion oraz ładowalne moduły
118 Requires: neon >= 0.26.0
119 Obsoletes: libsubversion0
122 Subversion libraries and modules.
124 %description libs -l pl.UTF-8
125 Biblioteka subversion oraz ładowalne moduły.
128 Summary: Header files and develpment documentation for subversion
129 Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do subversion
130 Summary(pt_BR.UTF-8): Arquivos de desenvolvimento para o Subversion
131 Group: Development/Libraries
132 Requires: %{name}-libs = %{version}-%{release}
133 Requires: apr-util-devel >= 1:1.0.0
134 Requires: neon-devel >= 0.26.0
135 Obsoletes: libsubversion0-devel
138 Header files and develpment documentation for subversion.
140 %description devel -l pl.UTF-8
141 Pliki nagłówkowe i dokumetacja do subversion.
143 %description devel -l pt_BR.UTF-8
144 Este pacote provê os arquivos necessários para desenvolvedores
145 interagirem com o Subversion.
148 Summary: Static subversion library
149 Summary(pl.UTF-8): Biblioteka statyczna subversion
150 Summary(pt_BR.UTF-8): Sistema de versionamento concorrente
151 Group: Development/Libraries
152 Requires: %{name}-devel = %{version}
153 Obsoletes: libsubversion0-static-devel
156 Static subversion library.
158 %description static -l pl.UTF-8
159 Biblioteka statyczna subversion.
161 %description static -l pt_BR.UTF-8
162 Este pacote provê um cliente estático do subversion.
165 Summary: Subversion svnserve
166 Summary(pl.UTF-8): Subversion svnserve
167 Group: Networking/Daemons
168 Requires(post,preun): /sbin/chkconfig
169 Requires: %{name} = %{version}-%{release}
172 %description svnserve
173 Subversion svnserve server.
175 %description svnserve -l pl.UTF-8
176 Serwer subversion svnserve.
179 Summary: Subversion tools and scripts
180 Summary(pl.UTF-8): Narzędzia oraz skrypty dla subversion
181 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
183 %pyrequires_eq python
184 Requires: %{name} = %{version}-%{release}
185 Requires: python-rcsparse >= 0.1-0.20031026.0
186 Requires: python-subversion = %{version}
189 Subversion tools and scripts.
191 %description tools -l pl.UTF-8
192 Narzędzia oraz skrypty dla subversion.
194 %package -n bash-completion-subversion
195 Summary: bash completion for subversion
196 Summary(pl.UTF-8): Dopełnienia basha dla subversion
197 Group: Applications/Shells
198 Requires: %{name} = %{version}-%{release}
199 Requires: bash-completion
200 Conflicts: %{name}-tools <= 1.1.0-0.rc6.1
202 %description -n bash-completion-subversion
203 Bash completion for subversion.
205 %description -n bash-completion-subversion -l pl.UTF-8
206 Dopełnienia basha dla subversion.
208 %package -n python-subversion
209 Summary: Subversion python bindings
210 Summary(pl.UTF-8): Dowiązania do subversion dla pythona
211 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
212 Group: Development/Languages/Python
213 %pyrequires_eq python
214 Requires: %{name}-libs = %{version}-%{release}
215 Obsoletes: subversion-python
217 %description -n python-subversion
218 Subversion python bindings.
220 %description -n python-subversion -l pl.UTF-8
221 Dowiązania do subversion dla pythona.
223 %description -n python-subversion -l pt_BR.UTF-8
224 Módulos python para acessar os recursos do Subversion.
226 %package -n perl-subversion
227 Summary: Subversion perl bindings
228 Summary(pl.UTF-8): Dowiązania do subversion dla perla
229 Summary(pt_BR.UTF-8): Módulos perl para acessar os recursos do Subversion
230 Group: Development/Languages/Perl
231 Requires: %{name}-libs = %{version}-%{release}
232 Obsoletes: subversion-perl
234 %description -n perl-subversion
235 Subversion perl bindings.
237 %description -n perl-subversion -l pl.UTF-8
238 Dowiązania do subversion dla perl.
240 %description -n perl-subversion -l pt_BR.UTF-8
241 Módulos perl para acessar os recursos do Subversion.
243 %package -n apache-mod_dav_svn
244 Summary: Apache module: Subversion Server
245 Summary(pl.UTF-8): Moduł apache: Serwer Subversion
246 Group: Networking/Daemons
247 Requires: %{name} = %{version}-%{release}
248 Requires: apache(modules-api) = %apache_modules_api
249 Requires: apache-mod_dav
251 %description -n apache-mod_dav_svn
252 Apache module: Subversion Server.
254 %description -n apache-mod_dav_svn -l pl.UTF-8
255 Moduł apache: Serwer Subversion.
257 %package -n apache-mod_authz_svn
258 Summary: Apache module: Subversion Server - path-based authorization
259 Summary(pl.UTF-8): Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion
260 Group: Networking/Daemons
261 Requires: apache(modules-api) = %apache_modules_api
262 Requires: apache-mod_dav_svn = %{version}-%{release}
264 %description -n apache-mod_authz_svn
265 Apache module: Subversion Server - path-based authorization.
267 %description -n apache-mod_authz_svn -l pl.UTF-8
268 Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion.
272 rm -rf apr apr-util neon
280 rm subversion/bindings/swig/proxy/*.swg
281 cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
282 cp -f /usr/share/automake/config.sub ac-helpers
283 chmod +x ./autogen.sh && ./autogen.sh
285 # don't enable dso - currently it's broken
289 --with-python=%{_bindir}/python \
290 --with-perl5=%{_bindir}/perl \
291 %if %{with net_client_only}
295 --without-berkeley-db \
298 --disable-mod-activation \
300 --with-apxs=%{_sbindir}/apxs \
304 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
306 %if !%{with python} && !%{with perl}
310 --with-neon=%{_prefix} \
311 --disable-neon-version-check \
312 --with-apr=%{_bindir}/apr-1-config \
313 --with-apr-util=%{_bindir}/apu-1-config
317 %if !%{with net_client_only}
321 swig_pydir=%{py_sitedir}/libsvn \
322 swig_pydir_extra=%{py_sitedir}/svn
326 %{__make} swig-pl-lib
328 cd subversion/bindings/swig/perl/native
329 %{__perl} Makefile.PL INSTALLDIRS=vendor
336 rm -rf $RPM_BUILD_ROOT
337 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
338 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
339 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
340 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
342 %{__make} install -j1 \
343 %if !%{with net_client_only} && %{with python}
346 APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
347 DESTDIR=$RPM_BUILD_ROOT \
348 swig_pydir=%{py_sitedir}/libsvn \
349 swig_pydir_extra=%{py_sitedir}/svn
351 %if !%{with net_client_only} && %{with perl}
352 %{__make} install-swig-pl-lib \
353 DESTDIR=$RPM_BUILD_ROOT
355 cd subversion/bindings/swig/perl/native
357 DESTDIR=$RPM_BUILD_ROOT \
358 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
359 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
364 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
365 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
366 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
367 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
370 %if !%{with net_client_only}
371 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
373 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
374 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
375 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
376 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
380 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
381 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
385 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*swig*.la
388 rm -rf $RPM_BUILD_ROOT
391 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
394 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
396 %post libs -p /sbin/ldconfig
397 %postun libs -p /sbin/ldconfig
398 %post -n python-subversion -p /sbin/ldconfig
399 %postun -n perl-subversion -p /sbin/ldconfig
402 /sbin/chkconfig --add svnserve
403 %service svnserve restart "svnserve daemon"
406 if [ "$1" = "0" ]; then
407 %service svnserve stop
408 /sbin/chkconfig --del svnserve
411 %post -n apache-mod_dav_svn
412 %service -q httpd restart
414 %preun -n apache-mod_dav_svn
415 if [ "$1" = "0" ]; then
416 %service -q httpd restart
420 %defattr(644,root,root,755)
421 %doc BUGS CHANGES COPYING INSTALL README
423 %doc tools/hook-scripts/*.{pl,py,example}
424 %doc tools/hook-scripts/mailer/*.{py,example}
426 %attr(755,root,root) %{_bindir}/svn*
427 %exclude %{_bindir}/svnserve
428 %if !%{with net_client_only}
429 %exclude %{_bindir}/svn-hot-backup
434 %exclude %{_mandir}/man?/svnserve*
436 %files libs -f %{name}.lang
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/lib*.so.*
439 %if %{with perl} || %{with python}
440 %exclude %{_libdir}/lib*_swig_*.so.*
444 %defattr(644,root,root,755)
445 %{_includedir}/%{name}*
446 %attr(755,root,root) %{_libdir}/lib*.so
448 %if %{with perl} || %{with python}
449 %exclude %{_libdir}/lib*_swig_*.so
451 %{_examplesdir}/%{name}-%{version}
454 %defattr(644,root,root,755)
457 %if !%{with net_client_only}
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_bindir}/svnserve
461 %{_mandir}/man?/svnserve*
462 %dir /home/services/subversion
463 %dir /home/services/subversion/repos
465 %attr(754,root,root) /etc/rc.d/init.d/svnserve
466 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_bindir}/svn-hot-backup
473 %files -n bash-completion-subversion
474 %defattr(644,root,root,755)
475 /etc/bash_completion.d/%{name}
478 %files -n python-subversion
479 %defattr(644,root,root,755)
480 %doc tools/backup/*.py tools/examples/*.py
481 %dir %{py_sitedir}/svn
482 %dir %{py_sitedir}/libsvn
483 %{py_sitedir}/svn/*.py[co]
484 %{py_sitedir}/libsvn/*.py[co]
485 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
486 %{_examplesdir}/python-%{name}-%{version}
487 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
491 %files -n perl-subversion
492 %defattr(644,root,root,755)
493 %{perl_vendorarch}/SVN
494 %dir %{perl_vendorarch}/auto/SVN
495 %dir %{perl_vendorarch}/auto/SVN/*
496 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
497 %{perl_vendorarch}/auto/SVN/*/*.bs
498 %{_mandir}/man3/*.3pm*
499 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so*
503 %files -n apache-mod_dav_svn
504 %defattr(644,root,root,755)
505 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
506 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
508 %files -n apache-mod_authz_svn
509 %defattr(644,root,root,755)
510 %doc subversion/mod_authz_svn/INSTALL
511 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
512 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
515 %endif # net_client_only