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 %include /usr/lib/rpm/macros.python
14 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
15 Summary: A Concurrent Versioning system similar to but better than CVS
16 Summary(pl): System kontroli wersji podobny, ale lepszy, ni¿ CVS
17 Summary(pt_BR): Sistema de versionamento concorrente
22 License: Apache/BSD Style
23 Group: Development/Version Control
24 Source0: http://subversion.tigris.org/tarballs/%{name}-%{version}-%{_rc}.tar.bz2
25 # Source0-md5: ee3c29e8794fa70206680e0511fa04da
26 Source1: %{name}-dav_svn.conf
27 Source2: %{name}-authz_svn.conf
28 Source3: %{name}-svnserve.init
29 Source4: %{name}-svnserve.sysconfig
30 #Patch0: %{name}-svnlook.patch
31 #Patch1: %{name}-hot_backup_num.patch
32 URL: http://subversion.tigris.org/
33 %if %{with net_client_only}
34 %global apache_modules_api 0
36 BuildRequires: automake
37 %{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
38 BuildRequires: db-devel >= 4.1.25
39 BuildRequires: rpmbuild(macros) >= 1.120
40 %if %{with python} || %{with perl}
41 BuildRequires: swig >= 1.3.19
43 %{?with_python:BuildRequires: swig-python >= 1.3.21}
45 BuildRequires: swig-perl >= 1.3.21
46 BuildRequires: perl-devel >= 1:5.8.0
47 BuildRequires: rpm-perlprov >= 4.1-13
50 BuildRequires: apr-devel >= 1:0.9.5
51 BuildRequires: apr-util-devel >= 1:0.9.5
52 BuildRequires: autoconf >= 2.59
54 BuildRequires: docbook-style-xsl >= 1.56
55 BuildRequires: expat-devel
56 BuildRequires: libtool >= 1.4-9
57 BuildRequires: libxslt-progs
58 %{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.7}
60 BuildRequires: python-devel >= 2.2
61 BuildRequires: rpm-pythonprov >= 4.0.2-50
63 BuildRequires: texinfo
65 Requires: %{name}-libs = %{version}-%{release}
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 %define _apachelibdir /usr/%{_lib}/apache
69 %define _libexecdir %{_libdir}/svn
72 The goal of the Subversion project is to build a version control
73 system that is a compelling replacement for CVS in the open source
77 - All current CVS features.
78 - Directories, renames, and file meta-data are versioned.
79 - Symbolic links, etc, are supported
80 - Commits are truly atomic.
81 - Branching and tagging are cheap (constant time) operations
82 - Repeated merges are handled gracefully
83 - Support for plug-in client side diff programs
84 - Natively client/server
85 - Client/server protocol sends diffs in both directions
86 - Costs are proportional to change size, not project size
87 - Internationalization
88 - Progressive multi-lingual support
91 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
95 - Wszystkie aktualne mo¿liwo¶ci CVS.
96 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
97 - Wsparcie dla linków symbolicznych itp.
98 - Commity s± w pe³ni atomowe.
99 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
100 - Powtarzaj±ce merge.
101 - Wsparcie dla pluginów diff'a po stronie klienta.
102 - Natywny klient/serwer.
103 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
104 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
105 - Internacjonalizacja.
106 - Postêpuj±ce wsparcie dla wielu jêzyków.
108 %description -l pt_BR
109 O objetivo do projeto Subversion é construir um sistema de controle de
110 versões que seja um substituto para o CVS (Concurrent Versioning
111 System) na comunidade opensource, fornecendo grandes melhorias.
114 Summary: Subversion libraries and modules
115 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
117 Obsoletes: libsubversion0
118 %{!?with_internal_neon:Requires: neon >= 0.24.6}
121 Subversion libraries and modules.
123 %description libs -l pl
124 Biblioteka subversion oraz ³adowalne modu³y.
127 Summary: Header files and develpment documentation for subversion
128 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
129 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
130 Group: Development/Libraries
131 Requires: %{name}-libs = %{version}-%{release}
132 Requires: apr-util-devel >= 1:0.9.5
133 %{!?with_internal_neon:Requires: neon-devel >= 0.24.6}
134 Obsoletes: libsubversion0-devel
137 Header files and develpment documentation for subversion.
139 %description devel -l pl
140 Pliki nag³ówkowe i dokumetacja do subversion.
142 %description devel -l pt_BR
143 Este pacote provê os arquivos necessários para desenvolvedores
144 interagirem com o Subversion.
147 Summary: Static subversion library
148 Summary(pl): Biblioteka statyczna subversion
149 Summary(pt_BR): Sistema de versionamento concorrente
150 Group: Development/Libraries
151 Requires: %{name}-devel = %{version}
152 Obsoletes: libsubversion0-static-devel
155 Static subversion library.
157 %description static -l pl
158 Biblioteka statyczna subversion.
160 %description static -l pt_BR
161 Este pacote provê um cliente estático do subversion.
164 Summary: Subversion svnserve
165 Summary(pl): Subversion svnserve
166 Group: Networking/Daemons
168 Requires(post,preun): /sbin/chkconfig
169 Requires: %{name} = %{version}-%{release}
171 %description svnserve
172 Subversion svnserve server.
174 %description svnserve -l pl
175 Serwer subversion svnserve.
178 Summary: Subversion tools and scripts
179 Summary(pl): Narzêdzia oraz skrypty dla subversion
180 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
182 %pyrequires_eq python
183 Requires: bash-completion
184 Requires: python-rcsparse >= 0.1-0.20031026.0
185 Requires: python-subversion = %{version}
186 Requires: %{name} = %{version}-%{release}
189 Subversion tools and scripts.
191 %description tools -l pl
192 Narzêdzia oraz skrypty dla subversion.
194 %package -n python-subversion
195 Summary: Subversion python bindings
196 Summary(pl): Dowi±zania do subversion dla pythona
197 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
198 Group: Development/Languages/Python
199 %pyrequires_eq python
200 Obsoletes: subversion-python
201 Requires: %{name}-libs = %{version}-%{release}
203 %description -n python-subversion
204 Subversion python bindings.
206 %description -n python-subversion -l pl
207 Dowi±zania do subversion dla pythona.
209 %description -n python-subversion -l pt_BR
210 Módulos python para acessar os recursos do Subversion.
212 %package -n perl-subversion
213 Summary: Subversion perl bindings
214 Summary(pl): Dowi±zania do subversion dla perla
215 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
216 Group: Development/Languages/Perl
217 Obsoletes: subversion-perl
218 Requires: %{name}-libs = %{version}-%{release}
220 %description -n perl-subversion
221 Subversion perl bindings.
223 %description -n perl-subversion -l pl
224 Dowi±zania do subversion dla perl.
226 %description -n perl-subversion -l pt_BR
227 Módulos perl para acessar os recursos do Subversion.
229 %package -n apache-mod_dav_svn
230 Summary: Apache module: Subversion Server
231 Summary(pl): Modu³ apache: Serwer Subversion
232 Group: Networking/Daemons
233 Requires: apache >= 2.0.47
234 Requires: apache(modules-api) = %{apache_modules_api}
235 Requires: apache-mod_dav
236 Requires: %{name} = %{version}-%{release}
238 %description -n apache-mod_dav_svn
239 Apache module: Subversion Server.
241 %description -n apache-mod_dav_svn -l pl
242 Modu³ apache: Serwer Subversion.
244 %package -n apache-mod_authz_svn
245 Summary: Apache module: Subversion Server - path-based authorization
246 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
247 Group: Networking/Daemons
248 Requires: apache-mod_dav_svn = %{version}-%{release}
249 Requires: apache >= 2.0.47
250 Requires: apache(modules-api) = %{apache_modules_api}
252 %description -n apache-mod_authz_svn
253 Apache module: Subversion Server - path-based authorization.
255 %description -n apache-mod_authz_svn -l pl
256 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
259 %setup -q -n %{name}-%{version}-%{_rc}
263 rm -rf apr-util{,/xml/expat}/autom4te.cache
266 cp -f /usr/share/automake/config.sub ac-helpers
267 chmod +x ./autogen.sh && ./autogen.sh
269 # don't enable dso - currently it's broken
273 --with-python=%{_bindir}/python \
274 --with-perl5=%{_bindir}/perl \
275 %if %{with net_client_only}
279 --without-berkeley-db \
282 --disable-mod-activation \
284 --with-apxs=%{_sbindir}/apxs \
288 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
290 %if !%{with python} && !%{with perl}
294 %{!?with_internal_neon:--with-neon=%{_prefix}} \
295 --with-apr=%{_bindir}/apr-config \
296 --with-apr-util=%{_bindir}/apu-config
300 %if !%{with net_client_only}
304 swig_pydir=%{py_sitedir}/libsvn \
305 swig_pydir_extra=%{py_sitedir}/svn
309 %{__make} swig-pl-lib
311 cd subversion/bindings/swig/perl/native
312 %{__perl} Makefile.PL INSTALLDIRS=vendor
318 # build documentation; build process for documentation is severely
319 # braindamaged -- authors suggests to untar docbook distribution in
320 # build directory, hence the hack here
321 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
322 %{__make} -C doc/book all-html
324 # prepare for %%doc below
325 mv -f doc/book/book/html-chunk svn-handbook
326 mkdir svn-handbook/images/
327 cp -f doc/book/book/images/*.png svn-handbook/images/
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}
357 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
358 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
359 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
360 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
362 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
364 %if !%{with net_client_only}
365 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
367 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
368 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
369 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
370 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
374 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
375 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
380 rm -rf $RPM_BUILD_ROOT
383 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
386 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
388 %post libs -p /sbin/ldconfig
389 %postun libs -p /sbin/ldconfig
392 if [ -f /var/lock/subsys/svnserve ]; then
393 /etc/rc.d/init.d/svnserve restart 1>&2
395 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
398 if [ "$1" = "0" ]; then
399 if [ -f /var/lock/subsys/svnserve ]; then
400 /etc/rc.d/init.d/svnserve restart 1>&2
405 %post -n apache-mod_dav_svn
406 if [ -f /var/lock/subsys/httpd ]; then
407 /etc/rc.d/init.d/httpd restart 1>&2
409 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
412 %preun -n apache-mod_dav_svn
413 if [ "$1" = "0" ]; then
414 if [ -f /var/lock/subsys/httpd ]; then
415 /etc/rc.d/init.d/httpd restart 1>&2
420 %defattr(644,root,root,755)
421 %doc BUGS CHANGES COPYING INSTALL README
422 %doc svn-handbook doc/book/misc-docs/misc-docs.html
423 %doc tools/hook-scripts/*.{pl,py,example}
424 %doc tools/hook-scripts/mailer/*.{py,example}
426 %attr(755,root,root) %{_bindir}/svn*
427 %exclude %{_bindir}/svnserve
428 %exclude %{_bindir}/svn-hot-backup
432 %exclude %{_mandir}/man?/svnserve*
433 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
435 %files libs -f %{name}.lang
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_libdir}/lib*.so.*
440 %defattr(644,root,root,755)
441 %{_includedir}/%{name}*
442 %attr(755,root,root) %{_libdir}/lib*.so
445 %{_examplesdir}/%{name}-%{version}
448 %defattr(644,root,root,755)
451 %if !%{with net_client_only}
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_bindir}/svnserve
455 %{_mandir}/man?/svnserve*
456 %dir /home/services/subversion
457 %dir /home/services/subversion/repos
459 %attr(754,root,root) /etc/rc.d/init.d/svnserve
460 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/svn-hot-backup
466 /etc/bash_completion.d/%{name}
469 %files -n python-subversion
470 %defattr(644,root,root,755)
471 %doc tools/backup/*.py tools/examples/*.py
472 %dir %{py_sitedir}/svn
473 %dir %{py_sitedir}/libsvn
474 %{py_sitedir}/svn/*.py[co]
475 %{py_sitedir}/libsvn/*.py[co]
476 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
477 %{_examplesdir}/python-%{name}-%{version}
481 %files -n perl-subversion
482 %defattr(644,root,root,755)
483 %{perl_vendorarch}/SVN
484 %dir %{perl_vendorarch}/auto/SVN
485 %dir %{perl_vendorarch}/auto/SVN/*
486 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
487 %{perl_vendorarch}/auto/SVN/*/*.bs
488 %{_mandir}/man3/*.3pm*
492 %files -n apache-mod_dav_svn
493 %defattr(644,root,root,755)
494 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
495 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
497 %files -n apache-mod_authz_svn
498 %defattr(644,root,root,755)
499 %doc subversion/mod_authz_svn/INSTALL
500 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
501 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so