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 (broken)
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-like
22 Group: Development/Version Control
23 Source0: http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
24 # Source0-md5: 32786fe2f322982c0567346de18f6460
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 Patch4: %{name}-swig.patch
35 URL: http://subversion.tigris.org/
36 %if %{with net_client_only}
37 %global apache_modules_api 0
39 %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8}
40 BuildRequires: automake
41 BuildRequires: db-devel >= 4.1.25
42 BuildRequires: rpmbuild(macros) >= 1.268
44 BuildRequires: perl-devel >= 1:5.8.0
45 BuildRequires: rpm-perlprov >= 4.1-13
46 BuildRequires: swig-perl >= 1.3.24
49 BuildRequires: apr-devel >= 1:1.0.0
50 BuildRequires: apr-util-devel >= 1:1.2.8-3
51 BuildRequires: autoconf >= 2.59
53 BuildRequires: expat-devel
54 BuildRequires: gettext-devel
55 BuildRequires: libtool >= 1.4-9
56 BuildRequires: neon-devel >= 0.26.0
57 BuildRequires: python >= 2.2
58 BuildRequires: python-modules >= 2.2
60 BuildRequires: python-devel >= 2.2
61 BuildRequires: sed >= 4.0
62 BuildRequires: swig-python >= 1.3.24
64 BuildRequires: texinfo
66 Requires: %{name}-libs = %{version}-%{release}
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 %define _libexecdir %{_libdir}/svn
70 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
71 %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
74 The goal of the Subversion project is to build a version control
75 system that is a compelling replacement for CVS in the open source
79 - All current CVS features.
80 - Directories, renames, and file meta-data are versioned.
81 - Symbolic links, etc, are supported
82 - Commits are truly atomic.
83 - Branching and tagging are cheap (constant time) operations
84 - Repeated merges are handled gracefully
85 - Support for plug-in client side diff programs
86 - Natively client/server
87 - Client/server protocol sends diffs in both directions
88 - Costs are proportional to change size, not project size
89 - Internationalization
90 - Progressive multi-lingual support
92 %description -l pl.UTF-8
93 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
97 - Wszystkie aktualne możliwości CVS.
98 - Katalogi, zmiany nazw oraz metadane plików są wersjonowane.
99 - Obsługa dowiązań symbolicznych itp.
100 - Commity są w pełni atomowe.
101 - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami.
102 - Dobra obsługa powtarzanego łączenia (merge).
103 - Obsługa wtyczek diff po stronie klienta.
104 - Natywny klient/serwer.
105 - Klient/Serwer przesyłają diffy w obu kierunkach.
106 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
107 - Internacjonalizacja.
108 - Postępujące wsparcie dla wielu języków.
110 %description -l pt_BR.UTF-8
111 O objetivo do projeto Subversion é construir um sistema de controle de
112 versões que seja um substituto para o CVS (Concurrent Versioning
113 System) na comunidade opensource, fornecendo grandes melhorias.
116 Summary: Subversion libraries and modules
117 Summary(pl.UTF-8): Biblioteka subversion oraz ładowalne moduły
119 Requires: neon >= 0.26.0
120 Obsoletes: libsubversion0
123 Subversion libraries and modules.
125 %description libs -l pl.UTF-8
126 Biblioteka subversion oraz ładowalne moduły.
129 Summary: Header files and develpment documentation for subversion
130 Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do subversion
131 Summary(pt_BR.UTF-8): Arquivos de desenvolvimento para o Subversion
132 Group: Development/Libraries
133 Requires: %{name}-libs = %{version}-%{release}
134 Requires: apr-util-devel >= 1:1.0.0
135 Requires: neon-devel >= 0.26.0
136 Obsoletes: libsubversion0-devel
139 Header files and develpment documentation for subversion.
141 %description devel -l pl.UTF-8
142 Pliki nagłówkowe i dokumetacja do subversion.
144 %description devel -l pt_BR.UTF-8
145 Este pacote provê os arquivos necessários para desenvolvedores
146 interagirem com o Subversion.
149 Summary: Static subversion library
150 Summary(pl.UTF-8): Biblioteka statyczna subversion
151 Summary(pt_BR.UTF-8): Sistema de versionamento concorrente
152 Group: Development/Libraries
153 Requires: %{name}-devel = %{version}
154 Obsoletes: libsubversion0-static-devel
157 Static subversion library.
159 %description static -l pl.UTF-8
160 Biblioteka statyczna subversion.
162 %description static -l pt_BR.UTF-8
163 Este pacote provê um cliente estático do subversion.
166 Summary: Subversion svnserve
167 Summary(pl.UTF-8): Subversion svnserve
168 Group: Networking/Daemons
169 Requires(post,preun): /sbin/chkconfig
170 Requires: %{name} = %{version}-%{release}
173 %description svnserve
174 Subversion svnserve server.
176 %description svnserve -l pl.UTF-8
177 Serwer subversion svnserve.
180 Summary: Subversion tools and scripts
181 Summary(pl.UTF-8): Narzędzia oraz skrypty dla subversion
182 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
184 %pyrequires_eq python
185 Requires: %{name} = %{version}-%{release}
186 Requires: python-rcsparse >= 0.1-0.20031026.0
187 Requires: python-subversion = %{version}
190 Subversion tools and scripts.
192 %description tools -l pl.UTF-8
193 Narzędzia oraz skrypty dla subversion.
195 %package -n bash-completion-subversion
196 Summary: bash completion for subversion
197 Summary(pl.UTF-8): Dopełnienia basha dla subversion
198 Group: Applications/Shells
199 Requires: %{name} = %{version}-%{release}
200 Requires: bash-completion
201 Conflicts: %{name}-tools <= 1.1.0-0.rc6.1
203 %description -n bash-completion-subversion
204 Bash completion for subversion.
206 %description -n bash-completion-subversion -l pl.UTF-8
207 Dopełnienia basha dla subversion.
209 %package -n python-subversion
210 Summary: Subversion python bindings
211 Summary(pl.UTF-8): Dowiązania do subversion dla pythona
212 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
213 Group: Development/Languages/Python
214 %pyrequires_eq python
215 Requires: %{name}-libs = %{version}-%{release}
216 Obsoletes: subversion-python
218 %description -n python-subversion
219 Subversion python bindings.
221 %description -n python-subversion -l pl.UTF-8
222 Dowiązania do subversion dla pythona.
224 %description -n python-subversion -l pt_BR.UTF-8
225 Módulos python para acessar os recursos do Subversion.
227 %package -n perl-subversion
228 Summary: Subversion perl bindings
229 Summary(pl.UTF-8): Dowiązania do subversion dla perla
230 Summary(pt_BR.UTF-8): Módulos perl para acessar os recursos do Subversion
231 Group: Development/Languages/Perl
232 Requires: %{name}-libs = %{version}-%{release}
233 Obsoletes: subversion-perl
235 %description -n perl-subversion
236 Subversion perl bindings.
238 %description -n perl-subversion -l pl.UTF-8
239 Dowiązania do subversion dla perl.
241 %description -n perl-subversion -l pt_BR.UTF-8
242 Módulos perl para acessar os recursos do Subversion.
244 %package -n apache-mod_dav_svn
245 Summary: Apache module: Subversion Server
246 Summary(pl.UTF-8): Moduł apache: Serwer Subversion
247 Group: Networking/Daemons
248 Requires: %{name} = %{version}-%{release}
249 Requires: apache(modules-api) = %apache_modules_api
250 Requires: apache-mod_dav
252 %description -n apache-mod_dav_svn
253 Apache module: Subversion Server.
255 %description -n apache-mod_dav_svn -l pl.UTF-8
256 Moduł apache: Serwer Subversion.
258 %package -n apache-mod_authz_svn
259 Summary: Apache module: Subversion Server - path-based authorization
260 Summary(pl.UTF-8): Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion
261 Group: Networking/Daemons
262 Requires: apache(modules-api) = %apache_modules_api
263 Requires: apache-mod_dav_svn = %{version}-%{release}
265 %description -n apache-mod_authz_svn
266 Apache module: Subversion Server - path-based authorization.
268 %description -n apache-mod_authz_svn -l pl.UTF-8
269 Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion.
273 rm -rf apr apr-util neon
281 rm subversion/bindings/swig/proxy/*.swg
282 cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
283 cp -f /usr/share/automake/config.sub ac-helpers
284 chmod +x ./autogen.sh && ./autogen.sh
286 # don't enable dso - currently it's broken
290 --with-python=%{_bindir}/python \
291 --with-perl5=%{_bindir}/perl \
292 %if %{with net_client_only}
296 --without-berkeley-db \
299 --disable-mod-activation \
301 --with-apxs=%{_sbindir}/apxs \
305 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
307 %if !%{with python} && !%{with perl}
311 --with-neon=%{_prefix} \
312 --disable-neon-version-check \
313 --with-apr=%{_bindir}/apr-1-config \
314 --with-apr-util=%{_bindir}/apu-1-config
318 %if !%{with net_client_only}
322 swig_pydir=%{py_sitedir}/libsvn \
323 swig_pydir_extra=%{py_sitedir}/svn
327 %{__make} swig-pl-lib
329 cd subversion/bindings/swig/perl/native
330 %{__perl} Makefile.PL INSTALLDIRS=vendor
337 rm -rf $RPM_BUILD_ROOT
338 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
339 $RPM_BUILD_ROOT{%{apacheconfdir},%{apachelibdir},%{_infodir}} \
340 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
341 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
343 %{__make} install -j1 \
344 %if !%{with net_client_only} && %{with python}
347 APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
348 DESTDIR=$RPM_BUILD_ROOT \
349 swig_pydir=%{py_sitedir}/libsvn \
350 swig_pydir_extra=%{py_sitedir}/svn
352 %if !%{with net_client_only} && %{with perl}
353 %{__make} install-swig-pl-lib \
354 DESTDIR=$RPM_BUILD_ROOT
356 cd subversion/bindings/swig/perl/native
358 DESTDIR=$RPM_BUILD_ROOT \
359 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
360 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
365 install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/65_mod_dav_svn.conf
366 install %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/66_mod_authz_svn.conf
367 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
368 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
371 %if !%{with net_client_only}
372 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
374 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
375 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
376 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
377 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
381 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
382 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
386 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*swig*.la
389 rm -rf $RPM_BUILD_ROOT
391 %post devel -p /sbin/postshell
392 -/usr/sbin/fix-info-dir -c %{_infodir}
394 %postun devel -p /sbin/postshell
395 -/usr/sbin/fix-info-dir -c %{_infodir}
397 %post libs -p /sbin/ldconfig
398 %postun libs -p /sbin/ldconfig
399 %post -n python-subversion -p /sbin/ldconfig
400 %postun -n perl-subversion -p /sbin/ldconfig
403 /sbin/chkconfig --add svnserve
404 %service svnserve restart "svnserve daemon"
407 if [ "$1" = "0" ]; then
408 %service svnserve stop
409 /sbin/chkconfig --del svnserve
412 %post -n apache-mod_dav_svn
413 %service -q httpd restart
415 %preun -n apache-mod_dav_svn
416 if [ "$1" = "0" ]; then
417 %service -q httpd restart
421 %defattr(644,root,root,755)
422 %doc BUGS CHANGES COPYING INSTALL README
424 %doc tools/hook-scripts/*.{pl,py,example}
425 %doc tools/hook-scripts/mailer/*.{py,example}
427 %attr(755,root,root) %{_bindir}/svn*
428 %exclude %{_bindir}/svnserve
429 %if !%{with net_client_only}
430 %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 %{_includedir}/%{name}*
447 %attr(755,root,root) %{_libdir}/lib*.so
449 %if %{with perl} || %{with python}
450 %exclude %{_libdir}/lib*_swig_*.so
452 %{_examplesdir}/%{name}-%{version}
455 %defattr(644,root,root,755)
458 %if !%{with net_client_only}
460 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_bindir}/svnserve
462 %{_mandir}/man?/svnserve*
463 %dir /home/services/subversion
464 %dir /home/services/subversion/repos
466 %attr(754,root,root) /etc/rc.d/init.d/svnserve
467 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_bindir}/svn-hot-backup
474 %files -n bash-completion-subversion
475 %defattr(644,root,root,755)
476 /etc/bash_completion.d/%{name}
479 %files -n python-subversion
480 %defattr(644,root,root,755)
481 %doc tools/backup/*.py tools/examples/*.py
482 %dir %{py_sitedir}/svn
483 %dir %{py_sitedir}/libsvn
484 %{py_sitedir}/svn/*.py[co]
485 %{py_sitedir}/libsvn/*.py[co]
486 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
487 %{_examplesdir}/python-%{name}-%{version}
488 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
492 %files -n perl-subversion
493 %defattr(644,root,root,755)
494 %{perl_vendorarch}/SVN
495 %dir %{perl_vendorarch}/auto/SVN
496 %dir %{perl_vendorarch}/auto/SVN/*
497 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
498 %{perl_vendorarch}/auto/SVN/*/*.bs
499 %{_mandir}/man3/*.3pm*
500 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so*
504 %files -n apache-mod_dav_svn
505 %defattr(644,root,root,755)
506 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_dav_svn.conf
507 %attr(755,root,root) %{apachelibdir}/mod_dav_svn.so
509 %files -n apache-mod_authz_svn
510 %defattr(644,root,root,755)
511 %doc subversion/mod_authz_svn/INSTALL
512 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_authz_svn.conf
513 %attr(755,root,root) %{apachelibdir}/mod_authz_svn.so
516 %endif # net_client_only