]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
- rel 2; play nicely with glens patched apxs (which supports DESTDIR on it's own)
[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     net_client_only                 # build only net client
8 %bcond_without  python                          # build without python bindings
9 %bcond_without  perl                            # build without perl bindings
10 %bcond_without  apache                          # build without apache support (webdav, etc)
11 #
12 %{!?with_net_client_only:%include       /usr/lib/rpm/macros.perl}
13 Summary:        A Concurrent Versioning system similar to but better than CVS
14 Summary(pl):    System kontroli wersji podobny, ale lepszy, ni¿ CVS
15 Summary(pt_BR): Sistema de versionamento concorrente
16 Name:           subversion
17 Version:        1.3.0
18 Release:        2
19 License:        Apache/BSD Style
20 Group:          Development/Version Control
21 Source0:        http://subversion.tigris.org/downloads/%{name}-%{version}.tar.gz
22 # Source0-md5:  0d91a7fe152d0373044c47c54deb2c9a
23 Source1:        %{name}-dav_svn.conf
24 Source2:        %{name}-authz_svn.conf
25 Source3:        %{name}-svnserve.init
26 Source4:        %{name}-svnserve.sysconfig
27 Patch0:         %{name}-home_etc.patch
28 URL:            http://subversion.tigris.org/
29 %if %{with net_client_only}
30 %global apache_modules_api 0
31 %else
32 %{?with_apache:BuildRequires:   apache-devel >= 2.2.0-8}
33 BuildRequires:  automake
34 BuildRequires:  db-devel >= 4.1.25
35 BuildRequires:  rpmbuild(macros) >= 1.120
36 %if %{with perl}
37 BuildRequires:  perl-devel >= 1:5.8.0
38 BuildRequires:  rpm-perlprov >= 4.1-13
39 BuildRequires:  swig-perl >= 1.3.24
40 %endif
41 %endif
42 BuildRequires:  apr-devel >= 1:1.0.0
43 BuildRequires:  apr-util-devel >= 1:1.0.0
44 BuildRequires:  autoconf >= 2.59
45 BuildRequires:  bison
46 BuildRequires:  expat-devel
47 BuildRequires:  gettext-devel
48 BuildRequires:  libtool >= 1.4-9
49 BuildRequires:  neon-devel >= 0.24.7
50 %if %{with python}
51 BuildRequires:  python-devel >= 2.2
52 BuildRequires:  python-modules >= 2.2
53 BuildRequires:  python >= 2.2
54 BuildRequires:  sed >= 4.0
55 BuildRequires:  swig-python >= 1.3.24
56 %endif
57 BuildRequires:  texinfo
58 BuildRequires:  which
59 Requires:       %{name}-libs = %{version}-%{release}
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %define         _apachelibdir   /usr/%{_lib}/apache
63 %define         _libexecdir     %{_libdir}/svn
64
65 %description
66 The goal of the Subversion project is to build a version control
67 system that is a compelling replacement for CVS in the open source
68 community.
69
70 Our goals are:
71 - All current CVS features.
72 - Directories, renames, and file meta-data are versioned.
73 - Symbolic links, etc, are supported
74 - Commits are truly atomic.
75 - Branching and tagging are cheap (constant time) operations
76 - Repeated merges are handled gracefully
77 - Support for plug-in client side diff programs
78 - Natively client/server
79 - Client/server protocol sends diffs in both directions
80 - Costs are proportional to change size, not project size
81 - Internationalization
82 - Progressive multi-lingual support
83
84 %description -l pl
85 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
86 zamiennika dla CVS.
87
88 Cele projektu to:
89 - Wszystkie aktualne mo¿liwo¶ci CVS.
90 - Katalogi, zmiany nazw oraz meta-dane plików s± wersjonowane.
91 - Wsparcie dla linków symbolicznych itp.
92 - Commity s± w pe³ni atomowe.
93 - Branchowanie oraz tagowanie s± tanimi (sta³ymi w czasie) operacjami.
94 - Powtarzaj±ce merge.
95 - Wsparcie dla pluginów diff'a po stronie klienta.
96 - Natywny klient/serwer.
97 - Klient/Serwer przesy³aj± diffy w obu kierunkach.
98 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
99 - Internacjonalizacja.
100 - Postêpuj±ce wsparcie dla wielu jêzyków.
101
102 %description -l pt_BR
103 O objetivo do projeto Subversion é construir um sistema de controle de
104 versões que seja um substituto para o CVS (Concurrent Versioning
105 System) na comunidade opensource, fornecendo grandes melhorias.
106
107 %package libs
108 Summary:        Subversion libraries and modules
109 Summary(pl):    Biblioteka subversion oraz ³adowalne modu³y
110 Group:          Libraries
111 Obsoletes:      libsubversion0
112 Requires:       neon >= 0.24.7
113
114 %description libs
115 Subversion libraries and modules.
116
117 %description libs -l pl
118 Biblioteka subversion oraz ³adowalne modu³y.
119
120 %package devel
121 Summary:        Header files and develpment documentation for subversion
122 Summary(pl):    Pliki nag³ówkowe i dokumetacja do subversion
123 Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
124 Group:          Development/Libraries
125 Requires:       %{name}-libs = %{version}-%{release}
126 Requires:       apr-util-devel >= 1:1.0.0
127 Requires:       neon-devel >= 0.24.7
128 Obsoletes:      libsubversion0-devel
129
130 %description devel
131 Header files and develpment documentation for subversion.
132
133 %description devel -l pl
134 Pliki nag³ówkowe i dokumetacja do subversion.
135
136 %description devel -l pt_BR
137 Este pacote provê os arquivos necessários para desenvolvedores
138 interagirem com o Subversion.
139
140 %package static
141 Summary:        Static subversion library
142 Summary(pl):    Biblioteka statyczna subversion
143 Summary(pt_BR): Sistema de versionamento concorrente
144 Group:          Development/Libraries
145 Requires:       %{name}-devel = %{version}
146 Obsoletes:      libsubversion0-static-devel
147
148 %description static
149 Static subversion library.
150
151 %description static -l pl
152 Biblioteka statyczna subversion.
153
154 %description static -l pt_BR
155 Este pacote provê um cliente estático do subversion.
156
157 %package svnserve
158 Summary:        Subversion svnserve
159 Summary(pl):    Subversion svnserve
160 Group:          Networking/Daemons
161 Requires(post,preun):   /sbin/chkconfig
162 Requires:       %{name} = %{version}-%{release}
163 Requires:       rc-scripts
164
165 %description svnserve
166 Subversion svnserve server.
167
168 %description svnserve -l pl
169 Serwer subversion svnserve.
170
171 %package tools
172 Summary:        Subversion tools and scripts
173 Summary(pl):    Narzêdzia oraz skrypty dla subversion
174 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
175 Group:          Applications
176 %pyrequires_eq  python
177 Requires:       %{name} = %{version}-%{release}
178 Requires:       python-rcsparse >= 0.1-0.20031026.0
179 Requires:       python-subversion = %{version}
180
181 %description tools
182 Subversion tools and scripts.
183
184 %description tools -l pl
185 Narzêdzia oraz skrypty dla subversion.
186
187 %package -n bash-completion-subversion
188 Summary:        bash completion for subversion
189 Summary(pl):    Dope³nienia basha dla subversion
190 Group:          Applications/Shells
191 Requires:       bash-completion
192 Requires:       %{name} = %{version}-%{release}
193 Conflicts:      %{name}-tools <= 1.1.0-0.rc6.1
194
195 %description -n bash-completion-subversion
196 Bash completion for subversion.
197
198 %description -n bash-completion-subversion -l pl
199 Dope³nienia basha dla subversion.
200
201 %package -n python-subversion
202 Summary:        Subversion python bindings
203 Summary(pl):    Dowi±zania do subversion dla pythona
204 Summary(pt_BR): Módulos python para acessar os recursos do Subversion
205 Group:          Development/Languages/Python
206 %pyrequires_eq  python
207 Obsoletes:      subversion-python
208 Requires:       %{name}-libs = %{version}-%{release}
209
210 %description -n python-subversion
211 Subversion python bindings.
212
213 %description -n python-subversion -l pl
214 Dowi±zania do subversion dla pythona.
215
216 %description -n python-subversion -l pt_BR
217 Módulos python para acessar os recursos do Subversion.
218
219 %package -n perl-subversion
220 Summary:        Subversion perl bindings
221 Summary(pl):    Dowi±zania do subversion dla perla
222 Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
223 Group:          Development/Languages/Perl
224 Obsoletes:      subversion-perl
225 Requires:       %{name}-libs = %{version}-%{release}
226
227 %description -n perl-subversion
228 Subversion perl bindings.
229
230 %description -n perl-subversion -l pl
231 Dowi±zania do subversion dla perl.
232
233 %description -n perl-subversion -l pt_BR
234 Módulos perl para acessar os recursos do Subversion.
235
236 %package -n apache-mod_dav_svn
237 Summary:        Apache module: Subversion Server
238 Summary(pl):    Modu³ apache: Serwer Subversion
239 Group:          Networking/Daemons
240 Requires:       %{name} = %{version}-%{release}
241 Requires:       apache(modules-api) = %{apache_modules_api}
242 Requires:       apache-mod_dav
243 Requires:       apache >= 2.0.47
244
245 %description -n apache-mod_dav_svn
246 Apache module: Subversion Server.
247
248 %description -n apache-mod_dav_svn -l pl
249 Modu³ apache: Serwer Subversion.
250
251 %package -n apache-mod_authz_svn
252 Summary:        Apache module: Subversion Server - path-based authorization
253 Summary(pl):    Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
254 Group:          Networking/Daemons
255 Requires:       apache(modules-api) = %{apache_modules_api}
256 Requires:       apache-mod_dav_svn = %{version}-%{release}
257 Requires:       apache >= 2.0.47
258
259 %description -n apache-mod_authz_svn
260 Apache module: Subversion Server - path-based authorization.
261
262 %description -n apache-mod_authz_svn -l pl
263 Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion.
264
265 %prep
266 %setup -q
267 rm -rf apr apr-util neon
268 %patch0 -p0
269
270 %build
271 cp -f /usr/share/automake/config.sub ac-helpers
272 chmod +x ./autogen.sh && ./autogen.sh
273
274 # don't enable dso - currently it's broken
275 %configure \
276         --with-editor=vi \
277         --with-zlib \
278         --with-python=%{_bindir}/python \
279         --with-perl5=%{_bindir}/perl \
280 %if %{with net_client_only}
281         --without-apache \
282         --without-swig \
283         --without-apxs \
284         --without-berkeley-db \
285 %else
286         --disable-dso \
287         --disable-mod-activation \
288 %if %{with apache}
289         --with-apxs=%{_sbindir}/apxs \
290 %else
291         --without-apache \
292         --without-apxs \
293         --with-berkeley-db=%{_includedir}/db4:%{_libdir} \
294 %endif
295 %if !%{with python} && !%{with perl}
296         --without-swig \
297 %endif
298 %endif
299         --with-neon=%{_prefix} \
300         --with-apr=%{_bindir}/apr-1-config \
301         --with-apr-util=%{_bindir}/apu-1-config
302
303 %{__make}
304
305 %if !%{with net_client_only}
306 # python
307 %if %{with python}
308 %{__make} swig-py \
309         swig_pydir=%{py_sitedir}/libsvn \
310         swig_pydir_extra=%{py_sitedir}/svn
311 %endif
312 # perl
313 %if %{with perl}
314 %{__make} swig-pl-lib
315 odir=$(pwd)
316 cd subversion/bindings/swig/perl/native
317 %{__perl} Makefile.PL INSTALLDIRS=vendor
318 %{__make}
319 cd $odir
320 %endif
321 %endif
322
323 %{__sed} -i -e 's/@SVN_DB_INCLUDES@//g' -e 's/@SVN_DB_LIBS@//g' svn-config
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         $RPM_BUILD_ROOT/home/services/subversion{,/repos}
331
332 %{__make} install \
333 %if !%{with net_client_only} && %{with python}
334         install-swig-py \
335 %endif
336         APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
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-config
429 %exclude %{_bindir}/svn-hot-backup
430 %{_mandir}/man1/*
431 %{_mandir}/man5/*
432 %{_mandir}/man8/*
433 %exclude %{_mandir}/man?/svnserve*
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 %{without 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
512 %endif # net_client_only
This page took 0.10408 seconds and 4 git commands to generate.