]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
- http(s) tested with neon-0.25.5, release 5.
[packages/subversion.git] / subversion.spec
1 #
2 # todo:
3 # - remove net_client_only and add db bcond (then without apache and
4 #   without db => net_client_only - spec will be more simpler, I think)
5 #
6 # Conditional build:
7 %bcond_with     net_client_only                 # build only net client
8 %bcond_without  python                          # build without python bindings
9 %bcond_without  perl                            # build without perl bindings
10 %bcond_without  apache                          # build without apache support (webdav, etc)
11 #
12 %{!?with_net_client_only:%include       /usr/lib/rpm/macros.perl}
13 %define apxs    /usr/sbin/apxs
14 Summary:        A Concurrent Versioning system similar to but better than CVS
15 Summary(pl):    System kontroli wersji podobny, ale lepszy, ni¿ CVS
16 Summary(pt_BR): Sistema de versionamento concorrente
17 Name:           subversion
18 Version:        1.3.0
19 Release:        5
20 License:        Apache/BSD Style
21 Group:          Development/Version Control
22 Source0:        http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
23 # Source0-md5:  0d91a7fe152d0373044c47c54deb2c9a
24 Source1:        %{name}-dav_svn.conf
25 Source2:        %{name}-authz_svn.conf
26 Source3:        %{name}-svnserve.init
27 Source4:        %{name}-svnserve.sysconfig
28 Patch0:         %{name}-home_etc.patch
29 Patch1:         %{name}-DESTDIR.patch
30 URL:            http://subversion.tigris.org/
31 %if %{with net_client_only}
32 %global apache_modules_api 0
33 %else
34 %{?with_apache:BuildRequires:   apache-devel >= 2.2.0-8}
35 BuildRequires:  automake
36 BuildRequires:  db-devel >= 4.1.25
37 BuildRequires:  rpmbuild(macros) >= 1.268
38 %if %{with perl}
39 BuildRequires:  perl-devel >= 1:5.8.0
40 BuildRequires:  rpm-perlprov >= 4.1-13
41 BuildRequires:  swig-perl >= 1.3.24
42 %endif
43 %endif
44 BuildRequires:  apr-devel >= 1:1.0.0
45 BuildRequires:  apr-util-devel >= 1:1.0.0
46 BuildRequires:  autoconf >= 2.59
47 BuildRequires:  bison
48 BuildRequires:  expat-devel
49 BuildRequires:  gettext-devel
50 BuildRequires:  libtool >= 1.4-9
51 BuildRequires:  neon-devel >= 0.24.7
52 BuildConflicts: neon-devel > 0.25.5
53 %if %{with python}
54 BuildRequires:  python >= 2.2
55 BuildRequires:  python-devel >= 2.2
56 BuildRequires:  python-modules >= 2.2
57 BuildRequires:  sed >= 4.0
58 BuildRequires:  swig-python >= 1.3.24
59 %endif
60 BuildRequires:  texinfo
61 BuildRequires:  which
62 Requires:       %{name}-libs = %{version}-%{release}
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         _apachelibdir   %(%{apxs} -q LIBEXECDIR 2>/dev/null)
66 %define         _libexecdir             %{_libdir}/svn
67
68 %description
69 The goal of the Subversion project is to build a version control
70 system that is a compelling replacement for CVS in the open source
71 community.
72
73 Our goals are:
74 - All current CVS features.
75 - Directories, renames, and file meta-data are versioned.
76 - Symbolic links, etc, are supported
77 - Commits are truly atomic.
78 - Branching and tagging are cheap (constant time) operations
79 - Repeated merges are handled gracefully
80 - Support for plug-in client side diff programs
81 - Natively client/server
82 - Client/server protocol sends diffs in both directions
83 - Costs are proportional to change size, not project size
84 - Internationalization
85 - Progressive multi-lingual support
86
87 %description -l pl
88 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
89 zamiennika dla CVS.
90
91 Cele projektu to:
92 - Wszystkie aktualne mo¿liwo¶ci CVS.
93 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
94 - Wsparcie dla linków symbolicznych itp.
95 - Commity s± w pe³ni atomowe.
96 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
97 - Powtarzaj±ce merge.
98 - Wsparcie dla pluginów diff'a po stronie klienta.
99 - Natywny klient/serwer.
100 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
101 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
102 - Internacjonalizacja.
103 - Postêpuj±ce wsparcie dla wielu jêzyków.
104
105 %description -l pt_BR
106 O objetivo do projeto Subversion é construir um sistema de controle de
107 versões que seja um substituto para o CVS (Concurrent Versioning
108 System) na comunidade opensource, fornecendo grandes melhorias.
109
110 %package libs
111 Summary:        Subversion libraries and modules
112 Summary(pl):    Biblioteka subversion oraz ³adowalne modu³y
113 Group:          Libraries
114 Requires:       neon >= 0.24.7
115 Obsoletes:      libsubversion0
116
117 %description libs
118 Subversion libraries and modules.
119
120 %description libs -l pl
121 Biblioteka subversion oraz ³adowalne modu³y.
122
123 %package devel
124 Summary:        Header files and develpment documentation for subversion
125 Summary(pl):    Pliki nag³ówkowe i dokumetacja do subversion
126 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
127 Group:          Development/Libraries
128 Requires:       %{name}-libs = %{version}-%{release}
129 Requires:       apr-util-devel >= 1:1.0.0
130 Requires:       neon-devel >= 0.24.7
131 Obsoletes:      libsubversion0-devel
132
133 %description devel
134 Header files and develpment documentation for subversion.
135
136 %description devel -l pl
137 Pliki nag³ówkowe i dokumetacja do subversion.
138
139 %description devel -l pt_BR
140 Este pacote provê os arquivos necessários para desenvolvedores
141 interagirem com o Subversion.
142
143 %package static
144 Summary:        Static subversion library
145 Summary(pl):    Biblioteka statyczna subversion
146 Summary(pt_BR): Sistema de versionamento concorrente
147 Group:          Development/Libraries
148 Requires:       %{name}-devel = %{version}
149 Obsoletes:      libsubversion0-static-devel
150
151 %description static
152 Static subversion library.
153
154 %description static -l pl
155 Biblioteka statyczna subversion.
156
157 %description static -l pt_BR
158 Este pacote provê um cliente estático do subversion.
159
160 %package svnserve
161 Summary:        Subversion svnserve
162 Summary(pl):    Subversion svnserve
163 Group:          Networking/Daemons
164 Requires(post,preun):   /sbin/chkconfig
165 Requires:       %{name} = %{version}-%{release}
166 Requires:       rc-scripts
167
168 %description svnserve
169 Subversion svnserve server.
170
171 %description svnserve -l pl
172 Serwer subversion svnserve.
173
174 %package tools
175 Summary:        Subversion tools and scripts
176 Summary(pl):    Narzêdzia oraz skrypty dla subversion
177 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
178 Group:          Applications
179 %pyrequires_eq  python
180 Requires:       %{name} = %{version}-%{release}
181 Requires:       python-rcsparse >= 0.1-0.20031026.0
182 Requires:       python-subversion = %{version}
183
184 %description tools
185 Subversion tools and scripts.
186
187 %description tools -l pl
188 Narzêdzia oraz skrypty dla subversion.
189
190 %package -n bash-completion-subversion
191 Summary:        bash completion for subversion
192 Summary(pl):    Dope³nienia basha dla subversion
193 Group:          Applications/Shells
194 Requires:       %{name} = %{version}-%{release}
195 Requires:       bash-completion
196 Conflicts:      %{name}-tools <= 1.1.0-0.rc6.1
197
198 %description -n bash-completion-subversion
199 Bash completion for subversion.
200
201 %description -n bash-completion-subversion -l pl
202 Dope³nienia basha dla subversion.
203
204 %package -n python-subversion
205 Summary:        Subversion python bindings
206 Summary(pl):    Dowi±zania do subversion dla pythona
207 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
208 Group:          Development/Languages/Python
209 %pyrequires_eq  python
210 Requires:       %{name}-libs = %{version}-%{release}
211 Obsoletes:      subversion-python
212
213 %description -n python-subversion
214 Subversion python bindings.
215
216 %description -n python-subversion -l pl
217 Dowi±zania do subversion dla pythona.
218
219 %description -n python-subversion -l pt_BR
220 Módulos python para acessar os recursos do Subversion.
221
222 %package -n perl-subversion
223 Summary:        Subversion perl bindings
224 Summary(pl):    Dowi±zania do subversion dla perla
225 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
226 Group:          Development/Languages/Perl
227 Requires:       %{name}-libs = %{version}-%{release}
228 Obsoletes:      subversion-perl
229
230 %description -n perl-subversion
231 Subversion perl bindings.
232
233 %description -n perl-subversion -l pl
234 Dowi±zania do subversion dla perl.
235
236 %description -n perl-subversion -l pt_BR
237 Módulos perl para acessar os recursos do Subversion.
238
239 %package -n apache-mod_dav_svn
240 Summary:        Apache module: Subversion Server
241 Summary(pl):    Modu³ apache: Serwer Subversion
242 Group:          Networking/Daemons
243 Requires:       %{name} = %{version}-%{release}
244 Requires:       apache(modules-api) = %apache_modules_api
245 Requires:       apache-mod_dav
246
247 %description -n apache-mod_dav_svn
248 Apache module: Subversion Server.
249
250 %description -n apache-mod_dav_svn -l pl
251 Modu³ apache: Serwer Subversion.
252
253 %package -n apache-mod_authz_svn
254 Summary:        Apache module: Subversion Server - path-based authorization
255 Summary(pl):    Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
256 Group:          Networking/Daemons
257 Requires:       apache(modules-api) = %apache_modules_api
258 Requires:       apache-mod_dav_svn = %{version}-%{release}
259
260 %description -n apache-mod_authz_svn
261 Apache module: Subversion Server - path-based authorization.
262
263 %description -n apache-mod_authz_svn -l pl
264 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
265
266 %prep
267 %setup -q
268 rm -rf apr apr-util neon
269 %patch0 -p0
270 %patch1 -p1
271
272 %build
273 cp -f /usr/share/automake/config.sub ac-helpers
274 chmod +x ./autogen.sh && ./autogen.sh
275
276 # don't enable dso - currently it's broken
277 %configure \
278         --with-editor=vi \
279         --with-zlib \
280         --with-python=%{_bindir}/python \
281         --with-perl5=%{_bindir}/perl \
282 %if %{with net_client_only}
283         --without-apache \
284         --without-swig \
285         --without-apxs \
286         --without-berkeley-db \
287 %else
288         --disable-dso \
289         --disable-mod-activation \
290 %if %{with apache}
291         --with-apxs=%{_sbindir}/apxs \
292 %else
293         --without-apache \
294         --without-apxs \
295         --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
296 %endif
297 %if !%{with python} && !%{with perl}
298         --without-swig \
299 %endif
300 %endif
301         --with-neon=%{_prefix} \
302         --disable-neon-version-check \
303         --with-apr=%{_bindir}/apr-1-config \
304         --with-apr-util=%{_bindir}/apu-1-config
305
306 %{__make}
307
308 %if !%{with net_client_only}
309 # python
310 %if %{with python}
311 %{__make} swig-py \
312         swig_pydir=%{py_sitedir}/libsvn \
313         swig_pydir_extra=%{py_sitedir}/svn
314 %endif
315 # perl
316 %if %{with perl}
317 %{__make} swig-pl-lib
318 odir=$(pwd)
319 cd subversion/bindings/swig/perl/native
320 %{__perl} Makefile.PL INSTALLDIRS=vendor
321 %{__make}
322 cd $odir
323 %endif
324 %endif
325
326 %{__sed} -i -e 's/@SVN_DB_INCLUDES@//g' -e 's/@SVN_DB_LIBS@//g' svn-config
327
328 %install
329 rm -rf $RPM_BUILD_ROOT
330 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
331         $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
332         $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
333         $RPM_BUILD_ROOT/home/services/subversion{,/repos}
334
335 %{__make} install \
336 %if !%{with net_client_only} && %{with python}
337         install-swig-py \
338 %endif
339         APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
340         DESTDIR=$RPM_BUILD_ROOT \
341         swig_pydir=%{py_sitedir}/libsvn \
342         swig_pydir_extra=%{py_sitedir}/svn
343
344 %if !%{with net_client_only} && %{with perl}
345 %{__make} install-swig-pl-lib \
346         DESTDIR=$RPM_BUILD_ROOT
347 odir=$(pwd)
348 cd subversion/bindings/swig/perl/native
349 %{__make} install \
350         DESTDIR=$RPM_BUILD_ROOT \
351         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
352         LIBDIR=$RPM_BUILD_ROOT%{_libdir}
353 cd $odir
354 %endif
355
356 install svn-config $RPM_BUILD_ROOT%{_bindir}
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 %clean
381 rm -rf $RPM_BUILD_ROOT
382
383 %post devel
384 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
385
386 %postun devel
387 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
388
389 %post   libs -p /sbin/ldconfig
390 %postun libs -p /sbin/ldconfig
391 %post   -n python-subversion -p /sbin/ldconfig
392 %postun -n perl-subversion -p /sbin/ldconfig
393
394 %post svnserve
395 /sbin/chkconfig --add svnserve
396 %service svnserve restart "svnserve daemon"
397
398 %preun svnserve
399 if [ "$1" = "0" ]; then
400         %service svnserve stop
401         /sbin/chkconfig --del svnserve
402 fi
403
404 %post -n apache-mod_dav_svn
405 %service -q httpd restart
406
407 %preun -n apache-mod_dav_svn
408 if [ "$1" = "0" ]; then
409         %service -q httpd restart
410 fi
411
412 %files
413 %defattr(644,root,root,755)
414 %doc BUGS CHANGES COPYING INSTALL README
415 %doc doc/*/*.html
416 %doc tools/hook-scripts/*.{pl,py,example}
417 %doc tools/hook-scripts/mailer/*.{py,example}
418 %doc tools/xslt/*
419 %attr(755,root,root) %{_bindir}/svn*
420 %exclude %{_bindir}/svnserve
421 %exclude %{_bindir}/svn-config
422 %exclude %{_bindir}/svn-hot-backup
423 %{_mandir}/man1/*
424 %{_mandir}/man5/*
425 %{_mandir}/man8/*
426 %exclude %{_mandir}/man?/svnserve*
427
428 %files libs -f %{name}.lang
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/lib*.so.*
431 %if %{with perl} || %{with python}
432 %exclude %{_libdir}/lib*_swig_*.so.*
433 %endif
434
435 %files devel
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_bindir}/svn-config
438 %{_includedir}/%{name}*
439 %attr(755,root,root) %{_libdir}/lib*.so
440 %{_libdir}/lib*.la
441 %if %{with perl} || %{with python}
442 %exclude %{_libdir}/lib*_swig_*.so
443 %exclude %{_libdir}/lib*swig*.la
444 %endif
445 %{_examplesdir}/%{name}-%{version}
446
447 %files static
448 %defattr(644,root,root,755)
449 %{_libdir}/lib*.a
450
451 %if %{without net_client_only}
452 %files svnserve
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_bindir}/svnserve
455 %{_mandir}/man?/svnserve*
456 %dir /home/services/subversion
457 %dir /home/services/subversion/repos
458 %if %{with apache}
459 %attr(754,root,root) /etc/rc.d/init.d/svnserve
460 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
461 %endif
462
463 %files tools
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/svn-hot-backup
466
467 %files -n bash-completion-subversion
468 %defattr(644,root,root,755)
469 /etc/bash_completion.d/%{name}
470
471 %if %{with python}
472 %files -n python-subversion
473 %defattr(644,root,root,755)
474 %doc tools/backup/*.py tools/examples/*.py
475 %dir %{py_sitedir}/svn
476 %dir %{py_sitedir}/libsvn
477 %{py_sitedir}/svn/*.py[co]
478 %{py_sitedir}/libsvn/*.py[co]
479 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
480 %{_examplesdir}/python-%{name}-%{version}
481 %attr(755,root,root) %{_libdir}/lib*_swig_py*.so*
482 %{_libdir}/lib*_swig_py*.la
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 %{_libdir}/lib*_swig_perl*.la
496 %endif
497
498 %if %{with apache}
499 %files -n apache-mod_dav_svn
500 %defattr(644,root,root,755)
501 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
502 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
503
504 %files -n apache-mod_authz_svn
505 %defattr(644,root,root,755)
506 %doc subversion/mod_authz_svn/INSTALL
507 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
508 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
509 %endif
510
511 %endif # net_client_only
This page took 0.100695 seconds and 4 git commands to generate.