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: a14bc6590241b6e5c2ff2b354cc184a1
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}-po.pl.patch
30 URL: http://subversion.tigris.org/
31 %if %{with net_client_only}
32 %global apache_modules_api 0
34 %{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
35 BuildRequires: automake
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 %if %{without internal_neon}
52 BuildRequires: neon-devel < 0.25.0
53 BuildRequires: neon-devel >= 0.24.7
56 BuildRequires: python-devel >= 2.2
57 BuildRequires: python-modules >= 2.2
58 BuildRequires: python >= 2.2
59 BuildRequires: sed >= 4.0
60 BuildRequires: swig-python >= 1.3.24
62 BuildRequires: texinfo
64 Requires: %{name}-libs = %{version}-%{release}
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %define _apachelibdir /usr/%{_lib}/apache
68 %define _libexecdir %{_libdir}/svn
71 The goal of the Subversion project is to build a version control
72 system that is a compelling replacement for CVS in the open source
76 - All current CVS features.
77 - Directories, renames, and file meta-data are versioned.
78 - Symbolic links, etc, are supported
79 - Commits are truly atomic.
80 - Branching and tagging are cheap (constant time) operations
81 - Repeated merges are handled gracefully
82 - Support for plug-in client side diff programs
83 - Natively client/server
84 - Client/server protocol sends diffs in both directions
85 - Costs are proportional to change size, not project size
86 - Internationalization
87 - Progressive multi-lingual support
90 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
94 - Wszystkie aktualne mo¿liwo¶ci CVS.
95 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
96 - Wsparcie dla linków symbolicznych itp.
97 - Commity s± w pe³ni atomowe.
98 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
100 - Wsparcie dla pluginów diff'a po stronie klienta.
101 - Natywny klient/serwer.
102 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
103 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
104 - Internacjonalizacja.
105 - Postêpuj±ce wsparcie dla wielu jêzyków.
107 %description -l pt_BR
108 O objetivo do projeto Subversion é construir um sistema de controle de
109 versões que seja um substituto para o CVS (Concurrent Versioning
110 System) na comunidade opensource, fornecendo grandes melhorias.
113 Summary: Subversion libraries and modules
114 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
116 Obsoletes: libsubversion0
117 %{!?with_internal_neon:Requires: neon >= 0.24.6}
120 Subversion libraries and modules.
122 %description libs -l pl
123 Biblioteka subversion oraz ³adowalne modu³y.
126 Summary: Header files and develpment documentation for subversion
127 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
128 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
129 Group: Development/Libraries
130 Requires: %{name}-libs = %{version}-%{release}
131 Requires: apr-util-devel >= 1:1.0.0
132 %{!?with_internal_neon:Requires: neon-devel >= 0.24.6}
133 Obsoletes: libsubversion0-devel
136 Header files and develpment documentation for subversion.
138 %description devel -l pl
139 Pliki nag³ówkowe i dokumetacja do subversion.
141 %description devel -l pt_BR
142 Este pacote provê os arquivos necessários para desenvolvedores
143 interagirem com o Subversion.
146 Summary: Static subversion library
147 Summary(pl): Biblioteka statyczna subversion
148 Summary(pt_BR): Sistema de versionamento concorrente
149 Group: Development/Libraries
150 Requires: %{name}-devel = %{version}
151 Obsoletes: libsubversion0-static-devel
154 Static subversion library.
156 %description static -l pl
157 Biblioteka statyczna subversion.
159 %description static -l pt_BR
160 Este pacote provê um cliente estático do subversion.
163 Summary: Subversion svnserve
164 Summary(pl): Subversion svnserve
165 Group: Networking/Daemons
166 Requires(post,preun): /sbin/chkconfig
167 Requires: %{name} = %{version}-%{release}
170 %description svnserve
171 Subversion svnserve server.
173 %description svnserve -l pl
174 Serwer subversion svnserve.
177 Summary: Subversion tools and scripts
178 Summary(pl): Narzêdzia oraz skrypty dla subversion
179 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
181 %pyrequires_eq python
182 Requires: %{name} = %{version}-%{release}
183 Requires: python-rcsparse >= 0.1-0.20031026.0
184 Requires: python-subversion = %{version}
187 Subversion tools and scripts.
189 %description tools -l pl
190 Narzêdzia oraz skrypty dla subversion.
192 %package -n bash-completion-subversion
193 Summary: bash completion for subversion
194 Summary(pl): Dope³nienia basha dla subversion
195 Group: Applications/Shells
196 Requires: %{name} = %{version}-%{release}
197 Requires: bash-completion
198 Conflicts: %{name}-tools <= 1.1.0-0.rc2.1
200 %description -n bash-completion-subversion
201 Bash completion for subversion.
203 %description -n bash-completion-subversion -l pl
204 Dope³nienia basha dla subversion.
206 %package -n python-subversion
207 Summary: Subversion python bindings
208 Summary(pl): Dowi±zania do subversion dla pythona
209 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
210 Group: Development/Languages/Python
211 %pyrequires_eq python
212 Obsoletes: subversion-python
213 Requires: %{name}-libs = %{version}-%{release}
215 %description -n python-subversion
216 Subversion python bindings.
218 %description -n python-subversion -l pl
219 Dowi±zania do subversion dla pythona.
221 %description -n python-subversion -l pt_BR
222 Módulos python para acessar os recursos do Subversion.
224 %package -n perl-subversion
225 Summary: Subversion perl bindings
226 Summary(pl): Dowi±zania do subversion dla perla
227 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
228 Group: Development/Languages/Perl
229 Obsoletes: subversion-perl
230 Requires: %{name}-libs = %{version}-%{release}
232 %description -n perl-subversion
233 Subversion perl bindings.
235 %description -n perl-subversion -l pl
236 Dowi±zania do subversion dla perl.
238 %description -n perl-subversion -l pt_BR
239 Módulos perl para acessar os recursos do Subversion.
241 %package -n apache-mod_dav_svn
242 Summary: Apache module: Subversion Server
243 Summary(pl): Modu³ apache: Serwer Subversion
244 Group: Networking/Daemons
245 Requires: %{name} = %{version}-%{release}
246 Requires: apache(modules-api) = %{apache_modules_api}
247 Requires: apache-mod_dav
248 Requires: apache >= 2.0.47
250 %description -n apache-mod_dav_svn
251 Apache module: Subversion Server.
253 %description -n apache-mod_dav_svn -l pl
254 Modu³ apache: Serwer Subversion.
256 %package -n apache-mod_authz_svn
257 Summary: Apache module: Subversion Server - path-based authorization
258 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
259 Group: Networking/Daemons
260 Requires: apache(modules-api) = %{apache_modules_api}
261 Requires: apache-mod_dav_svn = %{version}-%{release}
262 Requires: apache >= 2.0.47
264 %description -n apache-mod_authz_svn
265 Apache module: Subversion Server - path-based authorization.
267 %description -n apache-mod_authz_svn -l pl
268 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
275 rm -rf apr-util{,/xml/expat}/autom4te.cache
278 cp -f /usr/share/automake/config.sub ac-helpers
279 chmod +x ./autogen.sh && ./autogen.sh
281 # don't enable dso - currently it's broken
285 --with-python=%{_bindir}/python \
286 --with-perl5=%{_bindir}/perl \
287 %if %{with net_client_only}
291 --without-berkeley-db \
294 --disable-mod-activation \
296 --with-apxs=%{_sbindir}/apxs \
300 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
302 %if !%{with python} && !%{with perl}
306 %{!?with_internal_neon:--with-neon=%{_prefix}} \
307 --with-apr=%{_bindir}/apr-1-config \
308 --with-apr-util=%{_bindir}/apu-1-config
312 %if !%{with net_client_only}
316 swig_pydir=%{py_sitedir}/libsvn \
317 swig_pydir_extra=%{py_sitedir}/svn
321 %{__make} swig-pl-lib
323 cd subversion/bindings/swig/perl/native
324 %{__perl} Makefile.PL INSTALLDIRS=vendor
330 %{__sed} -i -e 's/@SVN_DB_INCLUDES@//g' -e 's/@SVN_DB_LIBS@//g' svn-config
333 rm -rf $RPM_BUILD_ROOT
334 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
335 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
336 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
337 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
340 %if !%{with net_client_only} && %{with python}
343 DESTDIR=$RPM_BUILD_ROOT \
344 swig_pydir=%{py_sitedir}/libsvn \
345 swig_pydir_extra=%{py_sitedir}/svn
347 %if !%{with net_client_only} && %{with perl}
348 %{__make} install-swig-pl-lib \
349 DESTDIR=$RPM_BUILD_ROOT
351 cd subversion/bindings/swig/perl/native
353 DESTDIR=$RPM_BUILD_ROOT \
354 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
355 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
359 install svn-config $RPM_BUILD_ROOT%{_bindir}
362 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
363 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
364 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
365 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
368 %if !%{with net_client_only}
369 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
371 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
372 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
373 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
374 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
378 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
379 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
384 rm -rf $RPM_BUILD_ROOT
387 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
390 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
392 %post libs -p /sbin/ldconfig
393 %postun libs -p /sbin/ldconfig
394 %post -n python-subversion -p /sbin/ldconfig
395 %postun -n perl-subversion -p /sbin/ldconfig
398 if [ -f /var/lock/subsys/svnserve ]; then
399 /etc/rc.d/init.d/svnserve restart 1>&2
401 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
404 if [ "$1" = "0" ]; then
405 if [ -f /var/lock/subsys/svnserve ]; then
406 /etc/rc.d/init.d/svnserve restart 1>&2
411 %post -n apache-mod_dav_svn
412 if [ -f /var/lock/subsys/httpd ]; then
413 /etc/rc.d/init.d/httpd restart 1>&2
415 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
418 %preun -n apache-mod_dav_svn
419 if [ "$1" = "0" ]; then
420 if [ -f /var/lock/subsys/httpd ]; then
421 /etc/rc.d/init.d/httpd restart 1>&2
426 %defattr(644,root,root,755)
427 %doc BUGS CHANGES COPYING INSTALL README
429 %doc tools/hook-scripts/*.{pl,py,example}
430 %doc tools/hook-scripts/mailer/*.{py,example}
432 %attr(755,root,root) %{_bindir}/svn*
433 %exclude %{_bindir}/svnserve
434 %exclude %{_bindir}/svn-config
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.*
445 %if %{with perl} || %{with python}
446 %exclude %{_libdir}/lib*_swig_*.so.*
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_bindir}/svn-config
452 %{_includedir}/%{name}*
453 %attr(755,root,root) %{_libdir}/lib*.so
455 %{_examplesdir}/%{name}-%{version}
458 %defattr(644,root,root,755)
461 %if %{without net_client_only}
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_bindir}/svnserve
465 %{_mandir}/man?/svnserve*
466 %dir /home/services/subversion
467 %dir /home/services/subversion/repos
469 %attr(754,root,root) /etc/rc.d/init.d/svnserve
470 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_bindir}/svn-hot-backup
477 %files -n bash-completion-subversion
478 %defattr(644,root,root,755)
479 /etc/bash_completion.d/%{name}
482 %files -n python-subversion
483 %defattr(644,root,root,755)
484 %doc tools/backup/*.py tools/examples/*.py
485 %dir %{py_sitedir}/svn
486 %dir %{py_sitedir}/libsvn
487 %{py_sitedir}/svn/*.py[co]
488 %{py_sitedir}/libsvn/*.py[co]
489 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
490 %{_examplesdir}/python-%{name}-%{version}
491 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so.*
495 %files -n perl-subversion
496 %defattr(644,root,root,755)
497 %{perl_vendorarch}/SVN
498 %dir %{perl_vendorarch}/auto/SVN
499 %dir %{perl_vendorarch}/auto/SVN/*
500 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
501 %{perl_vendorarch}/auto/SVN/*/*.bs
502 %{_mandir}/man3/*.3pm*
503 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so.*
507 %files -n apache-mod_dav_svn
508 %defattr(644,root,root,755)
509 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
510 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
512 %files -n apache-mod_authz_svn
513 %defattr(644,root,root,755)
514 %doc subversion/mod_authz_svn/INSTALL
515 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
516 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
519 %endif # net_client_only