]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
b717f611d847b9195e9fcb81d33573d302c77932
[packages/subversion.git] / subversion.spec
1 # TODO:
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)
4 #
5 # Conditional build:
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)
10 #
11 %{!?with_net_client_only:%include       /usr/lib/rpm/macros.perl}
12 %define apxs    /usr/sbin/apxs
13 %define pdir    SVN
14 %define pnam    _Core
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
18 Name:           subversion
19 Version:        1.4.3
20 Release:        4
21 License:        Apache/BSD Style
22 Group:          Development/Version Control
23 Source0:        http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
24 # Source0-md5:  6b991b63e3e1f69670c9e15708e40176
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
35 %else
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
40 %if %{with perl}
41 BuildRequires:  perl-devel >= 1:5.8.0
42 BuildRequires:  rpm-perlprov >= 4.1-13
43 BuildRequires:  swig-perl >= 1.3.24
44 %endif
45 %endif
46 BuildRequires:  apr-devel >= 1:1.0.0
47 BuildRequires:  apr-util-devel >= 1:1.2.8-3
48 BuildRequires:  autoconf >= 2.59
49 BuildRequires:  bison
50 BuildRequires:  expat-devel
51 BuildRequires:  gettext-devel
52 BuildRequires:  libtool >= 1.4-9
53 BuildRequires:  neon-devel >= 0.26.0
54 %if %{with python}
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
60 %endif
61 BuildRequires:  texinfo
62 BuildRequires:  which
63 # update -neon patch before messing with this BC
64 BuildConflicts: neon-devel > 0.26.3
65 Requires:       %{name}-libs = %{version}-%{release}
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _apachelibdir   %(%{apxs} -q LIBEXECDIR 2>/dev/null)
69 %define         _libexecdir             %{_libdir}/svn
70
71 %description
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
74 community.
75
76 Our goals are:
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
89
90 %description -l pl.UTF-8
91 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
92 zamiennika dla CVS.
93
94 Cele projektu to:
95 - Wszystkie aktualne możliwości CVS.
96 - Katalogi, zmiany nazw oraz meta-dane plików są wersjonowane.
97 - Wsparcie dla linków symbolicznych itp.
98 - Commity są w pełni atomowe.
99 - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami.
100 - Powtarzające merge.
101 - Wsparcie dla pluginów diff'a 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.
107
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.
112
113 %package libs
114 Summary:        Subversion libraries and modules
115 Summary(pl.UTF-8):      Biblioteka subversion oraz ładowalne moduły
116 Group:          Libraries
117 Requires:       neon >= 0.24.7
118 Obsoletes:      libsubversion0
119
120 %description libs
121 Subversion libraries and modules.
122
123 %description libs -l pl.UTF-8
124 Biblioteka subversion oraz ładowalne moduły.
125
126 %package devel
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.24.7
134 Obsoletes:      libsubversion0-devel
135
136 %description devel
137 Header files and develpment documentation for subversion.
138
139 %description devel -l pl.UTF-8
140 Pliki nagłówkowe i dokumetacja do subversion.
141
142 %description devel -l pt_BR.UTF-8
143 Este pacote provê os arquivos necessários para desenvolvedores
144 interagirem com o Subversion.
145
146 %package static
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
153
154 %description static
155 Static subversion library.
156
157 %description static -l pl.UTF-8
158 Biblioteka statyczna subversion.
159
160 %description static -l pt_BR.UTF-8
161 Este pacote provê um cliente estático do subversion.
162
163 %package svnserve
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}
169 Requires:       rc-scripts
170
171 %description svnserve
172 Subversion svnserve server.
173
174 %description svnserve -l pl.UTF-8
175 Serwer subversion svnserve.
176
177 %package tools
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
181 Group:          Applications
182 %pyrequires_eq  python
183 Requires:       %{name} = %{version}-%{release}
184 Requires:       python-rcsparse >= 0.1-0.20031026.0
185 Requires:       python-subversion = %{version}
186
187 %description tools
188 Subversion tools and scripts.
189
190 %description tools -l pl.UTF-8
191 Narzędzia oraz skrypty dla subversion.
192
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
200
201 %description -n bash-completion-subversion
202 Bash completion for subversion.
203
204 %description -n bash-completion-subversion -l pl.UTF-8
205 Dopełnienia basha dla subversion.
206
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
215
216 %description -n python-subversion
217 Subversion python bindings.
218
219 %description -n python-subversion -l pl.UTF-8
220 Dowiązania do subversion dla pythona.
221
222 %description -n python-subversion -l pt_BR.UTF-8
223 Módulos python para acessar os recursos do Subversion.
224
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
232
233 %description -n perl-subversion
234 Subversion perl bindings.
235
236 %description -n perl-subversion -l pl.UTF-8
237 Dowiązania do subversion dla perl.
238
239 %description -n perl-subversion -l pt_BR.UTF-8
240 Módulos perl para acessar os recursos do Subversion.
241
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
249
250 %description -n apache-mod_dav_svn
251 Apache module: Subversion Server.
252
253 %description -n apache-mod_dav_svn -l pl.UTF-8
254 Moduł apache: Serwer Subversion.
255
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}
262
263 %description -n apache-mod_authz_svn
264 Apache module: Subversion Server - path-based authorization.
265
266 %description -n apache-mod_authz_svn -l pl.UTF-8
267 Moduł apache: autoryzacja na podstawie ścieżki dla serwera Subversion.
268
269 %prep
270 %setup -q
271 rm -rf apr apr-util neon
272 %patch0 -p0
273 %patch1 -p1
274 %patch2 -p1
275
276 %build
277 cp -f /usr/share/automake/config.sub ac-helpers
278 chmod +x ./autogen.sh && ./autogen.sh
279
280 # don't enable dso - currently it's broken
281 %configure \
282         --with-editor=vi \
283         --with-zlib \
284         --with-python=%{_bindir}/python \
285         --with-perl5=%{_bindir}/perl \
286 %if %{with net_client_only}
287         --without-apache \
288         --without-swig \
289         --without-apxs \
290         --without-berkeley-db \
291 %else
292         --disable-dso \
293         --disable-mod-activation \
294 %if %{with apache}
295         --with-apxs=%{_sbindir}/apxs \
296 %else
297         --without-apache \
298         --without-apxs \
299         --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
300 %endif
301 %if !%{with python} && !%{with perl}
302         --without-swig \
303 %endif
304 %endif
305         --with-neon=%{_prefix} \
306         --disable-neon-version-check \
307         --with-apr=%{_bindir}/apr-1-config \
308         --with-apr-util=%{_bindir}/apu-1-config
309
310 %{__make} -j1
311
312 %if !%{with net_client_only}
313 # python
314 %if %{with python}
315 %{__make} swig-py \
316         swig_pydir=%{py_sitedir}/libsvn \
317         swig_pydir_extra=%{py_sitedir}/svn
318 %endif
319 # perl
320 %if %{with perl}
321 %{__make} swig-pl-lib
322 odir=$(pwd)
323 cd subversion/bindings/swig/perl/native
324 %{__perl} Makefile.PL INSTALLDIRS=vendor
325 %{__make}
326 cd $odir
327 %endif
328 %endif
329
330 %install
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}
336
337 %{__make} install -j1 \
338 %if !%{with net_client_only} && %{with python}
339         install-swig-py \
340 %endif
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
345
346 %if !%{with net_client_only} && %{with perl}
347 %{__make} install-swig-pl-lib \
348         DESTDIR=$RPM_BUILD_ROOT
349 odir=$(pwd)
350 cd subversion/bindings/swig/perl/native
351 %{__make} install \
352         DESTDIR=$RPM_BUILD_ROOT \
353         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
354         LIBDIR=$RPM_BUILD_ROOT%{_libdir}
355 cd $odir
356 %endif
357
358 %if %{with apache}
359 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
360 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
361 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
362 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
363 %endif
364
365 %if !%{with net_client_only}
366 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
367 %if %{with python}
368 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
369 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
370 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
371 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
372 %endif
373 %endif
374
375 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
376 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
377
378 %find_lang %{name}
379
380 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*swig*.la
381
382 %clean
383 rm -rf $RPM_BUILD_ROOT
384
385 %post devel
386 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
387
388 %postun devel
389 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
390
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
395
396 %post svnserve
397 /sbin/chkconfig --add svnserve
398 %service svnserve restart "svnserve daemon"
399
400 %preun svnserve
401 if [ "$1" = "0" ]; then
402         %service svnserve stop
403         /sbin/chkconfig --del svnserve
404 fi
405
406 %post -n apache-mod_dav_svn
407 %service -q httpd restart
408
409 %preun -n apache-mod_dav_svn
410 if [ "$1" = "0" ]; then
411         %service -q httpd restart
412 fi
413
414 %files
415 %defattr(644,root,root,755)
416 %doc BUGS CHANGES COPYING INSTALL README
417 %doc doc/*/*.html
418 %doc tools/hook-scripts/*.{pl,py,example}
419 %doc tools/hook-scripts/mailer/*.{py,example}
420 %doc tools/xslt/*
421 %attr(755,root,root) %{_bindir}/svn*
422 %exclude %{_bindir}/svnserve
423 %if !%{with net_client_only}
424 %exclude %{_bindir}/svn-hot-backup
425 %endif
426 %{_mandir}/man1/*
427 %{_mandir}/man5/*
428 %{_mandir}/man8/*
429 %exclude %{_mandir}/man?/svnserve*
430
431 %files libs -f %{name}.lang
432 %defattr(644,root,root,755)
433 %attr(755,root,root) %{_libdir}/lib*.so.*
434 %if %{with perl} || %{with python}
435 %exclude %{_libdir}/lib*_swig_*.so.*
436 %endif
437
438 %files devel
439 %defattr(644,root,root,755)
440 %{_includedir}/%{name}*
441 %attr(755,root,root) %{_libdir}/lib*.so
442 %{_libdir}/lib*.la
443 %if %{with perl} || %{with python}
444 %exclude %{_libdir}/lib*_swig_*.so
445 %endif
446 %{_examplesdir}/%{name}-%{version}
447
448 %files static
449 %defattr(644,root,root,755)
450 %{_libdir}/lib*.a
451
452 %if !%{with net_client_only}
453 %files svnserve
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_bindir}/svnserve
456 %{_mandir}/man?/svnserve*
457 %dir /home/services/subversion
458 %dir /home/services/subversion/repos
459 %if %{with apache}
460 %attr(754,root,root) /etc/rc.d/init.d/svnserve
461 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
462 %endif
463
464 %files tools
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{_bindir}/svn-hot-backup
467
468 %files -n bash-completion-subversion
469 %defattr(644,root,root,755)
470 /etc/bash_completion.d/%{name}
471
472 %if %{with python}
473 %files -n python-subversion
474 %defattr(644,root,root,755)
475 %doc tools/backup/*.py tools/examples/*.py
476 %dir %{py_sitedir}/svn
477 %dir %{py_sitedir}/libsvn
478 %{py_sitedir}/svn/*.py[co]
479 %{py_sitedir}/libsvn/*.py[co]
480 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
481 %{_examplesdir}/python-%{name}-%{version}
482 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
483 %endif
484
485 %if %{with perl}
486 %files -n perl-subversion
487 %defattr(644,root,root,755)
488 %{perl_vendorarch}/SVN
489 %dir %{perl_vendorarch}/auto/SVN
490 %dir %{perl_vendorarch}/auto/SVN/*
491 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
492 %{perl_vendorarch}/auto/SVN/*/*.bs
493 %{_mandir}/man3/*.3pm*
494 %attr(755,root,root) %{_libdir}/lib*_swig_perl*.so*
495 %endif
496
497 %if %{with apache}
498 %files -n apache-mod_dav_svn
499 %defattr(644,root,root,755)
500 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
501 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
502
503 %files -n apache-mod_authz_svn
504 %defattr(644,root,root,755)
505 %doc subversion/mod_authz_svn/INSTALL
506 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
507 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
508 %endif
509
510 %endif # net_client_only
This page took 0.090587 seconds and 2 git commands to generate.