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