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 net_client_only # build only net client
8 %bcond_without python # build without python bindings
9 %bcond_without perl # build without perl bindings
10 %bcond_without apache # build without apache support (webdav, etc)
12 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
13 Summary: A Concurrent Versioning system similar to but better than CVS
14 Summary(pl): System kontroli wersji podobny, ale lepszy, ni¿ CVS
15 Summary(pt_BR): Sistema de versionamento concorrente
19 License: Apache/BSD Style
20 Group: Development/Version Control
21 Source0: http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
22 # Source0-md5: 0d91a7fe152d0373044c47c54deb2c9a
23 Source1: %{name}-dav_svn.conf
24 Source2: %{name}-authz_svn.conf
25 Source3: %{name}-svnserve.init
26 Source4: %{name}-svnserve.sysconfig
27 Patch0: %{name}-home_etc.patch
28 Patch1: %{name}-DESTDIR.patch
29 URL: http://subversion.tigris.org/
30 %if %{with net_client_only}
31 %global apache_modules_api 0
33 %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8}
34 BuildRequires: automake
35 BuildRequires: db-devel >= 4.1.25
36 BuildRequires: rpmbuild(macros) >= 1.120
38 BuildRequires: perl-devel >= 1:5.8.0
39 BuildRequires: rpm-perlprov >= 4.1-13
40 BuildRequires: swig-perl >= 1.3.24
43 BuildRequires: apr-devel >= 1:1.0.0
44 BuildRequires: apr-util-devel >= 1:1.0.0
45 BuildRequires: autoconf >= 2.59
47 BuildRequires: expat-devel
48 BuildRequires: gettext-devel
49 BuildRequires: libtool >= 1.4-9
50 BuildRequires: neon-devel >= 0.24.7
52 BuildRequires: python-devel >= 2.2
53 BuildRequires: python-modules >= 2.2
54 BuildRequires: python >= 2.2
55 BuildRequires: sed >= 4.0
56 BuildRequires: swig-python >= 1.3.24
58 BuildRequires: texinfo
60 Requires: %{name}-libs = %{version}-%{release}
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 %define _apachelibdir /usr/%{_lib}/apache
64 %define _libexecdir %{_libdir}/svn
67 The goal of the Subversion project is to build a version control
68 system that is a compelling replacement for CVS in the open source
72 - All current CVS features.
73 - Directories, renames, and file meta-data are versioned.
74 - Symbolic links, etc, are supported
75 - Commits are truly atomic.
76 - Branching and tagging are cheap (constant time) operations
77 - Repeated merges are handled gracefully
78 - Support for plug-in client side diff programs
79 - Natively client/server
80 - Client/server protocol sends diffs in both directions
81 - Costs are proportional to change size, not project size
82 - Internationalization
83 - Progressive multi-lingual support
86 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
90 - Wszystkie aktualne mo¿liwo¶ci CVS.
91 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
92 - Wsparcie dla linków symbolicznych itp.
93 - Commity s± w pe³ni atomowe.
94 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
96 - Wsparcie dla pluginów diff'a po stronie klienta.
97 - Natywny klient/serwer.
98 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
99 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
100 - Internacjonalizacja.
101 - Postêpuj±ce wsparcie dla wielu jêzyków.
103 %description -l pt_BR
104 O objetivo do projeto Subversion é construir um sistema de controle de
105 versões que seja um substituto para o CVS (Concurrent Versioning
106 System) na comunidade opensource, fornecendo grandes melhorias.
109 Summary: Subversion libraries and modules
110 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
112 Obsoletes: libsubversion0
113 Requires: neon >= 0.24.7
116 Subversion libraries and modules.
118 %description libs -l pl
119 Biblioteka subversion oraz ³adowalne modu³y.
122 Summary: Header files and develpment documentation for subversion
123 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
124 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
125 Group: Development/Libraries
126 Requires: %{name}-libs = %{version}-%{release}
127 Requires: apr-util-devel >= 1:1.0.0
128 Requires: neon-devel >= 0.24.7
129 Obsoletes: libsubversion0-devel
132 Header files and develpment documentation for subversion.
134 %description devel -l pl
135 Pliki nag³ówkowe i dokumetacja do subversion.
137 %description devel -l pt_BR
138 Este pacote provê os arquivos necessários para desenvolvedores
139 interagirem com o Subversion.
142 Summary: Static subversion library
143 Summary(pl): Biblioteka statyczna subversion
144 Summary(pt_BR): Sistema de versionamento concorrente
145 Group: Development/Libraries
146 Requires: %{name}-devel = %{version}
147 Obsoletes: libsubversion0-static-devel
150 Static subversion library.
152 %description static -l pl
153 Biblioteka statyczna subversion.
155 %description static -l pt_BR
156 Este pacote provê um cliente estático do subversion.
159 Summary: Subversion svnserve
160 Summary(pl): Subversion svnserve
161 Group: Networking/Daemons
162 Requires(post,preun): /sbin/chkconfig
163 Requires: %{name} = %{version}-%{release}
166 %description svnserve
167 Subversion svnserve server.
169 %description svnserve -l pl
170 Serwer subversion svnserve.
173 Summary: Subversion tools and scripts
174 Summary(pl): Narzêdzia oraz skrypty dla subversion
175 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
177 %pyrequires_eq python
178 Requires: %{name} = %{version}-%{release}
179 Requires: python-rcsparse >= 0.1-0.20031026.0
180 Requires: python-subversion = %{version}
183 Subversion tools and scripts.
185 %description tools -l pl
186 Narzêdzia oraz skrypty dla subversion.
188 %package -n bash-completion-subversion
189 Summary: bash completion for subversion
190 Summary(pl): Dope³nienia basha dla subversion
191 Group: Applications/Shells
192 Requires: bash-completion
193 Requires: %{name} = %{version}-%{release}
194 Conflicts: %{name}-tools <= 1.1.0-0.rc6.1
196 %description -n bash-completion-subversion
197 Bash completion for subversion.
199 %description -n bash-completion-subversion -l pl
200 Dope³nienia basha dla subversion.
202 %package -n python-subversion
203 Summary: Subversion python bindings
204 Summary(pl): Dowi±zania do subversion dla pythona
205 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
206 Group: Development/Languages/Python
207 %pyrequires_eq python
208 Obsoletes: subversion-python
209 Requires: %{name}-libs = %{version}-%{release}
211 %description -n python-subversion
212 Subversion python bindings.
214 %description -n python-subversion -l pl
215 Dowi±zania do subversion dla pythona.
217 %description -n python-subversion -l pt_BR
218 Módulos python para acessar os recursos do Subversion.
220 %package -n perl-subversion
221 Summary: Subversion perl bindings
222 Summary(pl): Dowi±zania do subversion dla perla
223 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
224 Group: Development/Languages/Perl
225 Obsoletes: subversion-perl
226 Requires: %{name}-libs = %{version}-%{release}
228 %description -n perl-subversion
229 Subversion perl bindings.
231 %description -n perl-subversion -l pl
232 Dowi±zania do subversion dla perl.
234 %description -n perl-subversion -l pt_BR
235 Módulos perl para acessar os recursos do Subversion.
237 %package -n apache-mod_dav_svn
238 Summary: Apache module: Subversion Server
239 Summary(pl): Modu³ apache: Serwer Subversion
240 Group: Networking/Daemons
241 Requires: %{name} = %{version}-%{release}
242 Requires: apache(modules-api) = %{apache_modules_api}
243 Requires: apache-mod_dav
244 Requires: apache >= 2.0.47
246 %description -n apache-mod_dav_svn
247 Apache module: Subversion Server.
249 %description -n apache-mod_dav_svn -l pl
250 Modu³ apache: Serwer Subversion.
252 %package -n apache-mod_authz_svn
253 Summary: Apache module: Subversion Server - path-based authorization
254 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
255 Group: Networking/Daemons
256 Requires: apache(modules-api) = %{apache_modules_api}
257 Requires: apache-mod_dav_svn = %{version}-%{release}
258 Requires: apache >= 2.0.47
260 %description -n apache-mod_authz_svn
261 Apache module: Subversion Server - path-based authorization.
263 %description -n apache-mod_authz_svn -l pl
264 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
268 rm -rf apr apr-util neon
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-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 %{__sed} -i -e 's/@SVN_DB_INCLUDES@//g' -e 's/@SVN_DB_LIBS@//g' svn-config
328 rm -rf $RPM_BUILD_ROOT
329 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
330 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
331 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
332 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
335 %if !%{with net_client_only} && %{with python}
338 APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
339 DESTDIR=$RPM_BUILD_ROOT \
340 swig_pydir=%{py_sitedir}/libsvn \
341 swig_pydir_extra=%{py_sitedir}/svn
343 %if !%{with net_client_only} && %{with perl}
344 %{__make} install-swig-pl-lib \
345 DESTDIR=$RPM_BUILD_ROOT
347 cd subversion/bindings/swig/perl/native
349 DESTDIR=$RPM_BUILD_ROOT \
350 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
351 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
355 install svn-config $RPM_BUILD_ROOT%{_bindir}
358 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
359 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
360 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
361 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
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
390 %post -n python-subversion -p /sbin/ldconfig
391 %postun -n perl-subversion -p /sbin/ldconfig
394 if [ -f /var/lock/subsys/svnserve ]; then
395 /etc/rc.d/init.d/svnserve restart 1>&2
397 echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
400 if [ "$1" = "0" ]; then
401 if [ -f /var/lock/subsys/svnserve ]; then
402 /etc/rc.d/init.d/svnserve restart 1>&2
407 %post -n apache-mod_dav_svn
408 if [ -f /var/lock/subsys/httpd ]; then
409 /etc/rc.d/init.d/httpd restart 1>&2
411 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
414 %preun -n apache-mod_dav_svn
415 if [ "$1" = "0" ]; then
416 if [ -f /var/lock/subsys/httpd ]; then
417 /etc/rc.d/init.d/httpd restart 1>&2
422 %defattr(644,root,root,755)
423 %doc BUGS CHANGES COPYING INSTALL README
425 %doc tools/hook-scripts/*.{pl,py,example}
426 %doc tools/hook-scripts/mailer/*.{py,example}
428 %attr(755,root,root) %{_bindir}/svn*
429 %exclude %{_bindir}/svnserve
430 %exclude %{_bindir}/svn-config
431 %exclude %{_bindir}/svn-hot-backup
435 %exclude %{_mandir}/man?/svnserve*
437 %files libs -f %{name}.lang
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/lib*.so.*
440 %if %{with perl} || %{with python}
441 %exclude %{_libdir}/lib*_swig_*.so.*
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_bindir}/svn-config
447 %{_includedir}/%{name}*
448 %attr(755,root,root) %{_libdir}/lib*.so
450 %if %{with perl} || %{with python}
451 %exclude %{_libdir}/lib*_swig_*.so
452 %exclude %{_libdir}/lib*swig*.la
454 %{_examplesdir}/%{name}-%{version}
457 %defattr(644,root,root,755)
460 %if %{without net_client_only}
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_bindir}/svnserve
464 %{_mandir}/man?/svnserve*
465 %dir /home/services/subversion
466 %dir /home/services/subversion/repos
468 %attr(754,root,root) /etc/rc.d/init.d/svnserve
469 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/svn-hot-backup
476 %files -n bash-completion-subversion
477 %defattr(644,root,root,755)
478 /etc/bash_completion.d/%{name}
481 %files -n python-subversion
482 %defattr(644,root,root,755)
483 %doc tools/backup/*.py tools/examples/*.py
484 %dir %{py_sitedir}/svn
485 %dir %{py_sitedir}/libsvn
486 %{py_sitedir}/svn/*.py[co]
487 %{py_sitedir}/libsvn/*.py[co]
488 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
489 %{_examplesdir}/python-%{name}-%{version}
490 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
491 %{_libdir}/lib*_swig_py*.la
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*
504 %{_libdir}/lib*_swig_perl*.la
508 %files -n apache-mod_dav_svn
509 %defattr(644,root,root,755)
510 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
511 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
513 %files -n apache-mod_authz_svn
514 %defattr(644,root,root,755)
515 %doc subversion/mod_authz_svn/INSTALL
516 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
517 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
520 %endif # net_client_only