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)
10 %bcond_without javahl # build without javahl support (Java high-level bindings)
11 %bcond_without tests # don't perform "make check"
13 %{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
14 %define apxs /usr/sbin/apxs
19 Summary: A Concurrent Versioning system similar to but better than CVS
20 Summary(pl.UTF-8): System kontroli wersji podobny, ale lepszy, niż CVS
21 Summary(pt_BR.UTF-8): Sistema de versionamento concorrente
25 License: Apache/BSD-like
26 Group: Development/Version Control
27 # Source0: http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
28 Source0: http://orac.ece.utexas.edu/pub/svn/%{version}-%{snap}/leander-hackberry/%{name}-%{version}-%{snap}.tar.gz
29 # Source0-md5: 905fc5030be179d4d387803b8397668a
30 Source1: %{name}-dav_svn.conf
31 Source2: %{name}-authz_svn.conf
32 Source3: %{name}-svnserve.init
33 Source4: %{name}-svnserve.sysconfig
34 Source5: %{name}-convert-typemaps-to-ifdef.py
35 Patch0: %{name}-home_etc.patch
36 Patch1: %{name}-DESTDIR.patch
37 URL: http://subversion.tigris.org/
38 %if %{with net_client_only}
39 %global apache_modules_api 0
41 %{?with_apache:BuildRequires: apache-devel >= 2.2.0-8}
42 BuildRequires: automake
43 BuildRequires: db-devel >= 4.1.25
44 BuildRequires: rpmbuild(macros) >= 1.268
46 BuildRequires: perl-devel >= 1:5.8.0
47 BuildRequires: rpm-perlprov >= 4.1-13
48 BuildRequires: swig-perl >= 1.3.24
50 %{?with_javahl:BuildRequires: jdk}
52 BuildRequires: apr-devel >= 1:1.0.0
53 BuildRequires: apr-util-devel >= 1:1.2.8-3
54 BuildRequires: autoconf >= 2.59
56 BuildRequires: cyrus-sasl-devel
57 BuildRequires: expat-devel
58 BuildRequires: gettext-devel
59 BuildRequires: libtool >= 1.4-9
60 BuildRequires: neon-devel >= 0.26.0
61 BuildRequires: python >= 2.2
62 BuildRequires: python-modules >= 2.2
64 BuildRequires: python-devel >= 2.2
65 BuildRequires: sed >= 4.0
66 BuildRequires: swig-python >= 1.3.24
68 BuildRequires: texinfo
70 Requires: %{name}-libs = %{version}-%{release}
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 %define _libexecdir %{_libdir}/svn
74 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
75 %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
78 The goal of the Subversion project is to build a version control
79 system that is a compelling replacement for CVS in the open source
83 - All current CVS features.
84 - Directories, renames, and file meta-data are versioned.
85 - Symbolic links, etc, are supported
86 - Commits are truly atomic.
87 - Branching and tagging are cheap (constant time) operations
88 - Repeated merges are handled gracefully
89 - Support for plug-in client side diff programs
90 - Natively client/server
91 - Client/server protocol sends diffs in both directions
92 - Costs are proportional to change size, not project size
93 - Internationalization
94 - Progressive multi-lingual support
96 %description -l pl.UTF-8
97 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
101 - Wszystkie aktualne możliwości CVS.
102 - Katalogi, zmiany nazw oraz metadane plików są wersjonowane.
103 - Obsługa dowiązań symbolicznych itp.
104 - Commity są w pełni atomowe.
105 - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami.
106 - Dobra obsługa powtarzanego łączenia (merge).
107 - Obsługa wtyczek diff po stronie klienta.
108 - Natywny klient/serwer.
109 - Klient/Serwer przesyłają diffy w obu kierunkach.
110 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
111 - Internacjonalizacja.
112 - Postępujące wsparcie dla wielu języków.
114 %description -l pt_BR.UTF-8
115 O objetivo do projeto Subversion é construir um sistema de controle de
116 versões que seja um substituto para o CVS (Concurrent Versioning
117 System) na comunidade opensource, fornecendo grandes melhorias.
120 Summary: Subversion libraries and modules
121 Summary(pl.UTF-8): Biblioteka subversion oraz ładowalne moduły
123 Requires: neon >= 0.26.0
124 Obsoletes: libsubversion0
127 Subversion libraries and modules.
129 %description libs -l pl.UTF-8
130 Biblioteka subversion oraz ładowalne moduły.
133 Summary: Header files and develpment documentation for subversion
134 Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do subversion
135 Summary(pt_BR.UTF-8): Arquivos de desenvolvimento para o Subversion
136 Group: Development/Libraries
137 Requires: %{name}-libs = %{version}-%{release}
138 Requires: apr-util-devel >= 1:1.0.0
139 Requires: neon-devel >= 0.26.0
140 Obsoletes: libsubversion0-devel
143 Header files and develpment documentation for subversion.
145 %description devel -l pl.UTF-8
146 Pliki nagłówkowe i dokumetacja do subversion.
148 %description devel -l pt_BR.UTF-8
149 Este pacote provê os arquivos necessários para desenvolvedores
150 interagirem com o Subversion.
153 Summary: Static subversion library
154 Summary(pl.UTF-8): Biblioteka statyczna subversion
155 Summary(pt_BR.UTF-8): Sistema de versionamento concorrente
156 Group: Development/Libraries
157 Requires: %{name}-devel = %{version}
158 Obsoletes: libsubversion0-static-devel
161 Static subversion library.
163 %description static -l pl.UTF-8
164 Biblioteka statyczna subversion.
166 %description static -l pt_BR.UTF-8
167 Este pacote provê um cliente estático do subversion.
170 Summary: Subversion svnserve
171 Summary(pl.UTF-8): Subversion svnserve
172 Group: Networking/Daemons
173 Requires(post,preun): /sbin/chkconfig
174 Requires(postun): /usr/sbin/groupdel
175 Requires(postun): /usr/sbin/userdel
176 Requires(pre): /bin/id
177 Requires(pre): /usr/bin/getgid
178 Requires(pre): /usr/lib/rpm/user_group.sh
179 Requires(pre): /usr/sbin/groupadd
180 Requires(pre): /usr/sbin/useradd
181 Requires(pre): /usr/sbin/usermod
182 Requires: %{name} = %{version}-%{release}
187 %description svnserve
188 Subversion svnserve server.
190 %description svnserve -l pl.UTF-8
191 Serwer subversion svnserve.
194 Summary: Subversion tools and scripts
195 Summary(pl.UTF-8): Narzędzia oraz skrypty dla subversion
196 Summary(pt_BR.UTF-8): Módulos python para acessar os recursos do Subversion
198 %pyrequires_eq python
199 Requires: %{name} = %{version}-%{release}
200 Requires: python-rcsparse >= 0.1-0.20031026.0
201 Requires: python-subversion = %{version}
204 Subversion tools and scripts.
206 %description tools -l pl.UTF-8
207 Narzędzia oraz skrypty dla subversion.
209 %package -n bash-completion-subversion
210 Summary: bash completion for subversion
211 Summary(pl.UTF-8): Dopełnienia basha dla subversion
212 Group: Applications/Shells
213 Requires: %{name} = %{version}-%{release}
214 Requires: bash-completion
215 Conflicts: %{name}-tools <= 1.1.0-0.rc6.1
217 %description -n bash-completion-subversion
218 Bash completion for subversion.
220 %description -n bash-completion-subversion -l pl.UTF-8
221 Dopełnienia basha dla subversion.
223 %package -n java-subversion
224 Summary: Subversion Java bindings
225 Summary(pl.UTF-8): Dowiązania do Subversion dla Javy
226 Group: Development/Languages/Java
227 Requires: %{name}-libs = %{version}-%{release}
229 %description -n java-subversion
230 This is a set of Java classes which provide the functionality of
231 subversion-libs, the Subversion libraries. It is useful if you want
232 to, for example, write a Java class that manipulates a Subversion
233 repository or working copy. See the 'subversion' package for more
236 %description -n java-subversion -l pl.UTF-8
237 Ten pakiet zawiera zestaw klas Javy udostępniających funkcjonalność
238 subversion-libs, czyli bibliotek Subversion. Jest przydatny przy
239 pisaniu klas Javy np. modyfikujących repozytorium Subversion lub
240 kopię roboczą. Więcej informacji w pakiecie subversion.
242 %package -n python-subversion
243 Summary: Subversion Python bindings
244 Summary(pl.UTF-8): Dowiązania do Subversion dla Pythona
245 Summary(pt_BR.UTF-8): Módulos Python para acessar os recursos do Subversion
246 Group: Development/Languages/Python
247 %pyrequires_eq python
248 Requires: %{name}-libs = %{version}-%{release}
249 Obsoletes: subversion-python
251 %description -n python-subversion
252 Subversion Python bindings.
254 %description -n python-subversion -l pl.UTF-8
255 Dowiązania do Subversion dla Pythona.
257 %description -n python-subversion -l pt_BR.UTF-8
258 Módulos Python para acessar os recursos do Subversion.
260 %package -n perl-subversion
261 Summary: Subversion Perl bindings
262 Summary(pl.UTF-8): Dowiązania do Subversion dla Perla
263 Summary(pt_BR.UTF-8): Módulos Perl para acessar os recursos do Subversion
264 Group: Development/Languages/Perl
265 Requires: %{name}-libs = %{version}-%{release}
266 Obsoletes: subversion-perl
268 %description -n perl-subversion
269 Subversion Perl bindings.
271 %description -n perl-subversion -l pl.UTF-8
272 Dowiązania do Subversion dla Perla.
274 %description -n perl-subversion -l pt_BR.UTF-8
275 Módulos Perl para acessar os recursos do Subversion.
277 %package -n apache-mod_dav_svn
278 Summary: Apache module: Subversion Server
279 Summary(pl.UTF-8): Moduł apache: Serwer Subversion
280 Group: Networking/Daemons
281 Requires: %{name} = %{version}-%{release}
282 Requires: apache(modules-api) = %apache_modules_api
283 Requires: apache-mod_dav
285 %description -n apache-mod_dav_svn
286 Apache module: Subversion Server.
288 %description -n apache-mod_dav_svn -l pl.UTF-8
289 Moduł apache: Serwer Subversion.
291 %package -n apache-mod_authz_svn
292 Summary: Apache module: Subversion Server - path-based authorization
293 Summary(pl.UTF-8): Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion
294 Group: Networking/Daemons
295 Requires: apache(modules-api) = %apache_modules_api
296 Requires: apache-mod_dav_svn = %{version}-%{release}
298 %description -n apache-mod_authz_svn
299 Apache module: Subversion Server - path-based authorization.
301 %description -n apache-mod_authz_svn -l pl.UTF-8
302 Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion.
305 %setup -q -n %{name}-%{version}-%{snap}
306 rm -rf apr apr-util neon
311 rm subversion/bindings/swig/proxy/*.swg
312 cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
313 cp -f /usr/share/automake/config.sub ac-helpers
314 chmod +x ./autogen.sh && ./autogen.sh
316 # don't enable dso - currently it's broken
319 --with-zlib=%{_libdir} \
320 --with-python=%{__python} \
321 --with-perl5=%{__perl} \
322 %if %{with net_client_only}
326 --without-berkeley-db \
329 --disable-mod-activation \
331 --with-apxs=%{_sbindir}/apxs \
335 --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
337 %if !%{with python} && !%{with perl}
340 --%{?with_javahl:en}%{!?with_javahl:dis}able-javahl \
342 --with-jdk="%{java_home}" \
343 --with-neon=%{_prefix} \
344 --disable-neon-version-check \
345 --with-apr=%{_bindir}/apr-1-config \
346 --with-apr-util=%{_bindir}/apu-1-config
350 %if !%{with net_client_only}
354 swig_pydir=%{py_sitedir}/libsvn \
355 swig_pydir_extra=%{py_sitedir}/svn
359 %{__make} swig-pl-lib
361 cd subversion/bindings/swig/perl/native
362 %{__perl} Makefile.PL INSTALLDIRS=vendor
368 javahl_javadir="%{_javadir}"
377 rm -rf $RPM_BUILD_ROOT
378 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
379 $RPM_BUILD_ROOT{%{apacheconfdir},%{apachelibdir},%{_infodir}} \
380 $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
381 $RPM_BUILD_ROOT/home/services/subversion{,/repos}
383 %{__make} install -j1 \
386 javahl_javadir="%{_javadir}" \
388 %if !%{with net_client_only} && %{with python}
391 APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
392 DESTDIR=$RPM_BUILD_ROOT \
393 swig_pydir=%{py_sitedir}/libsvn \
394 swig_pydir_extra=%{py_sitedir}/svn
396 %if !%{with net_client_only} && %{with perl}
397 %{__make} install-swig-pl-lib \
398 DESTDIR=$RPM_BUILD_ROOT
400 cd subversion/bindings/swig/perl/native
402 DESTDIR=$RPM_BUILD_ROOT \
403 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
404 LIBDIR=$RPM_BUILD_ROOT%{_libdir}
409 install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/65_mod_dav_svn.conf
410 install %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/66_mod_authz_svn.conf
411 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
412 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
415 %if !%{with net_client_only}
416 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
418 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
419 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
420 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
421 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
425 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
426 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
430 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*swig*.la
433 rm -rf $RPM_BUILD_ROOT
437 %useradd -u 180 -d /home/services/subversion -c "Subversion svnserve" -g svn svn
439 %post devel -p /sbin/postshell
440 -/usr/sbin/fix-info-dir -c %{_infodir}
442 %postun devel -p /sbin/postshell
443 -/usr/sbin/fix-info-dir -c %{_infodir}
445 %post libs -p /sbin/ldconfig
446 %postun libs -p /sbin/ldconfig
447 %post -n python-subversion -p /sbin/ldconfig
448 %postun -n perl-subversion -p /sbin/ldconfig
451 /sbin/chkconfig --add svnserve
452 %service svnserve restart "svnserve daemon"
455 if [ "$1" = "0" ]; then
456 %service svnserve stop
457 /sbin/chkconfig --del svnserve
461 if [ "$1" = "0" ]; then
466 %post -n apache-mod_dav_svn
467 %service -q httpd restart
469 %preun -n apache-mod_dav_svn
470 if [ "$1" = "0" ]; then
471 %service -q httpd restart
475 %defattr(644,root,root,755)
476 %doc BUGS CHANGES COPYING INSTALL README
478 %doc tools/hook-scripts/*.{pl,py,example}
479 %doc tools/hook-scripts/mailer/*.{py,example}
481 %attr(755,root,root) %{_bindir}/svn*
482 %exclude %{_bindir}/svnserve
483 %if !%{with net_client_only}
484 %exclude %{_bindir}/svn-hot-backup
489 %exclude %{_mandir}/man?/svnserve*
491 %files libs -f %{name}.lang
492 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_libdir}/lib*.so.*
494 %if %{with perl} || %{with python}
495 %exclude %{_libdir}/lib*_swig_*.so.*
498 %exclude %{_libdir}/libsvnjavahl*.so.*.*.*
499 %exclude %{_libdir}/libsvnjavahl*.so.?
500 %exclude %{_libdir}/libsvnjavahl*.so
504 %defattr(644,root,root,755)
505 %{_includedir}/%{name}*
506 %attr(755,root,root) %{_libdir}/lib*.so
508 %if %{with perl} || %{with python}
509 %exclude %{_libdir}/lib*_swig_*.so
512 %exclude %{_libdir}/libsvnjavahl*.so
514 %{_examplesdir}/%{name}-%{version}
517 %defattr(644,root,root,755)
520 %if !%{with net_client_only}
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_bindir}/svnserve
524 %{_mandir}/man?/svnserve*
525 %dir %attr(750,svn,svn) /home/services/subversion
526 %dir %attr(750,svn,svn) /home/services/subversion/repos
528 %attr(754,root,root) /etc/rc.d/init.d/svnserve
529 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_bindir}/svn-hot-backup
536 %files -n bash-completion-subversion
537 %defattr(644,root,root,755)
538 /etc/bash_completion.d/%{name}
541 %files -n java-subversion
542 %defattr(644,root,root,755)
543 %attr(755,root,root) %{_libdir}/libsvnjavahl*.so.*.*.*
544 %attr(755,root,root) %{_libdir}/libsvnjavahl*.so.?
545 %attr(755,root,root) %{_libdir}/libsvnjavahl*.so
546 %{_javadir}/svn-javahl.jar
550 %files -n python-subversion
551 %defattr(644,root,root,755)
552 %doc tools/backup/*.py tools/examples/*.py
553 %dir %{py_sitedir}/svn
554 %dir %{py_sitedir}/libsvn
555 %{py_sitedir}/svn/*.py[co]
556 %{py_sitedir}/libsvn/*.py[co]
557 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
558 %{_examplesdir}/python-%{name}-%{version}
559 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
563 %files -n perl-subversion
564 %defattr(644,root,root,755)
565 %{perl_vendorarch}/SVN
566 %dir %{perl_vendorarch}/auto/SVN
567 %dir %{perl_vendorarch}/auto/SVN/*
568 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
569 %{perl_vendorarch}/auto/SVN/*/*.bs
570 %{_mandir}/man3/*.3pm*
571 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so*
575 %files -n apache-mod_dav_svn
576 %defattr(644,root,root,755)
577 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_dav_svn.conf
578 %attr(755,root,root) %{apachelibdir}/mod_dav_svn.so
580 %files -n apache-mod_authz_svn
581 %defattr(644,root,root,755)
582 %doc subversion/mod_authz_svn/INSTALL
583 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_authz_svn.conf
584 %attr(755,root,root) %{apachelibdir}/mod_authz_svn.so
587 %endif # net_client_only