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: a180c3fe91680389c210c99def54d9e0
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: docbook-style-xsl >= 1.56
51 BuildRequires: expat-devel
52 BuildRequires: libtool >= 1.4-9
53 BuildRequires: libxslt-progs
54 %{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.7}
56 BuildRequires: python-devel >= 2.2
57 BuildRequires: rpm-pythonprov >= 4.0.2-50
59 BuildRequires: texinfo
61 Requires: %{name}-libs = %{version}-%{release}
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 %define _apachelibdir /usr/%{_lib}/apache
65 %define _libexecdir %{_libdir}/svn
68 The goal of the Subversion project is to build a version control
69 system that is a compelling replacement for CVS in the open source
73 - All current CVS features.
74 - Directories, renames, and file meta-data are versioned.
75 - Symbolic links, etc, are supported
76 - Commits are truly atomic.
77 - Branching and tagging are cheap (constant time) operations
78 - Repeated merges are handled gracefully
79 - Support for plug-in client side diff programs
80 - Natively client/server
81 - Client/server protocol sends diffs in both directions
82 - Costs are proportional to change size, not project size
83 - Internationalization
84 - Progressive multi-lingual support
87 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
91 - Wszystkie aktualne mo¿liwo¶ci CVS.
92 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
93 - Wsparcie dla linków symbolicznych itp.
94 - Commity s± w pe³ni atomowe.
95 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
97 - Wsparcie dla pluginów diff'a po stronie klienta.
98 - Natywny klient/serwer.
99 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
100 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
101 - Internacjonalizacja.
102 - Postêpuj±ce wsparcie dla wielu jêzyków.
104 %description -l pt_BR
105 O objetivo do projeto Subversion é construir um sistema de controle de
106 versões que seja um substituto para o CVS (Concurrent Versioning
107 System) na comunidade opensource, fornecendo grandes melhorias.
110 Summary: Subversion libraries and modules
111 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
113 Obsoletes: libsubversion0
114 %{!?with_internal_neon:Requires: neon >= 0.24.6}
117 Subversion libraries and modules.
119 %description libs -l pl
120 Biblioteka subversion oraz ³adowalne modu³y.
123 Summary: Header files and develpment documentation for subversion
124 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
125 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
126 Group: Development/Libraries
127 Requires: %{name}-libs = %{version}-%{release}
128 Requires: apr-util-devel >= 1:1.0.0
129 %{!?with_internal_neon:Requires: neon-devel >= 0.24.6}
130 Obsoletes: libsubversion0-devel
133 Header files and develpment documentation for subversion.
135 %description devel -l pl
136 Pliki nag³ówkowe i dokumetacja do subversion.
138 %description devel -l pt_BR
139 Este pacote provê os arquivos necessários para desenvolvedores
140 interagirem com o Subversion.
143 Summary: Static subversion library
144 Summary(pl): Biblioteka statyczna subversion
145 Summary(pt_BR): Sistema de versionamento concorrente
146 Group: Development/Libraries
147 Requires: %{name}-devel = %{version}
148 Obsoletes: libsubversion0-static-devel
151 Static subversion library.
153 %description static -l pl
154 Biblioteka statyczna subversion.
156 %description static -l pt_BR
157 Este pacote provê um cliente estático do subversion.
160 Summary: Subversion svnserve
161 Summary(pl): Subversion svnserve
162 Group: Networking/Daemons
164 Requires(post,preun): /sbin/chkconfig
165 Requires: %{name} = %{version}-%{release}
167 %description svnserve
168 Subversion svnserve server.
170 %description svnserve -l pl
171 Serwer subversion svnserve.
174 Summary: Subversion tools and scripts
175 Summary(pl): Narzêdzia oraz skrypty dla subversion
176 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
178 %pyrequires_eq python
179 Requires: python-rcsparse >= 0.1-0.20031026.0
180 Requires: python-subversion = %{version}
181 Requires: %{name} = %{version}-%{release}
184 Subversion tools and scripts.
186 %description tools -l pl
187 Narzêdzia oraz skrypty dla subversion.
189 %package -n bash-completion-subversion
190 Summary: bash completion for subversion
191 Summary(pl): Dope³nienia basha dla subversion
192 Group: Applications/Shells
193 Requires: bash-completion
194 Requires: %{name} = %{version}-%{release}
195 Conflicts: %{name}-tools <= 1.1.0-0.rc2.1
197 %description -n bash-completion-subversion
198 Bash completion for subversion.
200 %description -n bash-completion-subversion -l pl
201 Dope³nienia basha dla subversion.
203 %package -n python-subversion
204 Summary: Subversion python bindings
205 Summary(pl): Dowi±zania do subversion dla pythona
206 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
207 Group: Development/Languages/Python
208 %pyrequires_eq python
209 Obsoletes: subversion-python
210 Requires: %{name}-libs = %{version}-%{release}
212 %description -n python-subversion
213 Subversion python bindings.
215 %description -n python-subversion -l pl
216 Dowi±zania do subversion dla pythona.
218 %description -n python-subversion -l pt_BR
219 Módulos python para acessar os recursos do Subversion.
221 %package -n perl-subversion
222 Summary: Subversion perl bindings
223 Summary(pl): Dowi±zania do subversion dla perla
224 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
225 Group: Development/Languages/Perl
226 Obsoletes: subversion-perl
227 Requires: %{name}-libs = %{version}-%{release}
229 %description -n perl-subversion
230 Subversion perl bindings.
232 %description -n perl-subversion -l pl
233 Dowi±zania do subversion dla perl.
235 %description -n perl-subversion -l pt_BR
236 Módulos perl para acessar os recursos do Subversion.
238 %package -n apache-mod_dav_svn
239 Summary: Apache module: Subversion Server
240 Summary(pl): Modu³ apache: Serwer Subversion
241 Group: Networking/Daemons
242 Requires: apache >= 2.0.47
243 Requires: apache(modules-api) = %{apache_modules_api}
244 Requires: apache-mod_dav
245 Requires: %{name} = %{version}-%{release}
247 %description -n apache-mod_dav_svn
248 Apache module: Subversion Server.
250 %description -n apache-mod_dav_svn -l pl
251 Modu³ apache: Serwer Subversion.
253 %package -n apache-mod_authz_svn
254 Summary: Apache module: Subversion Server - path-based authorization
255 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
256 Group: Networking/Daemons
257 Requires: apache-mod_dav_svn = %{version}-%{release}
258 Requires: apache >= 2.0.47
259 Requires: apache(modules-api) = %{apache_modules_api}
261 %description -n apache-mod_authz_svn
262 Apache module: Subversion Server - path-based authorization.
264 %description -n apache-mod_authz_svn -l pl
265 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
270 rm -rf apr-util{,/xml/expat}/autom4te.cache
273 cp -f /usr/share/automake/config.sub ac-helpers
274 chmod +x ./autogen.sh && ./autogen.sh
276 # don't enable dso - currently it's broken
280 --with-python=%{_bindir}/python \
281 --with-perl5=%{_bindir}/perl \
282 %if %{with net_client_only}
286 --without-berkeley-db \
289 --disable-mod-activation \
291 --with-apxs=%{_sbindir}/apxs \
295 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
297 %if !%{with python} && !%{with perl}
301 %{!?with_internal_neon:--with-neon=%{_prefix}} \
302 --with-apr=%{_bindir}/apr-1-config \
303 --with-apr-util=%{_bindir}/apu-1-config
307 %if !%{with net_client_only}
311 swig_pydir=%{py_sitedir}/libsvn \
312 swig_pydir_extra=%{py_sitedir}/svn
316 %{__make} swig-pl-lib
318 cd subversion/bindings/swig/perl/native
319 %{__perl} Makefile.PL INSTALLDIRS=vendor
325 # build documentation; build process for documentation is severely
326 # braindamaged -- authors suggests to untar docbook distribution in
327 # build directory, hence the hack here
328 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
329 %{__make} -C doc/book all-html
331 # prepare for %%doc below
332 mv -f doc/book/book/html-chunk svn-handbook
333 #mkdir svn-handbook/images/
334 cp -f doc/book/book/images/*.png svn-handbook/images/
337 rm -rf $RPM_BUILD_ROOT
338 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
339 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
340 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
341 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
344 %if !%{with net_client_only} && %{with python}
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
369 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
371 %if !%{with net_client_only}
372 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
374 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
375 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
376 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
377 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
381 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
382 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
387 rm -rf $RPM_BUILD_ROOT
390 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
393 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
395 %post libs -p /sbin/ldconfig
396 %postun libs -p /sbin/ldconfig
399 if [ -f /var/lock/subsys/svnserve ]; then
400 /etc/rc.d/init.d/svnserve restart 1>&2
402 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
405 if [ "$1" = "0" ]; then
406 if [ -f /var/lock/subsys/svnserve ]; then
407 /etc/rc.d/init.d/svnserve restart 1>&2
412 %post -n apache-mod_dav_svn
413 if [ -f /var/lock/subsys/httpd ]; then
414 /etc/rc.d/init.d/httpd restart 1>&2
416 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
419 %preun -n apache-mod_dav_svn
420 if [ "$1" = "0" ]; then
421 if [ -f /var/lock/subsys/httpd ]; then
422 /etc/rc.d/init.d/httpd restart 1>&2
427 %defattr(644,root,root,755)
428 %doc BUGS CHANGES COPYING INSTALL README
429 %doc svn-handbook doc/book/misc-docs/misc-docs.html
430 %doc tools/hook-scripts/*.{pl,py,example}
431 %doc tools/hook-scripts/mailer/*.{py,example}
433 %attr(755,root,root) %{_bindir}/svn*
434 %exclude %{_bindir}/svnserve
435 %exclude %{_bindir}/svn-hot-backup
439 %exclude %{_mandir}/man?/svnserve*
440 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
442 %files libs -f %{name}.lang
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/lib*.so.*
447 %defattr(644,root,root,755)
448 %{_includedir}/%{name}*
449 %attr(755,root,root) %{_libdir}/lib*.so
452 %{_examplesdir}/%{name}-%{version}
455 %defattr(644,root,root,755)
458 %if !%{with net_client_only}
460 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_bindir}/svnserve
462 %{_mandir}/man?/svnserve*
463 %dir /home/services/subversion
464 %dir /home/services/subversion/repos
466 %attr(754,root,root) /etc/rc.d/init.d/svnserve
467 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_bindir}/svn-hot-backup
474 %files -n bash-completion-subversion
475 %defattr(644,root,root,755)
476 /etc/bash_completion.d/%{name}
479 %files -n python-subversion
480 %defattr(644,root,root,755)
481 %doc tools/backup/*.py tools/examples/*.py
482 %dir %{py_sitedir}/svn
483 %dir %{py_sitedir}/libsvn
484 %{py_sitedir}/svn/*.py[co]
485 %{py_sitedir}/libsvn/*.py[co]
486 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
487 %{_examplesdir}/python-%{name}-%{version}
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*
502 %files -n apache-mod_dav_svn
503 %defattr(644,root,root,755)
504 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
505 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
507 %files -n apache-mod_authz_svn
508 %defattr(644,root,root,755)
509 %doc subversion/mod_authz_svn/INSTALL
510 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
511 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so