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