3 # - remove net_client_only and add db bcond (then without apache and
4 # without db => net_client_only - spec will be more simpler, I think)
7 %bcond_with internal_neon # build with internal neon
8 %bcond_with net_client_only # build only net client
9 %bcond_without python # build without python bindings
10 %bcond_without perl # build without perl bindings
11 %bcond_without apache # build without apache support (webdav, etc)
13 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
14 Summary: A Concurrent Versioning system similar to but better than CVS
15 Summary(pl): System kontroli wersji podobny, ale lepszy, ni¿ CVS
16 Summary(pt_BR): Sistema de versionamento concorrente
20 License: Apache/BSD Style
21 Group: Development/Version Control
22 Source0: http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2
23 # Source0-md5: f25c0c884201f411e99a6cb6c25529ff
24 Source1: %{name}-dav_svn.conf
25 Source2: %{name}-authz_svn.conf
26 Source3: %{name}-svnserve.init
27 Source4: %{name}-svnserve.sysconfig
28 URL: http://subversion.tigris.org/
29 %if %{with net_client_only}
30 %global apache_modules_api 0
32 BuildRequires: automake
33 %{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
34 BuildRequires: db-devel >= 4.1.25
35 BuildRequires: rpmbuild(macros) >= 1.120
36 %if %{with python} || %{with perl}
37 BuildRequires: swig >= 1.3.19
39 %{?with_python:BuildRequires: swig-python >= 1.3.21}
41 BuildRequires: swig-perl >= 1.3.21
42 BuildRequires: perl-devel >= 1:5.8.0
43 BuildRequires: rpm-perlprov >= 4.1-13
46 BuildRequires: apr-devel >= 1:1.0.0
47 BuildRequires: apr-util-devel >= 1:1.0.0
48 BuildRequires: autoconf >= 2.59
50 BuildRequires: expat-devel
51 BuildRequires: libtool >= 1.4-9
52 %{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.7}
54 BuildRequires: python >= 2.2
55 BuildRequires: python-devel >= 2.2
57 BuildRequires: texinfo
59 Requires: %{name}-libs = %{version}-%{release}
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 %define _apachelibdir /usr/%{_lib}/apache
63 %define _libexecdir %{_libdir}/svn
66 The goal of the Subversion project is to build a version control
67 system that is a compelling replacement for CVS in the open source
71 - All current CVS features.
72 - Directories, renames, and file meta-data are versioned.
73 - Symbolic links, etc, are supported
74 - Commits are truly atomic.
75 - Branching and tagging are cheap (constant time) operations
76 - Repeated merges are handled gracefully
77 - Support for plug-in client side diff programs
78 - Natively client/server
79 - Client/server protocol sends diffs in both directions
80 - Costs are proportional to change size, not project size
81 - Internationalization
82 - Progressive multi-lingual support
85 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
89 - Wszystkie aktualne mo¿liwo¶ci CVS.
90 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
91 - Wsparcie dla linków symbolicznych itp.
92 - Commity s± w pe³ni atomowe.
93 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
95 - Wsparcie dla pluginów diff'a po stronie klienta.
96 - Natywny klient/serwer.
97 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
98 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
99 - Internacjonalizacja.
100 - Postêpuj±ce wsparcie dla wielu jêzyków.
102 %description -l pt_BR
103 O objetivo do projeto Subversion é construir um sistema de controle de
104 versões que seja um substituto para o CVS (Concurrent Versioning
105 System) na comunidade opensource, fornecendo grandes melhorias.
108 Summary: Subversion libraries and modules
109 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
111 Obsoletes: libsubversion0
112 %{!?with_internal_neon:Requires: neon >= 0.24.6}
115 Subversion libraries and modules.
117 %description libs -l pl
118 Biblioteka subversion oraz ³adowalne modu³y.
121 Summary: Header files and develpment documentation for subversion
122 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
123 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
124 Group: Development/Libraries
125 Requires: %{name}-libs = %{version}-%{release}
126 Requires: apr-util-devel >= 1:1.0.0
127 %{!?with_internal_neon:Requires: neon-devel >= 0.24.6}
128 Obsoletes: libsubversion0-devel
131 Header files and develpment documentation for subversion.
133 %description devel -l pl
134 Pliki nag³ówkowe i dokumetacja do subversion.
136 %description devel -l pt_BR
137 Este pacote provê os arquivos necessários para desenvolvedores
138 interagirem com o Subversion.
141 Summary: Static subversion library
142 Summary(pl): Biblioteka statyczna subversion
143 Summary(pt_BR): Sistema de versionamento concorrente
144 Group: Development/Libraries
145 Requires: %{name}-devel = %{version}
146 Obsoletes: libsubversion0-static-devel
149 Static subversion library.
151 %description static -l pl
152 Biblioteka statyczna subversion.
154 %description static -l pt_BR
155 Este pacote provê um cliente estático do subversion.
158 Summary: Subversion svnserve
159 Summary(pl): Subversion svnserve
160 Group: Networking/Daemons
162 Requires(post,preun): /sbin/chkconfig
163 Requires: %{name} = %{version}-%{release}
165 %description svnserve
166 Subversion svnserve server.
168 %description svnserve -l pl
169 Serwer subversion svnserve.
172 Summary: Subversion tools and scripts
173 Summary(pl): Narzêdzia oraz skrypty dla subversion
174 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
176 %pyrequires_eq python
177 Requires: python-rcsparse >= 0.1-0.20031026.0
178 Requires: python-subversion = %{version}
179 Requires: %{name} = %{version}-%{release}
182 Subversion tools and scripts.
184 %description tools -l pl
185 Narzêdzia oraz skrypty dla subversion.
187 %package -n bash-completion-subversion
188 Summary: bash completion for subversion
189 Summary(pl): Dope³nienia basha dla subversion
190 Group: Applications/Shells
191 Requires: bash-completion
192 Requires: %{name} = %{version}-%{release}
193 Conflicts: %{name}-tools <= 1.1.0-0.rc2.1
195 %description -n bash-completion-subversion
196 Bash completion for subversion.
198 %description -n bash-completion-subversion -l pl
199 Dope³nienia basha dla subversion.
201 %package -n python-subversion
202 Summary: Subversion python bindings
203 Summary(pl): Dowi±zania do subversion dla pythona
204 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
205 Group: Development/Languages/Python
206 %pyrequires_eq python
207 Obsoletes: subversion-python
208 Requires: %{name}-libs = %{version}-%{release}
210 %description -n python-subversion
211 Subversion python bindings.
213 %description -n python-subversion -l pl
214 Dowi±zania do subversion dla pythona.
216 %description -n python-subversion -l pt_BR
217 Módulos python para acessar os recursos do Subversion.
219 %package -n perl-subversion
220 Summary: Subversion perl bindings
221 Summary(pl): Dowi±zania do subversion dla perla
222 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
223 Group: Development/Languages/Perl
224 Obsoletes: subversion-perl
225 Requires: %{name}-libs = %{version}-%{release}
227 %description -n perl-subversion
228 Subversion perl bindings.
230 %description -n perl-subversion -l pl
231 Dowi±zania do subversion dla perl.
233 %description -n perl-subversion -l pt_BR
234 Módulos perl para acessar os recursos do Subversion.
236 %package -n apache-mod_dav_svn
237 Summary: Apache module: Subversion Server
238 Summary(pl): Modu³ apache: Serwer Subversion
239 Group: Networking/Daemons
240 Requires: apache >= 2.0.47
241 Requires: apache(modules-api) = %{apache_modules_api}
242 Requires: apache-mod_dav
243 Requires: %{name} = %{version}-%{release}
245 %description -n apache-mod_dav_svn
246 Apache module: Subversion Server.
248 %description -n apache-mod_dav_svn -l pl
249 Modu³ apache: Serwer Subversion.
251 %package -n apache-mod_authz_svn
252 Summary: Apache module: Subversion Server - path-based authorization
253 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
254 Group: Networking/Daemons
255 Requires: apache-mod_dav_svn = %{version}-%{release}
256 Requires: apache >= 2.0.47
257 Requires: apache(modules-api) = %{apache_modules_api}
259 %description -n apache-mod_authz_svn
260 Apache module: Subversion Server - path-based authorization.
262 %description -n apache-mod_authz_svn -l pl
263 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
268 rm -rf apr-util{,/xml/expat}/autom4te.cache
271 cp -f /usr/share/automake/config.sub ac-helpers
272 chmod +x ./autogen.sh && ./autogen.sh
274 # don't enable dso - currently it's broken
278 --with-python=%{_bindir}/python \
279 --with-perl5=%{_bindir}/perl \
280 %if %{with net_client_only}
284 --without-berkeley-db \
287 --disable-mod-activation \
289 --with-apxs=%{_sbindir}/apxs \
293 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
295 %if !%{with python} && !%{with perl}
299 %{!?with_internal_neon:--with-neon=%{_prefix}} \
300 --with-apr=%{_bindir}/apr-1-config \
301 --with-apr-util=%{_bindir}/apu-1-config
305 %if !%{with net_client_only}
309 swig_pydir=%{py_sitedir}/libsvn \
310 swig_pydir_extra=%{py_sitedir}/svn
314 %{__make} swig-pl-lib
316 cd subversion/bindings/swig/perl/native
317 %{__perl} Makefile.PL INSTALLDIRS=vendor
324 rm -rf $RPM_BUILD_ROOT
325 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
326 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
327 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
328 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
331 %if !%{with net_client_only} && %{with python}
334 DESTDIR=$RPM_BUILD_ROOT \
335 swig_pydir=%{py_sitedir}/libsvn \
336 swig_pydir_extra=%{py_sitedir}/svn
338 %if !%{with net_client_only} && %{with perl}
339 %{__make} install-swig-pl-lib \
340 DESTDIR=$RPM_BUILD_ROOT
342 cd subversion/bindings/swig/perl/native
344 DESTDIR=$RPM_BUILD_ROOT \
345 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
346 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
351 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
352 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
353 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
354 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
357 %if !%{with net_client_only}
358 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
360 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
361 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
362 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
363 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
367 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
368 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
373 rm -rf $RPM_BUILD_ROOT
376 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
379 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
381 %post libs -p /sbin/ldconfig
382 %postun libs -p /sbin/ldconfig
383 %post -n python-subversion -p /sbin/ldconfig
384 %postun -n perl-subversion -p /sbin/ldconfig
387 if [ -f /var/lock/subsys/svnserve ]; then
388 /etc/rc.d/init.d/svnserve restart 1>&2
390 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
393 if [ "$1" = "0" ]; then
394 if [ -f /var/lock/subsys/svnserve ]; then
395 /etc/rc.d/init.d/svnserve restart 1>&2
400 %post -n apache-mod_dav_svn
401 if [ -f /var/lock/subsys/httpd ]; then
402 /etc/rc.d/init.d/httpd restart 1>&2
404 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
407 %preun -n apache-mod_dav_svn
408 if [ "$1" = "0" ]; then
409 if [ -f /var/lock/subsys/httpd ]; then
410 /etc/rc.d/init.d/httpd restart 1>&2
415 %defattr(644,root,root,755)
416 %doc BUGS CHANGES COPYING INSTALL README
418 %doc tools/hook-scripts/*.{pl,py,example}
419 %doc tools/hook-scripts/mailer/*.{py,example}
421 %attr(755,root,root) %{_bindir}/svn*
422 %exclude %{_bindir}/svnserve
423 %exclude %{_bindir}/svn-hot-backup
427 %exclude %{_mandir}/man?/svnserve*
428 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
430 %files libs -f %{name}.lang
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/lib*.so.*
433 %if %{with perl} || %{with python}
434 %exclude %{_libdir}/lib*_swig_*.so.*
438 %defattr(644,root,root,755)
439 %{_includedir}/%{name}*
440 %attr(755,root,root) %{_libdir}/lib*.so
442 %{_examplesdir}/%{name}-%{version}
445 %defattr(644,root,root,755)
448 %if !%{with net_client_only}
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_bindir}/svnserve
452 %{_mandir}/man?/svnserve*
453 %dir /home/services/subversion
454 %dir /home/services/subversion/repos
456 %attr(754,root,root) /etc/rc.d/init.d/svnserve
457 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %{_bindir}/svn-hot-backup
464 %files -n bash-completion-subversion
465 %defattr(644,root,root,755)
466 /etc/bash_completion.d/%{name}
469 %files -n python-subversion
470 %defattr(644,root,root,755)
471 %doc tools/backup/*.py tools/examples/*.py
472 %dir %{py_sitedir}/svn
473 %dir %{py_sitedir}/libsvn
474 %{py_sitedir}/svn/*.py[co]
475 %{py_sitedir}/libsvn/*.py[co]
476 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
477 %{_examplesdir}/python-%{name}-%{version}
478 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so.*
482 %files -n perl-subversion
483 %defattr(644,root,root,755)
484 %{perl_vendorarch}/SVN
485 %dir %{perl_vendorarch}/auto/SVN
486 %dir %{perl_vendorarch}/auto/SVN/*
487 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
488 %{perl_vendorarch}/auto/SVN/*/*.bs
489 %{_mandir}/man3/*.3pm*
490 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so.*
494 %files -n apache-mod_dav_svn
495 %defattr(644,root,root,755)
496 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
497 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
499 %files -n apache-mod_authz_svn
500 %defattr(644,root,root,755)
501 %doc subversion/mod_authz_svn/INSTALL
502 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
503 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so