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: 0b546195ca794c327c6830f2e88661f7
24 Source1: %{name}-dav_svn.conf
25 Source2: %{name}-authz_svn.conf
26 Source3: %{name}-svnserve.init
27 Source4: %{name}-svnserve.sysconfig
28 Patch0: %{name}-home_etc.patch
29 Patch1: %{name}-SWIGEXPORT.patch
30 URL: http://subversion.tigris.org/
31 %if %{with net_client_only}
32 %global apache_modules_api 0
34 BuildRequires: automake
35 %{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
36 BuildRequires: db-devel >= 4.1.25
37 BuildRequires: rpmbuild(macros) >= 1.120
39 BuildRequires: perl-devel >= 1:5.8.0
40 BuildRequires: rpm-perlprov >= 4.1-13
41 BuildRequires: swig-perl >= 1.3.24
44 BuildRequires: apr-devel >= 1:1.0.0
45 BuildRequires: apr-util-devel >= 1:1.0.0
46 BuildRequires: autoconf >= 2.59
48 BuildRequires: expat-devel
49 BuildRequires: gettext-devel
50 BuildRequires: libtool >= 1.4-9
51 %{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.7}
53 BuildRequires: python >= 2.2
54 BuildRequires: python-devel >= 2.2
55 BuildRequires: python-modules >= 2.2
56 BuildRequires: sed >= 4.0
57 BuildRequires: swig-python >= 1.3.24
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.
272 rm -rf apr-util{,/xml/expat}/autom4te.cache
275 cp -f /usr/share/automake/config.sub ac-helpers
276 chmod +x ./autogen.sh && ./autogen.sh
278 # don't enable dso - currently it's broken
282 --with-python=%{_bindir}/python \
283 --with-perl5=%{_bindir}/perl \
284 %if %{with net_client_only}
288 --without-berkeley-db \
291 --disable-mod-activation \
293 --with-apxs=%{_sbindir}/apxs \
297 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
299 %if !%{with python} && !%{with perl}
303 %{!?with_internal_neon:--with-neon=%{_prefix}} \
304 --with-apr=%{_bindir}/apr-1-config \
305 --with-apr-util=%{_bindir}/apu-1-config
309 %if !%{with net_client_only}
313 swig_pydir=%{py_sitedir}/libsvn \
314 swig_pydir_extra=%{py_sitedir}/svn
318 %{__make} swig-pl-lib
320 cd subversion/bindings/swig/perl/native
321 %{__perl} Makefile.PL INSTALLDIRS=vendor
327 %{__sed} -i -e 's/@SVN_DB_INCLUDES@//g' -e 's/@SVN_DB_LIBS@//g' svn-config
330 rm -rf $RPM_BUILD_ROOT
331 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
332 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
333 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
334 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
337 %if !%{with net_client_only} && %{with python}
340 DESTDIR=$RPM_BUILD_ROOT \
341 swig_pydir=%{py_sitedir}/libsvn \
342 swig_pydir_extra=%{py_sitedir}/svn
344 %if !%{with net_client_only} && %{with perl}
345 %{__make} install-swig-pl-lib \
346 DESTDIR=$RPM_BUILD_ROOT
348 cd subversion/bindings/swig/perl/native
350 DESTDIR=$RPM_BUILD_ROOT \
351 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
352 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
356 install svn-config $RPM_BUILD_ROOT%{_bindir}
359 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
360 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
361 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
362 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
365 %if !%{with net_client_only}
366 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
368 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
369 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
370 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
371 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
375 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
376 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
381 rm -rf $RPM_BUILD_ROOT
384 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
387 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
389 %post libs -p /sbin/ldconfig
390 %postun libs -p /sbin/ldconfig
391 %post -n python-subversion -p /sbin/ldconfig
392 %postun -n perl-subversion -p /sbin/ldconfig
395 if [ -f /var/lock/subsys/svnserve ]; then
396 /etc/rc.d/init.d/svnserve restart 1>&2
398 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
401 if [ "$1" = "0" ]; then
402 if [ -f /var/lock/subsys/svnserve ]; then
403 /etc/rc.d/init.d/svnserve restart 1>&2
408 %post -n apache-mod_dav_svn
409 if [ -f /var/lock/subsys/httpd ]; then
410 /etc/rc.d/init.d/httpd restart 1>&2
412 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
415 %preun -n apache-mod_dav_svn
416 if [ "$1" = "0" ]; then
417 if [ -f /var/lock/subsys/httpd ]; then
418 /etc/rc.d/init.d/httpd restart 1>&2
423 %defattr(644,root,root,755)
424 %doc BUGS CHANGES COPYING INSTALL README
426 %doc tools/hook-scripts/*.{pl,py,example}
427 %doc tools/hook-scripts/mailer/*.{py,example}
429 %attr(755,root,root) %{_bindir}/svn*
430 %exclude %{_bindir}/svnserve
431 %exclude %{_bindir}/svn-hot-backup
435 %exclude %{_mandir}/man?/svnserve*
436 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
438 %files libs -f %{name}.lang
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_libdir}/lib*.so.*
441 %if %{with perl} || %{with python}
442 %exclude %{_libdir}/lib*_swig_*.so.*
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_bindir}/svn-config
448 %{_includedir}/%{name}*
449 %attr(755,root,root) %{_libdir}/lib*.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