]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
- "HTTP" unification
[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.1
19 Release:        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:  a180c3fe91680389c210c99def54d9e0
24 Source1:        %{name}-dav_svn.conf
25 Source2:        %{name}-authz_svn.conf
26 Source3:        %{name}-svnserve.init
27 Source4:        %{name}-svnserve.sysconfig
28 URL:            http://subversion.tigris.org/
29 %if %{with net_client_only}
30 %global apache_modules_api 0
31 %else
32 BuildRequires:  automake
33 %{?with_apache:BuildRequires:   apache-devel >= 2.0.47-0.6}
34 BuildRequires:  db-devel >= 4.1.25
35 BuildRequires:  rpmbuild(macros) >= 1.120
36 %if %{with python} || %{with perl}
37 BuildRequires:  swig >= 1.3.19
38 %endif
39 %{?with_python:BuildRequires:   swig-python >= 1.3.21}
40 %if %{with perl}
41 BuildRequires:  swig-perl >= 1.3.21
42 BuildRequires:  perl-devel >= 1:5.8.0
43 BuildRequires:  rpm-perlprov >= 4.1-13
44 %endif
45 %endif
46 BuildRequires:  apr-devel >= 1:1.0.0
47 BuildRequires:  apr-util-devel >= 1:1.0.0
48 BuildRequires:  autoconf >= 2.59
49 BuildRequires:  bison
50 BuildRequires:  docbook-style-xsl >= 1.56
51 BuildRequires:  expat-devel
52 BuildRequires:  libtool >= 1.4-9
53 BuildRequires:  libxslt-progs
54 %{!?with_internal_neon:BuildRequires:   neon-devel >= 0.24.7}
55 %if %{with python}
56 BuildRequires:  python-devel >= 2.2
57 BuildRequires:  rpm-pythonprov >= 4.0.2-50
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
270 rm -rf apr-util{,/xml/expat}/autom4te.cache
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_internal_neon:--with-neon=%{_prefix}} \
302         --with-apr=%{_bindir}/apr-1-config \
303         --with-apr-util=%{_bindir}/apu-1-config
304
305 %{__make}
306
307 %if !%{with net_client_only}
308 # python
309 %if %{with python}
310 %{__make} swig-py \
311         swig_pydir=%{py_sitedir}/libsvn \
312         swig_pydir_extra=%{py_sitedir}/svn
313 %endif
314 # perl
315 %if %{with perl}
316 %{__make} swig-pl-lib
317 odir=$(pwd)
318 cd subversion/bindings/swig/perl/native
319 %{__perl} Makefile.PL INSTALLDIRS=vendor
320 %{__make}
321 cd $odir
322 %endif
323 %endif
324
325 # build documentation; build process for documentation is severely
326 # braindamaged -- authors suggests to untar docbook distribution in
327 # build directory, hence the hack here
328 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
329 %{__make} -C doc/book all-html
330
331 # prepare for %%doc below
332 mv -f doc/book/book/html-chunk svn-handbook
333 #mkdir svn-handbook/images/
334 cp -f doc/book/book/images/*.png svn-handbook/images/
335
336 %install
337 rm -rf $RPM_BUILD_ROOT
338 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
339         $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
340         $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
341         $RPM_BUILD_ROOT/home/services/subversion{,/repos}
342
343 %{__make} install \
344 %if !%{with net_client_only} && %{with python}
345         install-swig-py \
346 %endif
347         DESTDIR=$RPM_BUILD_ROOT \
348         swig_pydir=%{py_sitedir}/libsvn \
349         swig_pydir_extra=%{py_sitedir}/svn
350
351 %if !%{with net_client_only} && %{with perl}
352 %{__make} install-swig-pl-lib \
353         DESTDIR=$RPM_BUILD_ROOT
354 odir=$(pwd)
355 cd subversion/bindings/swig/perl/native
356 %{__make} install \
357         DESTDIR=$RPM_BUILD_ROOT \
358         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
359         LIBDIR=$RPM_BUILD_ROOT%{_libdir}
360 cd $odir
361 %endif
362
363 %if %{with apache}
364 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
365 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
366 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
367 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
368 %endif
369 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
370
371 %if !%{with net_client_only}
372 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
373 %if %{with python}
374 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
375 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
376 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
377 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
378 %endif
379 %endif
380
381 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
382 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
383
384 %find_lang %{name}
385
386 %clean
387 rm -rf $RPM_BUILD_ROOT
388
389 %post devel
390 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
391
392 %postun devel
393 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
394
395 %post   libs -p /sbin/ldconfig
396 %postun libs -p /sbin/ldconfig
397
398 %post svnserve
399 if [ -f /var/lock/subsys/svnserve ]; then
400         /etc/rc.d/init.d/svnserve restart 1>&2
401 else
402         echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
403 fi
404 %preun svnserve
405 if [ "$1" = "0" ]; then
406         if [ -f /var/lock/subsys/svnserve ]; then
407                 /etc/rc.d/init.d/svnserve restart 1>&2
408         fi
409 fi
410
411
412 %post -n apache-mod_dav_svn
413 if [ -f /var/lock/subsys/httpd ]; then
414         /etc/rc.d/init.d/httpd restart 1>&2
415 else
416         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
417 fi
418
419 %preun -n apache-mod_dav_svn
420 if [ "$1" = "0" ]; then
421         if [ -f /var/lock/subsys/httpd ]; then
422                 /etc/rc.d/init.d/httpd restart 1>&2
423         fi
424 fi
425
426 %files
427 %defattr(644,root,root,755)
428 %doc BUGS CHANGES COPYING INSTALL README
429 %doc svn-handbook doc/book/misc-docs/misc-docs.html
430 %doc tools/hook-scripts/*.{pl,py,example}
431 %doc tools/hook-scripts/mailer/*.{py,example}
432 %doc tools/xslt/*
433 %attr(755,root,root) %{_bindir}/svn*
434 %exclude %{_bindir}/svnserve
435 %exclude %{_bindir}/svn-hot-backup
436 %{_mandir}/man1/*
437 %{_mandir}/man5/*
438 %{_mandir}/man8/*
439 %exclude %{_mandir}/man?/svnserve*
440 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
441
442 %files libs -f %{name}.lang
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/lib*.so.*
445
446 %files devel
447 %defattr(644,root,root,755)
448 %{_includedir}/%{name}*
449 %attr(755,root,root) %{_libdir}/lib*.so
450 %{_libdir}/lib*.la
451 %{_infodir}/svn*
452 %{_examplesdir}/%{name}-%{version}
453
454 %files static
455 %defattr(644,root,root,755)
456 %{_libdir}/lib*.a
457
458 %if !%{with net_client_only}
459 %files svnserve
460 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_bindir}/svnserve
462 %{_mandir}/man?/svnserve*
463 %dir /home/services/subversion
464 %dir /home/services/subversion/repos
465 %if %{with apache}
466 %attr(754,root,root) /etc/rc.d/init.d/svnserve
467 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
468 %endif
469
470 %files tools
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_bindir}/svn-hot-backup
473
474 %files -n bash-completion-subversion
475 %defattr(644,root,root,755)
476 /etc/bash_completion.d/%{name}
477
478 %if %{with python}
479 %files -n python-subversion
480 %defattr(644,root,root,755)
481 %doc tools/backup/*.py tools/examples/*.py
482 %dir %{py_sitedir}/svn
483 %dir %{py_sitedir}/libsvn
484 %{py_sitedir}/svn/*.py[co]
485 %{py_sitedir}/libsvn/*.py[co]
486 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
487 %{_examplesdir}/python-%{name}-%{version}
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 %endif
500
501 %if %{with apache}
502 %files -n apache-mod_dav_svn
503 %defattr(644,root,root,755)
504 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
505 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
506
507 %files -n apache-mod_authz_svn
508 %defattr(644,root,root,755)
509 %doc subversion/mod_authz_svn/INSTALL
510 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
511 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
512 %endif
513 %endif
This page took 0.113549 seconds and 4 git commands to generate.