3 %bcond_with internal_neon # build with internal neon
4 %bcond_with net_client_only # build only net client
5 %bcond_without python # build without python bindings
6 %bcond_without perl # build without perl bindings
7 %bcond_without apache # build without apache support (webdav, etc)
9 %include /usr/lib/rpm/macros.python
10 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
11 Summary: A Concurrent Versioning system similar to but better than CVS
12 Summary(pl): System kontroli wersji podobny, ale lepszy, ni¿ CVS
13 Summary(pt_BR): Sistema de versionamento concorrente
17 License: Apache/BSD Style
18 Group: Development/Version Control
19 Source0: http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2
20 # Source0-md5: 8e8288fee061f5278ec201fc5e5e141c
21 Source1: %{name}-dav_svn.conf
22 Source2: %{name}-authz_svn.conf
23 Source3: %{name}-svnserve.init
24 Source4: %{name}-svnserve.sysconfig
25 #Patch0: %{name}-svnlook.patch
26 #Patch1: %{name}-hot_backup_num.patch
27 URL: http://subversion.tigris.org/
28 %if %{with net_client_only}
29 %global apache_modules_api 0
31 BuildRequires: automake
32 %{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
33 BuildRequires: db-devel >= 4.1.25
34 BuildRequires: rpmbuild(macros) >= 1.120
35 %if %{with python} || %{with perl}
36 BuildRequires: swig >= 1.3.19
38 %{?with_python:BuildRequires: swig-python >= 1.3.19}
40 BuildRequires: swig-perl >= 1.3.19
41 BuildRequires: perl-devel >= 1:5.8.0
42 BuildRequires: rpm-perlprov >= 4.1-13
45 BuildRequires: apr-devel >= 1:0.9.5
46 BuildRequires: apr-util-devel >= 1:0.9.5
47 BuildRequires: autoconf >= 2.59
49 BuildRequires: docbook-style-xsl >= 1.56
50 BuildRequires: expat-devel
51 BuildRequires: libtool >= 1.4-9
52 BuildRequires: libxslt-progs
53 %{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.6}
55 BuildRequires: python-devel >= 2.2
56 BuildRequires: rpm-pythonprov >= 4.0.2-50
58 BuildRequires: texinfo
60 Requires: %{name}-libs = %{version}-%{release}
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 %define _apachelibdir /usr/%{_lib}/apache
64 %define _libexecdir %{_libdir}/svn
67 The goal of the Subversion project is to build a version control
68 system that is a compelling replacement for CVS in the open source
72 - All current CVS features.
73 - Directories, renames, and file meta-data are versioned.
74 - Symbolic links, etc, are supported
75 - Commits are truly atomic.
76 - Branching and tagging are cheap (constant time) operations
77 - Repeated merges are handled gracefully
78 - Support for plug-in client side diff programs
79 - Natively client/server
80 - Client/server protocol sends diffs in both directions
81 - Costs are proportional to change size, not project size
82 - Internationalization
83 - Progressive multi-lingual support
86 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
90 - Wszystkie aktualne mo¿liwo¶ci CVS.
91 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
92 - Wsparcie dla linków symbolicznych itp.
93 - Commity s± w pe³ni atomowe.
94 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
96 - Wsparcie dla pluginów diff'a po stronie klienta.
97 - Natywny klient/serwer.
98 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
99 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
100 - Internacjonalizacja.
101 - Postêpuj±ce wsparcie dla wielu jêzyków.
103 %description -l pt_BR
104 O objetivo do projeto Subversion é construir um sistema de controle de
105 versões que seja um substituto para o CVS (Concurrent Versioning
106 System) na comunidade opensource, fornecendo grandes melhorias.
109 Summary: Subversion libraries and modules
110 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
112 Obsoletes: libsubversion0
113 %{!?with_internal_neon:Requires: neon >= 0.24.6}
116 Subversion libraries and modules.
118 %description libs -l pl
119 Biblioteka subversion oraz ³adowalne modu³y.
122 Summary: Header files and develpment documentation for subversion
123 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
124 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
125 Group: Development/Libraries
126 Requires: %{name}-libs = %{version}-%{release}
127 Requires: apr-util-devel >= 1:0.9.5
128 %{!?with_internal_neon:Requires: neon-devel >= 0.24.6}
129 Obsoletes: libsubversion0-devel
132 Header files and develpment documentation for subversion.
134 %description devel -l pl
135 Pliki nag³ówkowe i dokumetacja do subversion.
137 %description devel -l pt_BR
138 Este pacote provê os arquivos necessários para desenvolvedores
139 interagirem com o Subversion.
142 Summary: Static subversion library
143 Summary(pl): Biblioteka statyczna subversion
144 Summary(pt_BR): Sistema de versionamento concorrente
145 Group: Development/Libraries
146 Requires: %{name}-devel = %{version}
147 Obsoletes: libsubversion0-static-devel
150 Static subversion library.
152 %description static -l pl
153 Biblioteka statyczna subversion.
155 %description static -l pt_BR
156 Este pacote provê um cliente estático do subversion.
159 Summary: Subversion svnserve
160 Summary(pl): Subversion svnserve
161 Group: Networking/Daemons
163 Requires(post,preun): /sbin/chkconfig
164 Requires: %{name} = %{version}-%{release}
166 %description svnserve
167 Subversion svnserve server.
169 %description svnserve -l pl
170 Serwer subversion svnserve.
173 Summary: Subversion tools and scripts
174 Summary(pl): Narzêdzia oraz skrypty dla subversion
175 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
177 %pyrequires_eq python
178 Requires: python-rcsparse >= 0.1-0.20031026.0
179 Requires: python-subversion = %{version}
180 Requires: %{name} = %{version}-%{release}
183 Subversion tools and scripts.
185 %description tools -l pl
186 Narzêdzia oraz skrypty dla subversion.
188 %package -n python-subversion
189 Summary: Subversion python bindings
190 Summary(pl): Dowi±zania do subversion dla pythona
191 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
192 Group: Development/Languages/Python
193 %pyrequires_eq python
194 Obsoletes: subversion-python
195 Requires: %{name}-libs = %{version}-%{release}
197 %description -n python-subversion
198 Subversion python bindings.
200 %description -n python-subversion -l pl
201 Dowi±zania do subversion dla pythona.
203 %description -n python-subversion -l pt_BR
204 Módulos python para acessar os recursos do Subversion.
206 %package -n perl-subversion
207 Summary: Subversion perl bindings
208 Summary(pl): Dowi±zania do subversion dla perla
209 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
210 Group: Development/Languages/Perl
211 Obsoletes: subversion-perl
212 Requires: %{name}-libs = %{version}-%{release}
214 %description -n perl-subversion
215 Subversion perl bindings.
217 %description -n perl-subversion -l pl
218 Dowi±zania do subversion dla perl.
220 %description -n perl-subversion -l pt_BR
221 Módulos perl para acessar os recursos do Subversion.
223 %package -n apache-mod_dav_svn
224 Summary: Apache module: Subversion Server
225 Summary(pl): Modu³ apache: Serwer Subversion
226 Group: Networking/Daemons
227 Requires: apache >= 2.0.47
228 Requires: apache(modules-api) = %{apache_modules_api}
229 Requires: apache-mod_dav
230 Requires: %{name} = %{version}-%{release}
232 %description -n apache-mod_dav_svn
233 Apache module: Subversion Server.
235 %description -n apache-mod_dav_svn -l pl
236 Modu³ apache: Serwer Subversion.
238 %package -n apache-mod_authz_svn
239 Summary: Apache module: Subversion Server - path-based authorization
240 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
241 Group: Networking/Daemons
242 Requires: apache-mod_dav_svn = %{version}-%{release}
243 Requires: apache >= 2.0.47
244 Requires: apache(modules-api) = %{apache_modules_api}
246 %description -n apache-mod_authz_svn
247 Apache module: Subversion Server - path-based authorization.
249 %description -n apache-mod_authz_svn -l pl
250 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
257 rm -rf apr-util{,/xml/expat}/autom4te.cache
260 cp -f /usr/share/automake/config.sub ac-helpers
261 chmod +x ./autogen.sh && ./autogen.sh
263 # don't enable dso - currently it's broken
265 %if %{with net_client_only}
269 --without-berkeley-db \
272 --disable-mod-activation \
274 --with-apxs=%{_sbindir}/apxs \
278 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
280 %if !%{with python} && !%{with perl}
284 %{!?with_internal_neon:--with-neon=%{_prefix}} \
285 --with-apr=%{_bindir}/apr-config \
286 --with-apr-util=%{_bindir}/apu-config
290 %if !%{with net_client_only}
294 swig_pydir=%{py_sitedir}/libsvn \
295 swig_pydir_extra=%{py_sitedir}/svn
300 %{__make} install-swig-pl-lib \
302 DESTDIR=${bdir}/swig-pl-lib-buildroot
304 cd subversion/bindings/swig/perl
305 env APR_CONFIG=%{_bindir}/apr-config \
306 APU_CONFIG=%{_bindir}/apu-config \
307 %{__perl} Makefile.PL \
309 env LIBRARY_PATH=${bdir}/swig-pl-lib-buildroot%{_libdir} %{__make}
314 # build documentation; build process for documentation is severely
315 # braindamaged -- authors suggests to untar docbook distribution in
316 # build directory, hence the hack here
317 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
318 %{__make} -C doc/book all-html
320 # prepare for %%doc below
321 mv -f doc/book/book/html-chunk svn-handbook
322 mkdir svn-handbook/images/
323 cp -f doc/book/book/images/*.png svn-handbook/images/
326 rm -rf $RPM_BUILD_ROOT
327 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
328 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
329 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}}
333 %if !%{with net_client_only} && %{with python}
336 DESTDIR=$RPM_BUILD_ROOT \
337 swig_pydir=%{py_sitedir}/libsvn \
338 swig_pydir_extra=%{py_sitedir}/svn
340 %if !%{with net_client_only} && %{with perl}
341 %{__make} install-swig-pl-lib \
343 DESTDIR=$RPM_BUILD_ROOT
344 %{__make} -C subversion/bindings/swig/perl install \
345 DESTDIR=$RPM_BUILD_ROOT
349 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
350 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
351 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
352 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
354 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
356 %if !%{with net_client_only}
357 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
359 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
360 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
361 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
362 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
366 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
367 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
370 rm -rf $RPM_BUILD_ROOT
373 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
376 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
378 %post libs -p /sbin/ldconfig
379 %postun libs -p /sbin/ldconfig
382 if [ -f /var/lock/subsys/svnserve ]; then
383 /etc/rc.d/init.d/svnserve restart 1>&2
385 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
389 if [ "$1" = "0" ]; then
390 if [ -f /var/lock/subsys/svnserve ]; then
391 /etc/rc.d/init.d/svnserve restart 1>&2
395 %post -n apache-mod_dav_svn
396 if [ -f /var/lock/subsys/httpd ]; then
397 /etc/rc.d/init.d/httpd restart 1>&2
399 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
402 %preun -n apache-mod_dav_svn
403 if [ "$1" = "0" ]; then
404 if [ -f /var/lock/subsys/httpd ]; then
405 /etc/rc.d/init.d/httpd restart 1>&2
410 %defattr(644,root,root,755)
411 %doc BUGS CHANGES COPYING INSTALL README
412 %doc svn-handbook doc/book/misc-docs/misc-docs.html
413 %doc tools/hook-scripts/*.{pl,py,example}
414 %doc tools/hook-scripts/mailer/*.{py,example}
416 %attr(755,root,root) %{_bindir}/svn*
417 %exclude %{_bindir}/svnserve
418 %exclude %{_bindir}/svn-hot-backup
422 %exclude %{_mandir}/man?/svnserve*
423 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/lib*.so.*
430 %defattr(644,root,root,755)
431 %{_includedir}/%{name}*
432 %attr(755,root,root) %{_libdir}/lib*.so
435 %{_examplesdir}/%{name}-%{version}
438 %defattr(644,root,root,755)
441 %if !%{with net_client_only}
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_bindir}/svnserve
445 %{_mandir}/man?/svnserve*
447 %attr(754,root,root) /etc/rc.d/init.d/svnserve
448 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_bindir}/svn-hot-backup
454 /etc/bash_completion.d/%{name}
457 %files -n python-subversion
458 %defattr(644,root,root,755)
459 %doc tools/backup/*.py tools/examples/*.py
460 %dir %{py_sitedir}/svn
461 %dir %{py_sitedir}/libsvn
462 %{py_sitedir}/svn/*.py[co]
463 %{py_sitedir}/libsvn/*.py[co]
464 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
465 %{_examplesdir}/python-%{name}-%{version}
469 %files -n perl-subversion
470 %defattr(644,root,root,755)
471 %{perl_vendorarch}/SVN
472 %dir %{perl_vendorarch}/auto/SVN
473 %dir %{perl_vendorarch}/auto/SVN/*
474 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
475 %{perl_vendorarch}/auto/SVN/*/*.bs
476 %{_mandir}/man3/*.3pm*
480 %files -n apache-mod_dav_svn
481 %defattr(644,root,root,755)
482 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
483 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
485 %files -n apache-mod_authz_svn
486 %defattr(644,root,root,755)
487 %doc subversion/mod_authz_svn/INSTALL
488 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
489 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so