2 # - remove net_client_only and add db bcond (then without apache and
3 # without db => net_client_only - spec will be more simpler, I think)
6 %bcond_with net_client_only # build only net client
7 %bcond_without python # build without python bindings
8 %bcond_without perl # build without perl bindings
9 %bcond_without apache # build without apache support (webdav, etc)
11 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
12 %define apxs /usr/sbin/apxs
15 Summary: A Concurrent Versioning system similar to but better than CVS
16 Summary(pl.UTF-8): System kontroli wersji podobny, ale lepszy, niż CVS
17 Summary(pt_BR.UTF-8): Sistema de versionamento concorrente
21 License: Apache/BSD Style
22 Group: Development/Version Control
23 Source0: http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
24 # Source0-md5: 3caf1d93e13ed09d76c42eff0f52dfaf
25 Source1: %{name}-dav_svn.conf
26 Source2: %{name}-authz_svn.conf
27 Source3: %{name}-svnserve.init
28 Source4: %{name}-svnserve.sysconfig
29 Source5: %{name}-convert-typemaps-to-ifdef.py
30 Patch0: %{name}-home_etc.patch
31 Patch1: %{name}-DESTDIR.patch
32 Patch2: %{name}-neon.patch
33 Patch3: %{name}-python_bindings.patch
34 URL: http://subversion.tigris.org/
35 %if %{with net_client_only}
36 %global apache_modules_api 0
38 %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8}
39 BuildRequires: automake
40 BuildRequires: db-devel >= 4.1.25
41 BuildRequires: rpmbuild(macros) >= 1.268
43 BuildRequires: perl-devel >= 1:5.8.0
44 BuildRequires: rpm-perlprov >= 4.1-13
45 BuildRequires: swig-perl >= 1.3.24
48 BuildRequires: apr-devel >= 1:1.0.0
49 BuildRequires: apr-util-devel >= 1:1.2.8-3
50 BuildRequires: autoconf >= 2.59
52 BuildRequires: expat-devel
53 BuildRequires: gettext-devel
54 BuildRequires: libtool >= 1.4-9
55 BuildRequires: neon-devel >= 0.26.0
56 BuildRequires: python >= 2.2
57 BuildRequires: python-modules >= 2.2
59 BuildRequires: python-devel >= 2.2
60 BuildRequires: sed >= 4.0
61 BuildRequires: swig-python >= 1.3.24
63 BuildRequires: texinfo
65 Requires: %{name}-libs = %{version}-%{release}
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 %define _apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
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
90 %description -l pl.UTF-8
91 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
95 - Wszystkie aktualne możliwości CVS.
96 - Katalogi, zmiany nazw oraz metadane plików są wersjonowane.
97 - Obsługa dowiązań symbolicznych itp.
98 - Commity są w pełni atomowe.
99 - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami.
100 - Dobra obsługa powtarzanego łączenia (merge).
101 - Obsługa wtyczek diff 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.UTF-8
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.UTF-8): Biblioteka subversion oraz ładowalne moduły
117 Requires: neon >= 0.26.0
118 Obsoletes: libsubversion0
121 Subversion libraries and modules.
123 %description libs -l pl.UTF-8
124 Biblioteka subversion oraz ładowalne moduły.
127 Summary: Header files and develpment documentation for subversion
128 Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do subversion
129 Summary(pt_BR.UTF-8): Arquivos de desenvolvimento para o Subversion
130 Group: Development/Libraries
131 Requires: %{name}-libs = %{version}-%{release}
132 Requires: apr-util-devel >= 1:1.0.0
133 Requires: neon-devel >= 0.26.0
134 Obsoletes: libsubversion0-devel
137 Header files and develpment documentation for subversion.
139 %description devel -l pl.UTF-8
140 Pliki nagłówkowe i dokumetacja do subversion.
142 %description devel -l pt_BR.UTF-8
143 Este pacote provê os arquivos necessários para desenvolvedores
144 interagirem com o Subversion.
147 Summary: Static subversion library
148 Summary(pl.UTF-8): Biblioteka statyczna subversion
149 Summary(pt_BR.UTF-8): 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.UTF-8
158 Biblioteka statyczna subversion.
160 %description static -l pt_BR.UTF-8
161 Este pacote provê um cliente estático do subversion.
164 Summary: Subversion svnserve
165 Summary(pl.UTF-8): Subversion svnserve
166 Group: Networking/Daemons
167 Requires(post,preun): /sbin/chkconfig
168 Requires: %{name} = %{version}-%{release}
171 %description svnserve
172 Subversion svnserve server.
174 %description svnserve -l pl.UTF-8
175 Serwer subversion svnserve.
178 Summary: Subversion tools and scripts
179 Summary(pl.UTF-8): Narzędzia oraz skrypty dla subversion
180 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
182 %pyrequires_eq python
183 Requires: %{name} = %{version}-%{release}
184 Requires: python-rcsparse >= 0.1-0.20031026.0
185 Requires: python-subversion = %{version}
188 Subversion tools and scripts.
190 %description tools -l pl.UTF-8
191 Narzędzia oraz skrypty dla subversion.
193 %package -n bash-completion-subversion
194 Summary: bash completion for subversion
195 Summary(pl.UTF-8): Dopełnienia basha dla subversion
196 Group: Applications/Shells
197 Requires: %{name} = %{version}-%{release}
198 Requires: bash-completion
199 Conflicts: %{name}-tools <= 1.1.0-0.rc6.1
201 %description -n bash-completion-subversion
202 Bash completion for subversion.
204 %description -n bash-completion-subversion -l pl.UTF-8
205 Dopełnienia basha dla subversion.
207 %package -n python-subversion
208 Summary: Subversion python bindings
209 Summary(pl.UTF-8): Dowiązania do subversion dla pythona
210 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
211 Group: Development/Languages/Python
212 %pyrequires_eq python
213 Requires: %{name}-libs = %{version}-%{release}
214 Obsoletes: subversion-python
216 %description -n python-subversion
217 Subversion python bindings.
219 %description -n python-subversion -l pl.UTF-8
220 Dowiązania do subversion dla pythona.
222 %description -n python-subversion -l pt_BR.UTF-8
223 Módulos python para acessar os recursos do Subversion.
225 %package -n perl-subversion
226 Summary: Subversion perl bindings
227 Summary(pl.UTF-8): Dowiązania do subversion dla perla
228 Summary(pt_BR.UTF-8): Módulos perl para acessar os recursos do Subversion
229 Group: Development/Languages/Perl
230 Requires: %{name}-libs = %{version}-%{release}
231 Obsoletes: subversion-perl
233 %description -n perl-subversion
234 Subversion perl bindings.
236 %description -n perl-subversion -l pl.UTF-8
237 Dowiązania do subversion dla perl.
239 %description -n perl-subversion -l pt_BR.UTF-8
240 Módulos perl para acessar os recursos do Subversion.
242 %package -n apache-mod_dav_svn
243 Summary: Apache module: Subversion Server
244 Summary(pl.UTF-8): Moduł apache: Serwer Subversion
245 Group: Networking/Daemons
246 Requires: %{name} = %{version}-%{release}
247 Requires: apache(modules-api) = %apache_modules_api
248 Requires: apache-mod_dav
250 %description -n apache-mod_dav_svn
251 Apache module: Subversion Server.
253 %description -n apache-mod_dav_svn -l pl.UTF-8
254 Moduł apache: Serwer Subversion.
256 %package -n apache-mod_authz_svn
257 Summary: Apache module: Subversion Server - path-based authorization
258 Summary(pl.UTF-8): 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}
263 %description -n apache-mod_authz_svn
264 Apache module: Subversion Server - path-based authorization.
266 %description -n apache-mod_authz_svn -l pl.UTF-8
267 Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion.
271 rm -rf apr apr-util neon
278 rm subversion/bindings/swig/proxy/*.swg
279 cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
280 cp -f /usr/share/automake/config.sub ac-helpers
281 chmod +x ./autogen.sh && ./autogen.sh
283 # don't enable dso - currently it's broken
287 --with-python=%{_bindir}/python \
288 --with-perl5=%{_bindir}/perl \
289 %if %{with net_client_only}
293 --without-berkeley-db \
296 --disable-mod-activation \
298 --with-apxs=%{_sbindir}/apxs \
302 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
304 %if !%{with python} && !%{with perl}
308 --with-neon=%{_prefix} \
309 --disable-neon-version-check \
310 --with-apr=%{_bindir}/apr-1-config \
311 --with-apr-util=%{_bindir}/apu-1-config
315 %if !%{with net_client_only}
319 swig_pydir=%{py_sitedir}/libsvn \
320 swig_pydir_extra=%{py_sitedir}/svn
324 %{__make} swig-pl-lib
326 cd subversion/bindings/swig/perl/native
327 %{__perl} Makefile.PL INSTALLDIRS=vendor
334 rm -rf $RPM_BUILD_ROOT
335 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
336 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
337 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
338 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
340 %{__make} install -j1 \
341 %if !%{with net_client_only} && %{with python}
344 APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
345 DESTDIR=$RPM_BUILD_ROOT \
346 swig_pydir=%{py_sitedir}/libsvn \
347 swig_pydir_extra=%{py_sitedir}/svn
349 %if !%{with net_client_only} && %{with perl}
350 %{__make} install-swig-pl-lib \
351 DESTDIR=$RPM_BUILD_ROOT
353 cd subversion/bindings/swig/perl/native
355 DESTDIR=$RPM_BUILD_ROOT \
356 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
357 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
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}
383 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*swig*.la
386 rm -rf $RPM_BUILD_ROOT
389 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
392 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
394 %post libs -p /sbin/ldconfig
395 %postun libs -p /sbin/ldconfig
396 %post -n python-subversion -p /sbin/ldconfig
397 %postun -n perl-subversion -p /sbin/ldconfig
400 /sbin/chkconfig --add svnserve
401 %service svnserve restart "svnserve daemon"
404 if [ "$1" = "0" ]; then
405 %service svnserve stop
406 /sbin/chkconfig --del svnserve
409 %post -n apache-mod_dav_svn
410 %service -q httpd restart
412 %preun -n apache-mod_dav_svn
413 if [ "$1" = "0" ]; then
414 %service -q httpd restart
418 %defattr(644,root,root,755)
419 %doc BUGS CHANGES COPYING INSTALL README
421 %doc tools/hook-scripts/*.{pl,py,example}
422 %doc tools/hook-scripts/mailer/*.{py,example}
424 %attr(755,root,root) %{_bindir}/svn*
425 %exclude %{_bindir}/svnserve
426 %if !%{with net_client_only}
427 %exclude %{_bindir}/svn-hot-backup
432 %exclude %{_mandir}/man?/svnserve*
434 %files libs -f %{name}.lang
435 %defattr(644,root,root,755)
436 %attr(755,root,root) %{_libdir}/lib*.so.*
437 %if %{with perl} || %{with python}
438 %exclude %{_libdir}/lib*_swig_*.so.*
442 %defattr(644,root,root,755)
443 %{_includedir}/%{name}*
444 %attr(755,root,root) %{_libdir}/lib*.so
446 %if %{with perl} || %{with python}
447 %exclude %{_libdir}/lib*_swig_*.so
449 %{_examplesdir}/%{name}-%{version}
452 %defattr(644,root,root,755)
455 %if !%{with net_client_only}
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_bindir}/svnserve
459 %{_mandir}/man?/svnserve*
460 %dir /home/services/subversion
461 %dir /home/services/subversion/repos
463 %attr(754,root,root) /etc/rc.d/init.d/svnserve
464 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_bindir}/svn-hot-backup
471 %files -n bash-completion-subversion
472 %defattr(644,root,root,755)
473 /etc/bash_completion.d/%{name}
476 %files -n python-subversion
477 %defattr(644,root,root,755)
478 %doc tools/backup/*.py tools/examples/*.py
479 %dir %{py_sitedir}/svn
480 %dir %{py_sitedir}/libsvn
481 %{py_sitedir}/svn/*.py[co]
482 %{py_sitedir}/libsvn/*.py[co]
483 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
484 %{_examplesdir}/python-%{name}-%{version}
485 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
489 %files -n perl-subversion
490 %defattr(644,root,root,755)
491 %{perl_vendorarch}/SVN
492 %dir %{perl_vendorarch}/auto/SVN
493 %dir %{perl_vendorarch}/auto/SVN/*
494 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
495 %{perl_vendorarch}/auto/SVN/*/*.bs
496 %{_mandir}/man3/*.3pm*
497 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so*
501 %files -n apache-mod_dav_svn
502 %defattr(644,root,root,755)
503 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
504 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
506 %files -n apache-mod_authz_svn
507 %defattr(644,root,root,755)
508 %doc subversion/mod_authz_svn/INSTALL
509 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
510 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
513 %endif # net_client_only