]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
168693cfb5349e23de80e626fdedc34c9b1e745e
[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.1.0
19 Release:        0.1
20 License:        Apache/BSD Style
21 Group:          Development/Version Control
22 Source0:        http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2
23 # Source0-md5:  a91b0d79b8c8ab8747587037c044c6c9
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}-log-xml.patch
29 URL:            http://subversion.tigris.org/
30 %if %{with net_client_only}
31 %global apache_modules_api 0
32 %else
33 BuildRequires:  automake
34 %{?with_apache:BuildRequires:   apache-devel >= 2.0.47-0.6}
35 BuildRequires:  db-devel >= 4.1.25
36 BuildRequires:  rpmbuild(macros) >= 1.120
37 %if %{with python} || %{with perl}
38 BuildRequires:  swig >= 1.3.19
39 %endif
40 %{?with_python:BuildRequires:   swig-python >= 1.3.21}
41 %if %{with perl}
42 BuildRequires:  swig-perl >= 1.3.21
43 BuildRequires:  perl-devel >= 1:5.8.0
44 BuildRequires:  rpm-perlprov >= 4.1-13
45 %endif
46 %endif
47 BuildRequires:  apr-devel >= 1:0.9.5
48 BuildRequires:  apr-util-devel >= 1:0.9.5
49 BuildRequires:  autoconf >= 2.59
50 BuildRequires:  bison
51 BuildRequires:  docbook-style-xsl >= 1.56
52 BuildRequires:  expat-devel
53 BuildRequires:  libtool >= 1.4-9
54 BuildRequires:  libxslt-progs
55 %{!?with_internal_neon:BuildRequires:   neon-devel >= 0.24.7}
56 %if %{with python}
57 BuildRequires:  python-devel >= 2.2
58 BuildRequires:  rpm-pythonprov >= 4.0.2-50
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   /usr/%{_lib}/apache
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 Obsoletes:      libsubversion0
115 %{!?with_internal_neon:Requires:        neon >= 0.24.6}
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:0.9.5
130 %{!?with_internal_neon:Requires:        neon-devel >= 0.24.6}
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 PreReq:         rc-scripts
165 Requires(post,preun):   /sbin/chkconfig
166 Requires:       %{name} = %{version}-%{release}
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:       python-rcsparse >= 0.1-0.20031026.0
181 Requires:       python-subversion = %{version}
182 Requires:       %{name} = %{version}-%{release}
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:       bash-completion
195 Requires:       %{name} = %{version}-%{release}
196 Conflicts:      %{name}-tools <= 1.1.0-0.rc2.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 Obsoletes:      subversion-python
211 Requires:       %{name}-libs = %{version}-%{release}
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 Obsoletes:      subversion-perl
228 Requires:       %{name}-libs = %{version}-%{release}
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:       apache >= 2.0.47
244 Requires:       apache(modules-api) = %{apache_modules_api}
245 Requires:       apache-mod_dav
246 Requires:       %{name} = %{version}-%{release}
247
248 %description -n apache-mod_dav_svn
249 Apache module: Subversion Server.
250
251 %description -n apache-mod_dav_svn -l pl
252 Modu³ apache: Serwer Subversion.
253
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-mod_dav_svn = %{version}-%{release}
259 Requires:       apache >= 2.0.47
260 Requires:       apache(modules-api) = %{apache_modules_api}
261
262 %description -n apache-mod_authz_svn
263 Apache module: Subversion Server - path-based authorization.
264
265 %description -n apache-mod_authz_svn -l pl
266 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
267
268 %prep
269 %setup -q
270 %patch0 -p0
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-config \
305         --with-apr-util=%{_bindir}/apu-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 # build documentation; build process for documentation is severely
328 # braindamaged -- authors suggests to untar docbook distribution in
329 # build directory, hence the hack here
330 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
331 %{__make} -C doc/book all-html
332
333 # prepare for %%doc below
334 mv -f doc/book/book/html-chunk svn-handbook
335 #mkdir svn-handbook/images/
336 cp -f doc/book/book/images/*.png svn-handbook/images/
337
338 %install
339 rm -rf $RPM_BUILD_ROOT
340 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
341         $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
342         $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
343         $RPM_BUILD_ROOT/home/services/subversion{,/repos}
344
345 %{__make} install \
346 %if !%{with net_client_only} && %{with python}
347         install-swig-py \
348 %endif
349         DESTDIR=$RPM_BUILD_ROOT \
350         swig_pydir=%{py_sitedir}/libsvn \
351         swig_pydir_extra=%{py_sitedir}/svn
352
353 %if !%{with net_client_only} && %{with perl}
354 %{__make} install-swig-pl-lib \
355         DESTDIR=$RPM_BUILD_ROOT
356 odir=$(pwd)
357 cd subversion/bindings/swig/perl/native
358 %{__make} install \
359         DESTDIR=$RPM_BUILD_ROOT \
360         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
361         LIBDIR=$RPM_BUILD_ROOT%{_libdir}
362 cd $odir
363 %endif
364
365 %if %{with apache}
366 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
367 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
368 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
369 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
370 %endif
371 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
372
373 %if !%{with net_client_only}
374 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
375 %if %{with python}
376 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
377 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
378 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
379 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
380 %endif
381 %endif
382
383 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
384 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
385
386 %find_lang %{name}
387
388 %clean
389 rm -rf $RPM_BUILD_ROOT
390
391 %post devel
392 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
393
394 %postun devel
395 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
396
397 %post   libs -p /sbin/ldconfig
398 %postun libs -p /sbin/ldconfig
399
400 %post svnserve
401 if [ -f /var/lock/subsys/svnserve ]; then
402         /etc/rc.d/init.d/svnserve restart 1>&2
403 else
404         echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
405 fi
406 %preun svnserve
407 if [ "$1" = "0" ]; then
408         if [ -f /var/lock/subsys/svnserve ]; then
409                 /etc/rc.d/init.d/svnserve restart 1>&2
410         fi
411 fi
412
413
414 %post -n apache-mod_dav_svn
415 if [ -f /var/lock/subsys/httpd ]; then
416         /etc/rc.d/init.d/httpd restart 1>&2
417 else
418         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
419 fi
420
421 %preun -n apache-mod_dav_svn
422 if [ "$1" = "0" ]; then
423         if [ -f /var/lock/subsys/httpd ]; then
424                 /etc/rc.d/init.d/httpd restart 1>&2
425         fi
426 fi
427
428 %files
429 %defattr(644,root,root,755)
430 %doc BUGS CHANGES COPYING INSTALL README
431 %doc svn-handbook doc/book/misc-docs/misc-docs.html
432 %doc tools/hook-scripts/*.{pl,py,example}
433 %doc tools/hook-scripts/mailer/*.{py,example}
434 %doc tools/xslt/*
435 %attr(755,root,root) %{_bindir}/svn*
436 %exclude %{_bindir}/svnserve
437 %exclude %{_bindir}/svn-hot-backup
438 %{_mandir}/man1/*
439 %{_mandir}/man5/*
440 %{_mandir}/man8/*
441 %exclude %{_mandir}/man?/svnserve*
442 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
443
444 %files libs -f %{name}.lang
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/lib*.so.*
447
448 %files devel
449 %defattr(644,root,root,755)
450 %{_includedir}/%{name}*
451 %attr(755,root,root) %{_libdir}/lib*.so
452 %{_libdir}/lib*.la
453 %{_infodir}/svn*
454 %{_examplesdir}/%{name}-%{version}
455
456 %files static
457 %defattr(644,root,root,755)
458 %{_libdir}/lib*.a
459
460 %if !%{with net_client_only}
461 %files svnserve
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_bindir}/svnserve
464 %{_mandir}/man?/svnserve*
465 %dir /home/services/subversion
466 %dir /home/services/subversion/repos
467 %if %{with apache}
468 %attr(754,root,root) /etc/rc.d/init.d/svnserve
469 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
470 %endif
471
472 %files tools
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/svn-hot-backup
475
476 %files -n bash-completion-subversion
477 %defattr(644,root,root,755)
478 /etc/bash_completion.d/%{name}
479
480 %if %{with python}
481 %files -n python-subversion
482 %defattr(644,root,root,755)
483 %doc tools/backup/*.py tools/examples/*.py
484 %dir %{py_sitedir}/svn
485 %dir %{py_sitedir}/libsvn
486 %{py_sitedir}/svn/*.py[co]
487 %{py_sitedir}/libsvn/*.py[co]
488 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
489 %{_examplesdir}/python-%{name}-%{version}
490 %endif
491
492 %if %{with perl}
493 %files -n perl-subversion
494 %defattr(644,root,root,755)
495 %{perl_vendorarch}/SVN
496 %dir %{perl_vendorarch}/auto/SVN
497 %dir %{perl_vendorarch}/auto/SVN/*
498 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
499 %{perl_vendorarch}/auto/SVN/*/*.bs
500 %{_mandir}/man3/*.3pm*
501 %endif
502
503 %if %{with apache}
504 %files -n apache-mod_dav_svn
505 %defattr(644,root,root,755)
506 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
507 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
508
509 %files -n apache-mod_authz_svn
510 %defattr(644,root,root,755)
511 %doc subversion/mod_authz_svn/INSTALL
512 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
513 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
514 %endif
515 %endif
This page took 0.060944 seconds and 2 git commands to generate.