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