]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
9cc382255f22e9f85faa7daccbe5e05ec6dac087
[packages/subversion.git] / subversion.spec
1 #
2 # Conditional build:
3 %bcond_with             internal_neon           # build with internal neon
4 %bcond_with             net_client_only         # build only net client
5 %bcond_without  python                          # build without python bindings
6 %bcond_without  perl                            # build without perl bindings
7 %bcond_without  apache                          # build without apache support (webdav, etc)
8 #       
9 %include        /usr/lib/rpm/macros.python
10 %{!?with_net_client_only:%include       /usr/lib/rpm/macros.perl}
11 Summary:        A Concurrent Versioning system similar to but better than CVS
12 Summary(pl):    System kontroli wersji podobny, ale lepszy, ni¿ CVS
13 Summary(pt_BR): Sistema de versionamento concorrente
14 Name:           subversion
15 Version:        1.0.5
16 Release:        1
17 License:        Apache/BSD Style
18 Group:          Development/Version Control
19 Source0:        http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2
20 # Source0-md5:  8e8288fee061f5278ec201fc5e5e141c
21 Source1:        %{name}-dav_svn.conf
22 Source2:        %{name}-authz_svn.conf
23 Source3:        %{name}-svnserve.init
24 Source4:        %{name}-svnserve.sysconfig
25 #Patch0:                %{name}-svnlook.patch
26 #Patch1:                %{name}-hot_backup_num.patch
27 URL:            http://subversion.tigris.org/
28 %if %{with net_client_only}
29 %global apache_modules_api 0
30 %else
31 BuildRequires:  automake
32 %{?with_apache:BuildRequires:   apache-devel >= 2.0.47-0.6}
33 BuildRequires:  db-devel >= 4.1.25
34 BuildRequires:  rpmbuild(macros) >= 1.120
35 %if %{with python} || %{with perl}
36 BuildRequires:  swig >= 1.3.19
37 %endif
38 %{?with_python:BuildRequires:   swig-python >= 1.3.19}
39 %if %{with perl}
40 BuildRequires:  swig-perl >= 1.3.19
41 BuildRequires:  perl-devel >= 1:5.8.0
42 BuildRequires:  rpm-perlprov >= 4.1-13
43 %endif
44 %endif
45 BuildRequires:  apr-devel >= 1:0.9.5
46 BuildRequires:  apr-util-devel >= 1:0.9.5
47 BuildRequires:  autoconf >= 2.59
48 BuildRequires:  bison
49 BuildRequires:  docbook-style-xsl >= 1.56
50 BuildRequires:  expat-devel
51 BuildRequires:  libtool >= 1.4-9
52 BuildRequires:  libxslt-progs
53 %{!?with_internal_neon:BuildRequires:   neon-devel >= 0.24.6}
54 %if %{with python}
55 BuildRequires:  python-devel >= 2.2
56 BuildRequires:  rpm-pythonprov >= 4.0.2-50
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:0.9.5
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 python-subversion
189 Summary:        Subversion python bindings
190 Summary(pl):    Dowi±zania do subversion dla pythona
191 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
192 Group:          Development/Languages/Python
193 %pyrequires_eq  python
194 Obsoletes:      subversion-python
195 Requires:       %{name}-libs = %{version}-%{release}
196
197 %description -n python-subversion
198 Subversion python bindings.
199
200 %description -n python-subversion -l pl
201 Dowi±zania do subversion dla pythona.
202
203 %description -n python-subversion -l pt_BR
204 Módulos python para acessar os recursos do Subversion.
205
206 %package -n perl-subversion
207 Summary:        Subversion perl bindings
208 Summary(pl):    Dowi±zania do subversion dla perla
209 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
210 Group:          Development/Languages/Perl
211 Obsoletes:      subversion-perl
212 Requires:       %{name}-libs = %{version}-%{release}
213
214 %description -n perl-subversion
215 Subversion perl bindings.
216
217 %description -n perl-subversion -l pl
218 Dowi±zania do subversion dla perl.
219
220 %description -n perl-subversion -l pt_BR
221 Módulos perl para acessar os recursos do Subversion.
222
223 %package -n apache-mod_dav_svn
224 Summary:        Apache module: Subversion Server
225 Summary(pl):    Modu³ apache: Serwer Subversion
226 Group:          Networking/Daemons
227 Requires:       apache >= 2.0.47
228 Requires:       apache(modules-api) = %{apache_modules_api}
229 Requires:       apache-mod_dav
230 Requires:       %{name} = %{version}-%{release}
231
232 %description -n apache-mod_dav_svn
233 Apache module: Subversion Server.
234
235 %description -n apache-mod_dav_svn -l pl
236 Modu³ apache: Serwer Subversion.
237
238 %package -n apache-mod_authz_svn
239 Summary:        Apache module: Subversion Server - path-based authorization
240 Summary(pl):    Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
241 Group:          Networking/Daemons
242 Requires:       apache-mod_dav_svn = %{version}-%{release}
243 Requires:       apache >= 2.0.47
244 Requires:       apache(modules-api) = %{apache_modules_api}
245
246 %description -n apache-mod_authz_svn
247 Apache module: Subversion Server - path-based authorization.
248
249 %description -n apache-mod_authz_svn -l pl
250 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
251
252 %prep
253 %setup -q
254 #%patch0 -p0
255 #%patch1 -p1
256
257 rm -rf apr-util{,/xml/expat}/autom4te.cache
258
259 %build
260 cp -f /usr/share/automake/config.sub ac-helpers
261 chmod +x ./autogen.sh && ./autogen.sh
262
263 # don't enable dso - currently it's broken
264 %configure \
265 %if %{with net_client_only}
266         --without-apache \
267         --without-swig \
268         --without-apxs \
269         --without-berkeley-db \
270 %else
271         --disable-dso \
272         --disable-mod-activation \
273 %if %{with apache}
274         --with-apxs=%{_sbindir}/apxs \
275 %else
276         --without-apache \
277         --without-apxs \
278         --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
279 %endif
280 %if !%{with python} && !%{with perl}
281         --without-swig \
282 %endif
283 %endif
284         %{!?with_internal_neon:--with-neon=%{_prefix}} \
285         --with-apr=%{_bindir}/apr-config \
286         --with-apr-util=%{_bindir}/apu-config
287
288 %{__make}
289
290 %if !%{with net_client_only}
291 # python
292 %if %{with python}
293 %{__make} swig-py \
294         swig_pydir=%{py_sitedir}/libsvn \
295         swig_pydir_extra=%{py_sitedir}/svn
296 %endif
297 # perl
298 %if %{with perl}
299 bdir=$(pwd)
300 %{__make} install-swig-pl-lib \
301         LC_ALL=C \
302         DESTDIR=${bdir}/swig-pl-lib-buildroot
303 %{__make}
304 cd subversion/bindings/swig/perl
305 env APR_CONFIG=%{_bindir}/apr-config \
306     APU_CONFIG=%{_bindir}/apu-config \
307         %{__perl} Makefile.PL \
308         INSTALLDIRS=vendor
309 env LIBRARY_PATH=${bdir}/swig-pl-lib-buildroot%{_libdir} %{__make}
310 cd ../../../../
311 %endif
312 %endif
313
314 # build documentation; build process for documentation is severely
315 # braindamaged -- authors suggests to untar docbook distribution in
316 # build directory, hence the hack here
317 ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
318 %{__make} -C doc/book all-html
319
320 # prepare for %%doc below
321 mv -f doc/book/book/html-chunk svn-handbook
322 mkdir svn-handbook/images/
323 cp -f doc/book/book/images/*.png svn-handbook/images/
324
325 %install
326 rm -rf $RPM_BUILD_ROOT
327 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
328         $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
329         $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}}
330
331 %{__make} install \
332         LC_ALL=C \
333 %if !%{with net_client_only} && %{with python}
334         install-swig-py \
335 %endif
336         DESTDIR=$RPM_BUILD_ROOT \
337         swig_pydir=%{py_sitedir}/libsvn \
338         swig_pydir_extra=%{py_sitedir}/svn
339
340 %if !%{with net_client_only} && %{with perl}
341 %{__make} install-swig-pl-lib \
342         LC_ALL=C \
343         DESTDIR=$RPM_BUILD_ROOT
344 %{__make} -C subversion/bindings/swig/perl install \
345         DESTDIR=$RPM_BUILD_ROOT
346 %endif
347
348 %if %{with apache}
349 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
350 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
351 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
352 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
353 %endif
354 install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
355
356 %if !%{with net_client_only}
357 install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
358 %if %{with python}
359 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
360 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
361 find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
362 install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
363 %endif
364 %endif
365
366 install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
367 install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
368
369 %clean
370 rm -rf $RPM_BUILD_ROOT
371
372 %post devel
373 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
374
375 %postun devel
376 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
377
378 %post   libs -p /sbin/ldconfig
379 %postun libs -p /sbin/ldconfig
380
381 %post svnserve
382 if [ -f /var/lock/subsys/svnserve ]; then
383         /etc/rc.d/init.d/svnserve restart 1>&2
384 else
385         echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
386 fi
387
388 %preun svnserve
389 if [ "$1" = "0" ]; then
390         if [ -f /var/lock/subsys/svnserve ]; then
391                 /etc/rc.d/init.d/svnserve restart 1>&2
392         fi
393 fi
394
395 %post -n apache-mod_dav_svn
396 if [ -f /var/lock/subsys/httpd ]; then
397         /etc/rc.d/init.d/httpd restart 1>&2
398 else
399         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
400 fi
401
402 %preun -n apache-mod_dav_svn
403 if [ "$1" = "0" ]; then
404         if [ -f /var/lock/subsys/httpd ]; then
405                 /etc/rc.d/init.d/httpd restart 1>&2
406         fi
407 fi
408
409 %files
410 %defattr(644,root,root,755)
411 %doc BUGS CHANGES COPYING INSTALL README
412 %doc svn-handbook doc/book/misc-docs/misc-docs.html
413 %doc tools/hook-scripts/*.{pl,py,example}
414 %doc tools/hook-scripts/mailer/*.{py,example}
415 %doc tools/xslt/*
416 %attr(755,root,root) %{_bindir}/svn*
417 %exclude %{_bindir}/svnserve
418 %exclude %{_bindir}/svn-hot-backup
419 %{_mandir}/man1/*
420 %{_mandir}/man5/*
421 %{_mandir}/man8/*
422 %exclude %{_mandir}/man?/svnserve*
423 %{?with_internal_neon:%exclude %{_mandir}/man1/neon*}
424
425 %files libs
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/lib*.so.*
428
429 %files devel
430 %defattr(644,root,root,755)
431 %{_includedir}/%{name}*
432 %attr(755,root,root) %{_libdir}/lib*.so
433 %{_libdir}/lib*.la
434 %{_infodir}/svn*
435 %{_examplesdir}/%{name}-%{version}
436
437 %files static
438 %defattr(644,root,root,755)
439 %{_libdir}/lib*.a
440
441 %if !%{with net_client_only}
442 %files svnserve
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_bindir}/svnserve
445 %{_mandir}/man?/svnserve*
446 %if %{with apache}
447 %attr(754,root,root) /etc/rc.d/init.d/svnserve
448 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
449 %endif
450
451 %files tools
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_bindir}/svn-hot-backup
454 /etc/bash_completion.d/%{name}
455
456 %if %{with python}
457 %files -n python-subversion
458 %defattr(644,root,root,755)
459 %doc tools/backup/*.py tools/examples/*.py
460 %dir %{py_sitedir}/svn
461 %dir %{py_sitedir}/libsvn
462 %{py_sitedir}/svn/*.py[co]
463 %{py_sitedir}/libsvn/*.py[co]
464 %attr(755,root,root) %{py_sitedir}/libsvn/*.so
465 %{_examplesdir}/python-%{name}-%{version}
466 %endif
467
468 %if %{with perl}
469 %files -n perl-subversion
470 %defattr(644,root,root,755)
471 %{perl_vendorarch}/SVN
472 %dir %{perl_vendorarch}/auto/SVN
473 %dir %{perl_vendorarch}/auto/SVN/*
474 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
475 %{perl_vendorarch}/auto/SVN/*/*.bs
476 %{_mandir}/man3/*.3pm*
477 %endif
478
479 %if %{with apache}
480 %files -n apache-mod_dav_svn
481 %defattr(644,root,root,755)
482 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
483 %attr(755,root,root) %{_apachelibdir}/mod_dav_svn.so
484
485 %files -n apache-mod_authz_svn
486 %defattr(644,root,root,755)
487 %doc subversion/mod_authz_svn/INSTALL
488 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
489 %attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
490 %endif
491 %endif
This page took 0.092008 seconds and 2 git commands to generate.