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
21 License: Apache/BSD Style
22 Group: Development/Version Control
23 Source0: http://subversion.tigris.org/tarballs/%{name}-%{version}-%{_rc}.tar.bz2
24 # Source0-md5: ecd53e9f065739023da768891b83b70e
25 Source1: %{name}-dav_svn.conf
26 Source2: %{name}-authz_svn.conf
27 Source3: %{name}-svnserve.init
28 Source4: %{name}-svnserve.sysconfig
29 #Patch0: %{name}-svnlook.patch
30 #Patch1: %{name}-hot_backup_num.patch
31 URL: http://subversion.tigris.org/
32 %if %{with net_client_only}
33 %global apache_modules_api 0
35 BuildRequires: automake
36 %{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
37 BuildRequires: db-devel >= 4.1.25
38 BuildRequires: rpmbuild(macros) >= 1.120
39 %if %{with python} || %{with perl}
40 BuildRequires: swig >= 1.3.19
42 %{?with_python:BuildRequires: swig-python >= 1.3.21}
44 BuildRequires: swig-perl >= 1.3.21
45 BuildRequires: perl-devel >= 1:5.8.0
46 BuildRequires: rpm-perlprov >= 4.1-13
49 BuildRequires: apr-devel >= 1:0.9.5
50 BuildRequires: apr-util-devel >= 1:0.9.5
51 BuildRequires: autoconf >= 2.59
53 BuildRequires: docbook-style-xsl >= 1.56
54 BuildRequires: expat-devel
55 BuildRequires: libtool >= 1.4-9
56 BuildRequires: libxslt-progs
57 %{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.7}
59 BuildRequires: python-devel >= 2.2
60 BuildRequires: rpm-pythonprov >= 4.0.2-50
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:0.9.5
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
167 Requires(post,preun): /sbin/chkconfig
168 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: python-rcsparse >= 0.1-0.20031026.0
183 Requires: python-subversion = %{version}
184 Requires: %{name} = %{version}-%{release}
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: bash-completion
197 Requires: %{name} = %{version}-%{release}
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: apache >= 2.0.47
246 Requires: apache(modules-api) = %{apache_modules_api}
247 Requires: apache-mod_dav
248 Requires: %{name} = %{version}-%{release}
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-mod_dav_svn = %{version}-%{release}
261 Requires: apache >= 2.0.47
262 Requires: apache(modules-api) = %{apache_modules_api}
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.
271 %setup -q -n %{name}-%{version}-%{_rc}
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-config \
308 --with-apr-util=%{_bindir}/apu-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 # build documentation; build process for documentation is severely
331 # braindamaged -- authors suggests to untar docbook distribution in
332 # build directory, hence the hack here
333 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
334 %{__make} -C doc/book all-html
336 # prepare for %%doc below
337 mv -f doc/book/book/html-chunk svn-handbook
338 mkdir svn-handbook/images/
339 cp -f doc/book/book/images/*.png svn-handbook/images/
342 rm -rf $RPM_BUILD_ROOT
343 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
344 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
345 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
346 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
349 %if !%{with net_client_only} && %{with python}
352 DESTDIR=$RPM_BUILD_ROOT \
353 swig_pydir=%{py_sitedir}/libsvn \
354 swig_pydir_extra=%{py_sitedir}/svn
356 %if !%{with net_client_only} && %{with perl}
357 %{__make} install-swig-pl-lib \
358 DESTDIR=$RPM_BUILD_ROOT
360 cd subversion/bindings/swig/perl/native
362 DESTDIR=$RPM_BUILD_ROOT \
363 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
364 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
369 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
370 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
371 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
372 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
374 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
376 %if !%{with net_client_only}
377 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
379 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
380 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
381 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
382 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
386 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
387 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
392 rm -rf $RPM_BUILD_ROOT
395 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
398 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
400 %post libs -p /sbin/ldconfig
401 %postun libs -p /sbin/ldconfig
404 if [ -f /var/lock/subsys/svnserve ]; then
405 /etc/rc.d/init.d/svnserve restart 1>&2
407 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
410 if [ "$1" = "0" ]; then
411 if [ -f /var/lock/subsys/svnserve ]; then
412 /etc/rc.d/init.d/svnserve restart 1>&2
417 %post -n apache-mod_dav_svn
418 if [ -f /var/lock/subsys/httpd ]; then
419 /etc/rc.d/init.d/httpd restart 1>&2
421 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
424 %preun -n apache-mod_dav_svn
425 if [ "$1" = "0" ]; then
426 if [ -f /var/lock/subsys/httpd ]; then
427 /etc/rc.d/init.d/httpd restart 1>&2
432 %defattr(644,root,root,755)
433 %doc BUGS CHANGES COPYING INSTALL README
434 %doc svn-handbook doc/book/misc-docs/misc-docs.html
435 %doc tools/hook-scripts/*.{pl,py,example}
436 %doc tools/hook-scripts/mailer/*.{py,example}
438 %attr(755,root,root) %{_bindir}/svn*
439 %exclude %{_bindir}/svnserve
440 %exclude %{_bindir}/svn-hot-backup
444 %exclude %{_mandir}/man?/svnserve*
445 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
447 %files libs -f %{name}.lang
448 %defattr(644,root,root,755)
449 %attr(755,root,root) %{_libdir}/lib*.so.*
452 %defattr(644,root,root,755)
453 %{_includedir}/%{name}*
454 %attr(755,root,root) %{_libdir}/lib*.so
457 %{_examplesdir}/%{name}-%{version}
460 %defattr(644,root,root,755)
463 %if !%{with net_client_only}
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{_bindir}/svnserve
467 %{_mandir}/man?/svnserve*
468 %dir /home/services/subversion
469 %dir /home/services/subversion/repos
471 %attr(754,root,root) /etc/rc.d/init.d/svnserve
472 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %{_bindir}/svn-hot-backup
479 %files -n bash-completion-subversion
480 /etc/bash_completion.d/%{name}
483 %files -n python-subversion
484 %defattr(644,root,root,755)
485 %doc tools/backup/*.py tools/examples/*.py
486 %dir %{py_sitedir}/svn
487 %dir %{py_sitedir}/libsvn
488 %{py_sitedir}/svn/*.py[co]
489 %{py_sitedir}/libsvn/*.py[co]
490 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
491 %{_examplesdir}/python-%{name}-%{version}
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*
506 %files -n apache-mod_dav_svn
507 %defattr(644,root,root,755)
508 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
509 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
511 %files -n apache-mod_authz_svn
512 %defattr(644,root,root,755)
513 %doc subversion/mod_authz_svn/INSTALL
514 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
515 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so