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