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