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): System kontroli wersji podobny, ale lepszy, ni¿ CVS
17 Summary(pt_BR): 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: f790c49c219b4196e37ebfa71ab797d5
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}-home_etc.patch
30 Patch1: %{name}-DESTDIR.patch
31 Patch2: %{name}-neon.patch
32 URL: http://subversion.tigris.org/
33 %if %{with net_client_only}
34 %global apache_modules_api 0
36 %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8}
37 BuildRequires: automake
38 BuildRequires: db-devel >= 4.1.25
39 BuildRequires: rpmbuild(macros) >= 1.268
41 BuildRequires: perl-devel >= 1:5.8.0
42 BuildRequires: rpm-perlprov >= 4.1-13
43 BuildRequires: swig-perl >= 1.3.24
46 BuildRequires: apr-devel >= 1:1.0.0
47 BuildRequires: apr-util-devel >= 1:1.0.0
48 BuildRequires: autoconf >= 2.59
50 BuildRequires: expat-devel
51 BuildRequires: gettext-devel
52 BuildRequires: libtool >= 1.4-9
53 BuildRequires: neon-devel >= 0.26.0
55 BuildRequires: python >= 2.2
56 BuildRequires: python-devel >= 2.2
57 BuildRequires: python-modules >= 2.2
58 BuildRequires: sed >= 4.0
59 BuildRequires: swig-python >= 1.3.24
61 BuildRequires: texinfo
63 Requires: %{name}-libs = %{version}-%{release}
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 %define _apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
67 %define _libexecdir %{_libdir}/svn
70 The goal of the Subversion project is to build a version control
71 system that is a compelling replacement for CVS in the open source
75 - All current CVS features.
76 - Directories, renames, and file meta-data are versioned.
77 - Symbolic links, etc, are supported
78 - Commits are truly atomic.
79 - Branching and tagging are cheap (constant time) operations
80 - Repeated merges are handled gracefully
81 - Support for plug-in client side diff programs
82 - Natively client/server
83 - Client/server protocol sends diffs in both directions
84 - Costs are proportional to change size, not project size
85 - Internationalization
86 - Progressive multi-lingual support
89 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
93 - Wszystkie aktualne mo¿liwo¶ci CVS.
94 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
95 - Wsparcie dla linków symbolicznych itp.
96 - Commity s± w pe³ni atomowe.
97 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
99 - Wsparcie dla pluginów diff'a po stronie klienta.
100 - Natywny klient/serwer.
101 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
102 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
103 - Internacjonalizacja.
104 - Postêpuj±ce wsparcie dla wielu jêzyków.
106 %description -l pt_BR
107 O objetivo do projeto Subversion é construir um sistema de controle de
108 versões que seja um substituto para o CVS (Concurrent Versioning
109 System) na comunidade opensource, fornecendo grandes melhorias.
112 Summary: Subversion libraries and modules
113 Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
115 Requires: neon >= 0.24.7
116 Obsoletes: libsubversion0
119 Subversion libraries and modules.
121 %description libs -l pl
122 Biblioteka subversion oraz ³adowalne modu³y.
125 Summary: Header files and develpment documentation for subversion
126 Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
127 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
128 Group: Development/Libraries
129 Requires: %{name}-libs = %{version}-%{release}
130 Requires: apr-util-devel >= 1:1.0.0
131 Requires: neon-devel >= 0.24.7
132 Obsoletes: libsubversion0-devel
135 Header files and develpment documentation for subversion.
137 %description devel -l pl
138 Pliki nag³ówkowe i dokumetacja do subversion.
140 %description devel -l pt_BR
141 Este pacote provê os arquivos necessários para desenvolvedores
142 interagirem com o Subversion.
145 Summary: Static subversion library
146 Summary(pl): Biblioteka statyczna subversion
147 Summary(pt_BR): Sistema de versionamento concorrente
148 Group: Development/Libraries
149 Requires: %{name}-devel = %{version}
150 Obsoletes: libsubversion0-static-devel
153 Static subversion library.
155 %description static -l pl
156 Biblioteka statyczna subversion.
158 %description static -l pt_BR
159 Este pacote provê um cliente estático do subversion.
162 Summary: Subversion svnserve
163 Summary(pl): Subversion svnserve
164 Group: Networking/Daemons
165 Requires(post,preun): /sbin/chkconfig
166 Requires: %{name} = %{version}-%{release}
169 %description svnserve
170 Subversion svnserve server.
172 %description svnserve -l pl
173 Serwer subversion svnserve.
176 Summary: Subversion tools and scripts
177 Summary(pl): Narzêdzia oraz skrypty dla subversion
178 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
180 %pyrequires_eq python
181 Requires: %{name} = %{version}-%{release}
182 Requires: python-rcsparse >= 0.1-0.20031026.0
183 Requires: python-subversion = %{version}
186 Subversion tools and scripts.
188 %description tools -l pl
189 Narzêdzia oraz skrypty dla subversion.
191 %package -n bash-completion-subversion
192 Summary: bash completion for subversion
193 Summary(pl): Dope³nienia basha dla subversion
194 Group: Applications/Shells
195 Requires: %{name} = %{version}-%{release}
196 Requires: bash-completion
197 Conflicts: %{name}-tools <= 1.1.0-0.rc6.1
199 %description -n bash-completion-subversion
200 Bash completion for subversion.
202 %description -n bash-completion-subversion -l pl
203 Dope³nienia basha dla subversion.
205 %package -n python-subversion
206 Summary: Subversion python bindings
207 Summary(pl): Dowi±zania do subversion dla pythona
208 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
209 Group: Development/Languages/Python
210 %pyrequires_eq python
211 Requires: %{name}-libs = %{version}-%{release}
212 Obsoletes: subversion-python
214 %description -n python-subversion
215 Subversion python bindings.
217 %description -n python-subversion -l pl
218 Dowi±zania do subversion dla pythona.
220 %description -n python-subversion -l pt_BR
221 Módulos python para acessar os recursos do Subversion.
223 %package -n perl-subversion
224 Summary: Subversion perl bindings
225 Summary(pl): Dowi±zania do subversion dla perla
226 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
227 Group: Development/Languages/Perl
228 Requires: %{name}-libs = %{version}-%{release}
229 Obsoletes: subversion-perl
231 %description -n perl-subversion
232 Subversion perl bindings.
234 %description -n perl-subversion -l pl
235 Dowi±zania do subversion dla perl.
237 %description -n perl-subversion -l pt_BR
238 Módulos perl para acessar os recursos do Subversion.
240 %package -n apache-mod_dav_svn
241 Summary: Apache module: Subversion Server
242 Summary(pl): Modu³ apache: Serwer Subversion
243 Group: Networking/Daemons
244 Requires: %{name} = %{version}-%{release}
245 Requires: apache(modules-api) = %apache_modules_api
246 Requires: apache-mod_dav
248 %description -n apache-mod_dav_svn
249 Apache module: Subversion Server.
251 %description -n apache-mod_dav_svn -l pl
252 Modu³ apache: Serwer Subversion.
254 %package -n apache-mod_authz_svn
255 Summary: Apache module: Subversion Server - path-based authorization
256 Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
257 Group: Networking/Daemons
258 Requires: apache(modules-api) = %apache_modules_api
259 Requires: apache-mod_dav_svn = %{version}-%{release}
261 %description -n apache-mod_authz_svn
262 Apache module: Subversion Server - path-based authorization.
264 %description -n apache-mod_authz_svn -l pl
265 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
269 rm -rf apr apr-util neon
275 cp -f /usr/share/automake/config.sub ac-helpers
276 chmod +x ./autogen.sh && ./autogen.sh
278 # don't enable dso - currently it's broken
282 --with-python=%{_bindir}/python \
283 --with-perl5=%{_bindir}/perl \
284 %if %{with net_client_only}
288 --without-berkeley-db \
291 --disable-mod-activation \
293 --with-apxs=%{_sbindir}/apxs \
297 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
299 %if %{without python} && %{without perl}
303 --with-neon=%{_prefix} \
304 --disable-neon-version-check \
305 --with-apr=%{_bindir}/apr-1-config \
306 --with-apr-util=%{_bindir}/apu-1-config
310 %if %{without net_client_only}
314 swig_pydir=%{py_sitedir}/libsvn \
315 swig_pydir_extra=%{py_sitedir}/svn
319 %{__make} swig-pl-lib
321 cd subversion/bindings/swig/perl/native
322 %{__perl} Makefile.PL INSTALLDIRS=vendor
328 %{__sed} -i -e 's/@SVN_DB_INCLUDES@//g' -e 's/@SVN_DB_LIBS@//g' svn-config
331 rm -rf $RPM_BUILD_ROOT
332 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
333 $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
334 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
335 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
337 %{__make} install -j1 \
338 %if %{without net_client_only} && %{with python}
341 APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
342 DESTDIR=$RPM_BUILD_ROOT \
343 swig_pydir=%{py_sitedir}/libsvn \
344 swig_pydir_extra=%{py_sitedir}/svn
346 %if %{without net_client_only} && %{with perl}
347 %{__make} install-swig-pl-lib \
348 DESTDIR=$RPM_BUILD_ROOT
350 cd subversion/bindings/swig/perl/native
352 DESTDIR=$RPM_BUILD_ROOT \
353 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
354 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
358 install svn-config $RPM_BUILD_ROOT%{_bindir}
361 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
362 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
363 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
364 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
367 %if %{without net_client_only}
368 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
370 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
371 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
372 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
373 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
377 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
378 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
383 rm -rf $RPM_BUILD_ROOT
386 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
389 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
391 %post libs -p /sbin/ldconfig
392 %postun libs -p /sbin/ldconfig
393 %post -n python-subversion -p /sbin/ldconfig
394 %postun -n perl-subversion -p /sbin/ldconfig
397 /sbin/chkconfig --add svnserve
398 %service svnserve restart "svnserve daemon"
401 if [ "$1" = "0" ]; then
402 %service svnserve stop
403 /sbin/chkconfig --del svnserve
406 %post -n apache-mod_dav_svn
407 %service -q httpd restart
409 %preun -n apache-mod_dav_svn
410 if [ "$1" = "0" ]; then
411 %service -q httpd restart
415 %defattr(644,root,root,755)
416 %doc BUGS CHANGES COPYING INSTALL README
418 %doc tools/hook-scripts/*.{pl,py,example}
419 %doc tools/hook-scripts/mailer/*.{py,example}
421 %attr(755,root,root) %{_bindir}/svn*
422 %exclude %{_bindir}/svnserve
423 %exclude %{_bindir}/svn-config
424 %if %{without net_client_only}
425 %exclude %{_bindir}/svn-hot-backup
430 %exclude %{_mandir}/man?/svnserve*
432 %files libs -f %{name}.lang
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/lib*.so.*
435 %if %{with perl} || %{with python}
436 %exclude %{_libdir}/lib*_swig_*.so.*
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_bindir}/svn-config
442 %{_includedir}/%{name}*
443 %attr(755,root,root) %{_libdir}/lib*.so
445 %if %{with perl} || %{with python}
446 %exclude %{_libdir}/lib*_swig_*.so
447 %exclude %{_libdir}/lib*swig*.la
449 %{_examplesdir}/%{name}-%{version}
452 %defattr(644,root,root,755)
455 %if %{without 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*
486 %{_libdir}/lib*_swig_py*.la
490 %files -n perl-subversion
491 %defattr(644,root,root,755)
492 %{perl_vendorarch}/SVN
493 %dir %{perl_vendorarch}/auto/SVN
494 %dir %{perl_vendorarch}/auto/SVN/*
495 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
496 %{perl_vendorarch}/auto/SVN/*/*.bs
497 %{_mandir}/man3/*.3pm*
498 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so*
499 %{_libdir}/lib*_swig_perl*.la
503 %files -n apache-mod_dav_svn
504 %defattr(644,root,root,755)
505 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
506 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
508 %files -n apache-mod_authz_svn
509 %defattr(644,root,root,755)
510 %doc subversion/mod_authz_svn/INSTALL
511 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
512 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
515 %endif # net_client_only