]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
- no ruby-devel on x32
[packages/subversion.git] / subversion.spec
1 # Conditional build:
2 %bcond_with     net_client_only         # build only net client
3 %bcond_without  swig                    # disable bindings generation with Swig
4 %bcond_without  python                  # build without Python bindings (broken)
5 %bcond_without  csvn                    # build Python csvn bindings
6 %bcond_without  perl                    # build without Perl bindings
7 %bcond_without  ruby                    # build without Ruby bindings
8 %bcond_without  apache                  # build without Apache support (webdav, etc)
9 %bcond_without  java                    # build without javahl support (Java high-level bindings)
10 %bcond_without  tests                   # don't perform "make check"
11 %bcond_without  kwallet                 # build without kde4 wallet support
12 %bcond_without  kde                     # build without kde4 support (alias for kwallet)
13 %bcond_without  gnome                   # build without gnome keyring support
14 %bcond_without  db                      # disable Subversion Berkeley DB based filesystem library
15 %bcond_with     db6                     # allow BDB6 (not tested by upstream, released on AGPL)
16
17 # for AC: --without csvn,gnome,java,kde,ruby
18
19 %ifarch x32
20 %undefine       with_ruby
21 %endif
22
23 %if %{with net_client_only}
24 %undefine       with_apache
25 %undefine       with_db
26 %undefine       with_swig
27 %undefine       with_java
28 %undefine       with_csvn
29 %undefine       with_gnome
30 %undefine       with_kde
31 %endif
32
33 %if %{without swig}
34 %undefine       with_perl
35 %undefine       with_python
36 %undefine       with_ruby
37 %endif
38
39 %if %{without kde}
40 %undefine       with_kwallet
41 %endif
42
43 %if %{without python} && %{without perl} && %{without ruby}
44 %undefine       with_swig
45 %endif
46
47 %define apxs    /usr/sbin/apxs
48 %define pdir    SVN
49 %define pnam    _Core
50
51 %{?with_perl:%include   /usr/lib/rpm/macros.perl}
52 Summary:        A Concurrent Versioning system similar to but better than CVS
53 Summary(pl.UTF-8):      System kontroli wersji podobny, ale lepszy, niż CVS
54 Summary(pt_BR.UTF-8):   Sistema de versionamento concorrente
55 Name:           subversion
56 Version:        1.8.11
57 Release:        1
58 License:        Apache v2.0
59 Group:          Development/Version Control
60 Source0:        http://www.apache.org/dist/subversion/%{name}-%{version}.tar.bz2
61 # Source0-md5:  766a89bbbb388f8eb76166672d3b9e49
62 Source1:        %{name}-dav_svn.conf
63 Source2:        %{name}-authz_svn.conf
64 Source3:        %{name}-svnserve.init
65 Source4:        %{name}-svnserve.sysconfig
66 # current subversion tarball has correct *.swg files
67 # but after regeneration these are broken again, so
68 # we still need this script
69 Source5:        %{name}-convert-typemaps-to-ifdef.py
70 Patch0:         %{name}-home_etc.patch
71 Patch1:         %{name}-DESTDIR.patch
72 Patch2:         %{name}-ruby-datadir-path.patch
73 Patch3:         %{name}-tests.patch
74 URL:            http://subversion.apache.org/
75 %{?with_apache:BuildRequires:   apache-devel >= 2.2.0-8}
76 BuildRequires:  apr-devel >= 1:1.0.0
77 BuildRequires:  apr-util-devel >= 1:1.2.8-3
78 BuildRequires:  autoconf >= 2.59
79 BuildRequires:  automake
80 BuildRequires:  bison
81 BuildRequires:  cyrus-sasl-devel
82 %if %{with kwallet} || %{with gnome}
83 BuildRequires:  dbus-devel
84 %endif
85 BuildRequires:  db-devel >= 4.1.25
86 %{!?with_db6:BuildRequires:     db-devel < 6}
87 BuildRequires:  expat-devel
88 BuildRequires:  gettext-tools
89 %{?with_kwallet:BuildRequires:  kde4-kdelibs-devel}
90 %{?with_gnome:BuildRequires:    libgnome-keyring-devel}
91 BuildRequires:  libmagic-devel
92 BuildRequires:  libtool >= 1.4-9
93 BuildRequires:  pkgconfig
94 %{?with_csvn:BuildRequires:     python-ctypesgen}
95 BuildRequires:  rpm-pythonprov
96 BuildRequires:  rpmbuild(macros) >= 1.656
97 BuildRequires:  sed >= 4.0
98 BuildRequires:  serf-devel >= 1.2.1
99 BuildRequires:  sqlite3-devel >= 3.6.18
100 BuildRequires:  texinfo
101 BuildRequires:  which
102 %if %{with java}
103 BuildRequires:  jdk >= 1.5
104 BuildRequires:  libstdc++-devel
105 %endif
106 %if %{with perl}
107 BuildRequires:  perl-devel >= 1:5.8.0
108 BuildRequires:  rpm-perlprov >= 4.1-13
109 BuildRequires:  swig-perl >= 1.3.24
110 %endif
111 %if %{with python}
112 BuildRequires:  python-devel >= 1:2.4
113 BuildRequires:  swig-python >= 1.3.24
114 %endif
115 %if %{with ruby}
116 BuildRequires:  rpm-rubyprov
117 BuildRequires:  ruby-devel >= 1:1.8.2
118 BuildRequires:  ruby-irb
119 BuildRequires:  ruby-rubygems
120 BuildRequires:  swig-ruby >= 1.3.24
121 %endif
122 Requires:       %{name}-libs = %{version}-%{release}
123 %requires_ge    sqlite3
124 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
125
126 %define         _libexecdir             %{_libdir}/svn
127 %define         apacheconfdir   %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
128 %define         apachelibdir    %(%{apxs} -q LIBEXECDIR 2>/dev/null)
129
130 %define         skip_post_check_so      libsvn_swig_py-1.so.* libsvn_swig_perl-1.so.*
131
132 %description
133 The goal of the Subversion project is to build a version control
134 system that is a compelling replacement for CVS in the open source
135 community.
136
137 Our goals are:
138 - All current CVS features.
139 - Directories, renames, and file meta-data are versioned.
140 - Symbolic links, etc, are supported
141 - Commits are truly atomic.
142 - Branching and tagging are cheap (constant time) operations
143 - Repeated merges are handled gracefully
144 - Support for plug-in client side diff programs
145 - Natively client/server
146 - Client/server protocol sends diffs in both directions
147 - Costs are proportional to change size, not project size
148 - Internationalization
149 - Progressive multi-lingual support
150
151 %description -l pl.UTF-8
152 Celem projektu Subversion jest stworzenie systemu kontroli wersji jako
153 zamiennika dla CVS.
154
155 Cele projektu to:
156 - Wszystkie aktualne możliwości CVS.
157 - Katalogi, zmiany nazw oraz metadane plików są wersjonowane.
158 - Obsługa dowiązań symbolicznych itp.
159 - Commity są w pełni atomowe.
160 - Branchowanie oraz tagowanie są tanimi (stałymi w czasie) operacjami.
161 - Dobra obsługa powtarzanego łączenia (merge).
162 - Obsługa wtyczek diff po stronie klienta.
163 - Natywny klient/serwer.
164 - Klient/Serwer przesyłają diffy w obu kierunkach.
165 - Koszty proporcjonalne do rozmiaru zmiany, a nie rozmiaru projektu.
166 - Internacjonalizacja.
167 - Postępujące wsparcie dla wielu języków.
168
169 %description -l pt_BR.UTF-8
170 O objetivo do projeto Subversion é construir um sistema de controle de
171 versões que seja um substituto para o CVS (Concurrent Versioning
172 System) na comunidade opensource, fornecendo grandes melhorias.
173
174 %package libs
175 Summary:        Subversion libraries and modules
176 Summary(pl.UTF-8):      Biblioteka subversion oraz ładowalne moduły
177 Group:          Libraries
178 Requires:       serf >= 1.2.1
179 Obsoletes:      libsubversion0
180
181 %description libs
182 Subversion libraries and modules.
183
184 %description libs -l pl.UTF-8
185 Biblioteka subversion oraz ładowalne moduły.
186
187 %package devel
188 Summary:        Header files and develpment documentation for subversion
189 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumetacja do subversion
190 Summary(pt_BR.UTF-8):   Arquivos de desenvolvimento para o Subversion
191 Group:          Development/Libraries
192 Requires:       %{name}-libs = %{version}-%{release}
193 Requires:       apr-util-devel >= 1:1.0.0
194 Requires:       serf-devel >= 1.2.1
195 Obsoletes:      libsubversion0-devel
196
197 %description devel
198 Header files and develpment documentation for subversion.
199
200 %description devel -l pl.UTF-8
201 Pliki nagłówkowe i dokumetacja do subversion.
202
203 %description devel -l pt_BR.UTF-8
204 Este pacote provê os arquivos necessários para desenvolvedores
205 interagirem com o Subversion.
206
207 %package static
208 Summary:        Static subversion library
209 Summary(pl.UTF-8):      Biblioteka statyczna subversion
210 Summary(pt_BR.UTF-8):   Sistema de versionamento concorrente
211 Group:          Development/Libraries
212 Requires:       %{name}-devel = %{version}
213 Obsoletes:      libsubversion0-static-devel
214
215 %description static
216 Static subversion library.
217
218 %description static -l pl.UTF-8
219 Biblioteka statyczna subversion.
220
221 %description static -l pt_BR.UTF-8
222 Este pacote provê um cliente estático do subversion.
223
224 %package svnserve
225 Summary:        Subversion svnserve
226 Summary(pl.UTF-8):      Subversion svnserve
227 Group:          Networking/Daemons
228 Requires(post,preun):   /sbin/chkconfig
229 Requires(postun):       /usr/sbin/groupdel
230 Requires(postun):       /usr/sbin/userdel
231 Requires(pre):  /bin/id
232 Requires(pre):  /usr/bin/getgid
233 Requires(pre):  /usr/lib/rpm/user_group.sh
234 Requires(pre):  /usr/sbin/groupadd
235 Requires(pre):  /usr/sbin/useradd
236 Requires(pre):  /usr/sbin/usermod
237 Requires:       %{name} = %{version}-%{release}
238 Requires:       rc-scripts
239 Provides:       group(svn)
240 Provides:       user(svn)
241
242 %description svnserve
243 Subversion svnserve server.
244
245 %description svnserve -l pl.UTF-8
246 Serwer subversion svnserve.
247
248 %package tools
249 Summary:        Subversion tools and scripts
250 Summary(pl.UTF-8):      Narzędzia oraz skrypty dla subversion
251 Summary(pt_BR.UTF-8):   Módulos python para acessar os recursos do Subversion
252 Group:          Applications
253 Requires:       %{name} = %{version}-%{release}
254 Requires:       python
255 Requires:       python-subversion = %{version}
256
257 %description tools
258 Subversion tools and scripts.
259
260 %description tools -l pl.UTF-8
261 Narzędzia oraz skrypty dla subversion.
262
263 %package -n bash-completion-subversion
264 Summary:        bash completion for subversion
265 Summary(pl.UTF-8):      Dopełnienia basha dla subversion
266 Group:          Applications/Shells
267 Requires:       %{name} = %{version}-%{release}
268 Requires:       bash-completion
269 Conflicts:      %{name}-tools <= 1.1.0-0.rc6.1
270 %if "%{_rpmversion}" >= "5"
271 BuildArch:      noarch
272 %endif
273
274 %description -n bash-completion-subversion
275 Bash completion for subversion.
276
277 %description -n bash-completion-subversion -l pl.UTF-8
278 Dopełnienia basha dla subversion.
279
280 %package -n java-subversion
281 Summary:        Subversion Java bindings
282 Summary(pl.UTF-8):      Dowiązania do Subversion dla Javy
283 Group:          Development/Languages/Java
284 Requires:       %{name}-libs = %{version}-%{release}
285
286 %description -n java-subversion
287 This is a set of Java classes which provide the functionality of
288 subversion-libs, the Subversion libraries. It is useful if you want
289 to, for example, write a Java class that manipulates a Subversion
290 repository or working copy. See the 'subversion' package for more
291 information.
292
293 %description -n java-subversion -l pl.UTF-8
294 Ten pakiet zawiera zestaw klas Javy udostępniających funkcjonalność
295 subversion-libs, czyli bibliotek Subversion. Jest przydatny przy
296 pisaniu klas Javy np. modyfikujących repozytorium Subversion lub kopię
297 roboczą. Więcej informacji w pakiecie subversion.
298
299 %package -n python-subversion
300 Summary:        Subversion Python bindings
301 Summary(pl.UTF-8):      Dowiązania do Subversion dla Pythona
302 Summary(pt_BR.UTF-8):   Módulos Python para acessar os recursos do Subversion
303 Group:          Development/Languages/Python
304 Requires:       %{name}-libs = %{version}-%{release}
305 Requires:       python
306 Obsoletes:      subversion-python
307
308 %description -n python-subversion
309 Subversion Python bindings.
310
311 %description -n python-subversion -l pl.UTF-8
312 Dowiązania do Subversion dla Pythona.
313
314 %description -n python-subversion -l pt_BR.UTF-8
315 Módulos Python para acessar os recursos do Subversion.
316
317 %package -n python-csvn
318 Summary:        CTypes Subversion Python bindings
319 Summary(pl.UTF-8):      Dowiązania do Subversion dla Pythona
320 Summary(pt_BR.UTF-8):   Módulos Python para acessar os recursos do Subversion
321 Group:          Development/Languages/Python
322 Requires:       %{name}-libs = %{version}-%{release}
323 Requires:       python
324
325 %description -n python-csvn
326 Subversion CTypes Python bindings.
327
328 %description -n python-csvn -l pl.UTF-8
329 Dowiązania do Subversion dla Pythona używające CTypes.
330
331 %description -n python-csvn -l pt_BR.UTF-8
332 Módulos Python para acessar os recursos do Subversion.
333
334 %package -n perl-subversion
335 Summary:        Subversion Perl bindings
336 Summary(pl.UTF-8):      Dowiązania do Subversion dla Perla
337 Summary(pt_BR.UTF-8):   Módulos Perl para acessar os recursos do Subversion
338 Group:          Development/Languages/Perl
339 Requires:       %{name}-libs = %{version}-%{release}
340 Obsoletes:      subversion-perl
341
342 %description -n perl-subversion
343 Subversion Perl bindings.
344
345 %description -n perl-subversion -l pl.UTF-8
346 Dowiązania do Subversion dla Perla.
347
348 %description -n perl-subversion -l pt_BR.UTF-8
349 Módulos Perl para acessar os recursos do Subversion.
350
351 %package -n ruby-subversion
352 Summary:        Subversion Ruby bindings
353 Summary(pl.UTF-8):      Dowiązania do Subversion dla języka Ruby
354 Summary(pt_BR.UTF-8):   Módulos Ruby para acessar os recursos do Subversion
355 Group:          Development/Languages
356 Requires:       %{name}-libs = %{version}-%{release}
357 Obsoletes:      subversion-ruby
358
359 %description -n ruby-subversion
360 Subversion Ruby bindings.
361
362 %description -n ruby-subversion -l pl.UTF-8
363 Dowiązania do Subversion dla języka Ruby.
364
365 %description -n ruby-subversion -l pt_BR.UTF-8
366 Módulos Ruby para acessar os recursos do Subversion.
367
368 %package -n apache-mod_dav_svn
369 Summary:        Apache module: Subversion Server
370 Summary(pl.UTF-8):      Moduł Apache'a: serwer Subversion
371 Group:          Networking/Daemons
372 Requires:       %{name} = %{version}-%{release}
373 Requires:       apache(modules-api) = %apache_modules_api
374 Requires:       apache-mod_dav
375
376 %description -n apache-mod_dav_svn
377 Apache module: Subversion Server.
378
379 %description -n apache-mod_dav_svn -l pl.UTF-8
380 Moduł Apache'a: serwer Subversion.
381
382 %package -n apache-mod_authz_svn
383 Summary:        Apache module: Subversion Server - path-based authorization
384 Summary(pl.UTF-8):      Moduł Apache'a: autoryzacja na podstawie ścieżki dla serwera Subversion
385 Group:          Networking/Daemons
386 Requires:       %{name}-libs = %{version}-%{release}
387 Requires:       apache(modules-api) = %apache_modules_api
388 Requires:       apache-mod_dav_svn = %{version}-%{release}
389
390 %description -n apache-mod_authz_svn
391 Apache module: Subversion Server - path-based authorization.
392
393 %description -n apache-mod_authz_svn -l pl.UTF-8
394 Moduł Apache'a: autoryzacja na podstawie ścieżki dla serwera
395 Subversion.
396
397 %package -n apache-mod_dontdothat_svn
398 Summary:        Apache module: Allows you to block specific svn requests
399 Summary(pl.UTF-8):      Moduł Apache'a pozwalający na blokowanie pewnych zapytań svn
400 Group:          Networking/Daemons
401 Requires:       %{name}-libs = %{version}-%{release}
402 Requires:       apache(modules-api) = %apache_modules_api
403 Requires:       apache-mod_dav_svn = %{version}-%{release}
404
405 %description -n apache-mod_dontdothat_svn
406 Apache module: Allows you to block specific svn requests.
407
408 %description -n apache-mod_dontdothat_svn -l pl.UTF-8
409 Moduł Apache'a pozwalający na blokowanie pewnych zapytań svn.
410
411 %package -n gnome-keyring-subversion
412 Summary:        GNOME Keyring authentication provider for Subversion
413 Summary(pl.UTF-8):      Moduł uwierzytelniający GNOME Keyring dla Subversion
414 Group:          X11/Applications
415 Requires:       %{name}-libs = %{version}-%{release}
416
417 %description -n gnome-keyring-subversion
418 Authentication provider module for Subversion which allows SVN client
419 to authenticate using GNOME Keyring.
420
421 %description -n gnome-keyring-subversion -l pl.UTF-8
422 Moduł uwierzytelniający dla Subversion pozwalający klientom SVN
423 uwierzytelniać się przy użyciu mechanizmu GNOME Keyring.
424
425 %package -n kde4-kwallet-subversion
426 Summary:        KDE Wallet authentication provider for Subversion
427 Summary(pl.UTF-8):      Moduł uwierzytelniający dla Subversion wykorzystujący Portfel KDE
428 Group:          X11/Applications
429 Requires:       %{name}-libs = %{version}-%{release}
430
431 %description -n kde4-kwallet-subversion
432 Authentication provider module for Subversion which allows SVN client
433 to authenticate using KDE Wallet.
434
435 %description -n kde4-kwallet-subversion -l pl.UTF-8
436 Moduł uwierzytelniający dla Subversion pozwalający klientom SVN
437 uwierzytelniać się przy użyciu Portfela KDE.
438
439 %prep
440 %setup -q
441 %patch0 -p0
442 %patch1 -p1
443 %patch2 -p0
444 %patch3 -p1
445
446 sed -i -e 's#serf_prefix/lib#serf_prefix/%{_lib}#g' build/ac-macros/serf.m4
447
448 %build
449 # disabled regeneration - subversion 1.6.13 is not ready for swig 2.0.x
450 #%{__rm} subversion/bindings/swig/proxy/*.swg
451 #cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
452 chmod +x ./autogen.sh && ./autogen.sh
453 %{__libtoolize}
454 %configure \
455         --with-editor=vi \
456         --with-zlib=%{_libdir} \
457         --disable-runtime-module-search \
458         --disable-mod-activation \
459 %if %{with db}
460         --with-berkeley-db="db.h:%{_includedir}:%{_libdir}:db" \
461         %{?with_db6:--enable-bdb6} \
462 %else
463         --without-berkeley-db \
464 %endif
465 %if %{with apache}
466         --with-apache-libexecdir="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
467         --with-apxs=%{_sbindir}/apxs \
468 %else
469         --without-apxs \
470 %endif
471 %if %{without swig}
472         --without-swig \
473 %endif
474 %if %{with ruby}
475         svn_cv_ruby_sitedir_libsuffix="" \
476         svn_cv_ruby_sitedir_archsuffix="" \
477         --with-ruby-sitedir=%{ruby_vendorarchdir} \
478 %else
479         ac_cv_path_RUBY=none \
480 %endif
481 %if %{with csvn}
482         --with-ctypesgen=%{_bindir}/ctypesgen.py \
483 %endif
484 %if %{with java}
485         --enable-javahl \
486         --with-jdk="%{java_home}" \
487         --without-jikes \
488 %else
489         --disable-javahl \
490 %endif
491         --with-serf=%{_prefix} \
492         --with-apr=%{_bindir}/apr-1-config \
493         --with-apr-util=%{_bindir}/apu-1-config \
494 %if %{with kwallet}
495         --with-kwallet \
496 %endif
497 %if %{with gnome}
498         --with-gnome-keyring
499 %endif
500
501 %{__make} -j1
502
503 %{__make} tools
504
505 %if %{with csvn}
506 # Python ctypes bindings
507 %{__make} ctypes-python
508 %endif
509 %if %{with python}
510 # Python swig bindings
511 %{__make} swig-py \
512         swig_pydir=%{py_sitedir}/libsvn \
513         swig_pydir_extra=%{py_sitedir}/svn
514 %endif
515 %if %{with perl}
516 # Perl swig bindings
517 %{__make} -j1 swig-pl-lib
518 cd subversion/bindings/swig/perl/native
519 %{__perl} Makefile.PL INSTALLDIRS=vendor
520 %{__make} -j1
521 cd -
522 %endif
523 %if %{with java}
524 %{__make} -j1 javahl \
525         javahl_javadir="%{_javadir}"
526 %endif
527 # ruby
528 %if %{with ruby}
529 %{__make} swig-rb
530 %endif
531
532 %if %{with tests}
533 %{__make} -j1 check
534 %if %{with csvn}
535 %{__make} -j1 check-ctypes-python
536 %endif
537 %if %{with python}
538 %{__make} -j1 check-swig-py
539 %endif
540 %if %{with perl}
541 %{__make} -j1 check-swig-pl
542 %endif
543 %if %{with ruby}
544 # disabled, see https://bugs.launchpad.net/pld-linux/+bug/734340
545 #%{__make} check-swig-rb
546 %endif
547 %endif
548
549 %install
550 rm -rf $RPM_BUILD_ROOT
551 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
552         $RPM_BUILD_ROOT{%{apacheconfdir},%{apachelibdir},%{_infodir}} \
553         $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
554         $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
555         $RPM_BUILD_ROOT/home/services/subversion{,/repos}
556
557 %{__make} install -j1 \
558         toolsdir=%{_bindir} \
559         DESTDIR=$RPM_BUILD_ROOT \
560         APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
561 %if %{with java}
562         install-javahl \
563         javahl_javadir="%{_javadir}" \
564 %endif
565 %if %{with python}
566         install-swig-py \
567         swig_pydir=%{py_sitedir}/libsvn \
568         swig_pydir_extra=%{py_sitedir}/svn \
569 %endif
570 %if %{with csvn}
571         install-ctypes-python \
572 %endif
573         install-tools
574
575 %if %{with ruby}
576 %{__make} install -j1 \
577         SWIG_RB_RI_DATADIR=$RPM_BUILD_ROOT%{ruby_ridir} \
578         DESTDIR=$RPM_BUILD_ROOT \
579         install-swig-rb install-swig-rb-doc
580
581 # not our package
582 %{__rm} -r $RPM_BUILD_ROOT%{ruby_ridir}/OptionParser
583 %{__rm} -r $RPM_BUILD_ROOT%{ruby_ridir}/Time
584 %if "%{ruby_version}" >= "2.0"
585 %{__rm} -r $RPM_BUILD_ROOT%{ruby_ridir}/File
586 %endif
587 %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri
588 %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid
589 %endif
590
591 %if %{with perl}
592 %{__make} install-swig-pl-lib \
593         DESTDIR=$RPM_BUILD_ROOT
594 %{__make} -C subversion/bindings/swig/perl/native install \
595         DESTDIR=$RPM_BUILD_ROOT \
596         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
597         LIBDIR=$RPM_BUILD_ROOT%{_libdir}
598 %endif
599
600 %if %{with apache}
601 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/65_mod_dav_svn.conf
602 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/66_mod_authz_svn.conf
603 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
604 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
605 %endif
606
607 %if %{without net_client_only}
608 install -p tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
609 %endif
610
611 # rename not to conflict with standard packages. (are these needed at all?)
612 mv $RPM_BUILD_ROOT%{_bindir}/{,svn}diff
613 mv $RPM_BUILD_ROOT%{_bindir}/{,svn}diff3
614 mv $RPM_BUILD_ROOT%{_bindir}/{,svn}diff4
615
616 %if %{with python} || %{with csvn}
617 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
618 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
619 %py_postclean
620 %endif
621 %if %{with python}
622 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/libsvn/*.la
623 # .a created on ac only
624 %{__rm} -f $RPM_BUILD_ROOT%{py_sitedir}/libsvn/*.a
625 cp -p tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
626 %endif
627
628 cp -p tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
629 cp -p tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
630
631 %if %{with java}
632 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsvnjavahl*.{la,a}
633 %endif
634 %if %{with swig}
635 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsvn_swig*.{la,a}
636 %if %{with ruby}
637 %{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/svn/ext/*.la
638 %endif
639 %endif
640 %if %{with gnome} || %{with kwallet}
641 # dlopened by soname (libsvn_auth_*-1.so.0)
642 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsvn_auth_*-1.{so,la,a}
643 %endif
644
645 %find_lang %{name}
646
647 %clean
648 rm -rf $RPM_BUILD_ROOT
649
650 %pre svnserve
651 %groupadd -g 86 svn
652 %useradd -u 180 -d /home/services/subversion -c "Subversion svnserve" -g svn svn
653
654 %post   libs -p /sbin/ldconfig
655 %postun libs -p /sbin/ldconfig
656
657 %post   devel -p /sbin/postshell
658 -/usr/sbin/fix-info-dir -c %{_infodir}
659
660 %postun devel -p /sbin/postshell
661 -/usr/sbin/fix-info-dir -c %{_infodir}
662
663 %post   -n java-subversion -p /sbin/ldconfig
664 %postun -n java-subversion -p /sbin/ldconfig
665
666 %post   -n perl-subversion -p /sbin/ldconfig
667 %postun -n perl-subversion -p /sbin/ldconfig
668
669 %post   -n python-subversion -p /sbin/ldconfig
670 %postun -n python-subversion -p /sbin/ldconfig
671
672 %post   -n ruby-subversion -p /sbin/ldconfig
673 %postun -n ruby-subversion -p /sbin/ldconfig
674
675 %post   -n gnome-keyring-subversion -p /sbin/ldconfig
676 %postun -n gnome-keyring-subversion -p /sbin/ldconfig
677
678 %post   -n kde4-kwallet-subversion -p /sbin/ldconfig
679 %postun -n kde4-kwallet-subversion -p /sbin/ldconfig
680
681 %post svnserve
682 /sbin/chkconfig --add svnserve
683 %service svnserve restart "svnserve daemon"
684
685 %preun svnserve
686 if [ "$1" = "0" ]; then
687         %service svnserve stop
688         /sbin/chkconfig --del svnserve
689 fi
690
691 %postun svnserve
692 if [ "$1" = "0" ]; then
693         %userremove svn
694         %groupremove svn
695 fi
696
697 %post -n apache-mod_dav_svn
698 %service -q httpd restart
699
700 %postun -n apache-mod_dav_svn
701 if [ "$1" = "0" ]; then
702         %service -q httpd restart
703 fi
704
705 %post -n apache-mod_authz_svn
706 %service -q httpd restart
707
708 %postun -n apache-mod_authz_svn
709 if [ "$1" = "0" ]; then
710         %service -q httpd restart
711 fi
712
713 %post -n apache-mod_dontdothat_svn
714 %service -q httpd restart
715
716 %postun -n apache-mod_dontdothat_svn
717 if [ "$1" = "0" ]; then
718         %service -q httpd restart
719 fi
720
721 %files
722 %defattr(644,root,root,755)
723 %doc BUGS CHANGES INSTALL README
724 %doc doc/*/*.html
725 %doc tools/hook-scripts/*.{pl,py,example}
726 %doc tools/hook-scripts/mailer/*.{py,example}
727 %doc tools/xslt/*
728 %attr(755,root,root) %{_bindir}/svn
729 %attr(755,root,root) %{_bindir}/svnadmin
730 %attr(755,root,root) %{_bindir}/svndumpfilter
731 %attr(755,root,root) %{_bindir}/svnlook
732 %attr(755,root,root) %{_bindir}/svnmucc
733 %attr(755,root,root) %{_bindir}/svnrdump
734 %attr(755,root,root) %{_bindir}/svnsync
735 %attr(755,root,root) %{_bindir}/svnversion
736 %{_mandir}/man1/svn.1*
737 %{_mandir}/man1/svnadmin.1*
738 %{_mandir}/man1/svndumpfilter.1*
739 %{_mandir}/man1/svnrdump.1*
740 %{_mandir}/man1/svnlook.1*
741 %{_mandir}/man1/svnmucc.1*
742 %{_mandir}/man1/svnsync.1*
743 %{_mandir}/man1/svnversion.1*
744
745 %files libs -f %{name}.lang
746 %defattr(644,root,root,755)
747 %dir %{_sysconfdir}/%{name}
748 %attr(755,root,root) %{_libdir}/libsvn_client-1.so.*.*.*
749 %attr(755,root,root) %ghost %{_libdir}/libsvn_client-1.so.0
750 %attr(755,root,root) %{_libdir}/libsvn_delta-1.so.*.*.*
751 %attr(755,root,root) %ghost %{_libdir}/libsvn_delta-1.so.0
752 %attr(755,root,root) %{_libdir}/libsvn_diff-1.so.*.*.*
753 %attr(755,root,root) %ghost %{_libdir}/libsvn_diff-1.so.0
754 %attr(755,root,root) %{_libdir}/libsvn_fs-1.so.*.*.*
755 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs-1.so.0
756 %if %{without net_client_only}
757 %attr(755,root,root) %{_libdir}/libsvn_fs_base-1.so.*.*.*
758 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_base-1.so.0
759 %endif
760 %attr(755,root,root) %{_libdir}/libsvn_fs_fs-1.so.*.*.*
761 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_fs-1.so.0
762 %attr(755,root,root) %{_libdir}/libsvn_fs_util-1.so.*.*.*
763 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_util-1.so.0
764 %attr(755,root,root) %{_libdir}/libsvn_ra-1.so.*.*.*
765 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra-1.so.0
766 %attr(755,root,root) %{_libdir}/libsvn_ra_local-1.so.*.*.*
767 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_local-1.so.0
768 %attr(755,root,root) %{_libdir}/libsvn_ra_serf-1.so.*.*.*
769 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_serf-1.so.0
770 %attr(755,root,root) %{_libdir}/libsvn_ra_svn-1.so.*.*.*
771 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_svn-1.so.0
772 %attr(755,root,root) %{_libdir}/libsvn_repos-1.so.*.*.*
773 %attr(755,root,root) %ghost %{_libdir}/libsvn_repos-1.so.0
774 %attr(755,root,root) %{_libdir}/libsvn_subr-1.so.*.*.*
775 %attr(755,root,root) %ghost %{_libdir}/libsvn_subr-1.so.0
776 %attr(755,root,root) %{_libdir}/libsvn_wc-1.so.*.*.*
777 %attr(755,root,root) %ghost %{_libdir}/libsvn_wc-1.so.0
778
779 %files devel
780 %defattr(644,root,root,755)
781 %attr(755,root,root) %{_libdir}/libsvn_client-1.so
782 %attr(755,root,root) %{_libdir}/libsvn_delta-1.so
783 %attr(755,root,root) %{_libdir}/libsvn_diff-1.so
784 %attr(755,root,root) %{_libdir}/libsvn_fs-1.so
785 %if %{without net_client_only}
786 %attr(755,root,root) %{_libdir}/libsvn_fs_base-1.so
787 %endif
788 %attr(755,root,root) %{_libdir}/libsvn_fs_fs-1.so
789 %attr(755,root,root) %{_libdir}/libsvn_fs_util-1.so
790 %attr(755,root,root) %{_libdir}/libsvn_ra-1.so
791 %attr(755,root,root) %{_libdir}/libsvn_ra_local-1.so
792 %attr(755,root,root) %{_libdir}/libsvn_ra_serf-1.so
793 %attr(755,root,root) %{_libdir}/libsvn_ra_svn-1.so
794 %attr(755,root,root) %{_libdir}/libsvn_repos-1.so
795 %attr(755,root,root) %{_libdir}/libsvn_subr-1.so
796 %attr(755,root,root) %{_libdir}/libsvn_wc-1.so
797 %{_libdir}/libsvn_client-1.la
798 %{_libdir}/libsvn_delta-1.la
799 %{_libdir}/libsvn_diff-1.la
800 %{_libdir}/libsvn_fs-1.la
801 %if %{without net_client_only}
802 %{_libdir}/libsvn_fs_base-1.la
803 %endif
804 %{_libdir}/libsvn_fs_fs-1.la
805 %{_libdir}/libsvn_fs_util-1.la
806 %{_libdir}/libsvn_ra-1.la
807 %{_libdir}/libsvn_ra_local-1.la
808 %{_libdir}/libsvn_ra_serf-1.la
809 %{_libdir}/libsvn_ra_svn-1.la
810 %{_libdir}/libsvn_repos-1.la
811 %{_libdir}/libsvn_subr-1.la
812 %{_libdir}/libsvn_wc-1.la
813 %{_includedir}/%{name}-1
814 %{_examplesdir}/%{name}-%{version}
815
816 %files static
817 %defattr(644,root,root,755)
818 %{_libdir}/libsvn_client-1.a
819 %{_libdir}/libsvn_delta-1.a
820 %{_libdir}/libsvn_diff-1.a
821 %{_libdir}/libsvn_fs-1.a
822 %if %{without net_client_only}
823 %{_libdir}/libsvn_fs_base-1.a
824 %endif
825 %{_libdir}/libsvn_fs_fs-1.a
826 %{_libdir}/libsvn_fs_util-1.a
827 %{_libdir}/libsvn_ra-1.a
828 %{_libdir}/libsvn_ra_local-1.a
829 %{_libdir}/libsvn_ra_serf-1.a
830 %{_libdir}/libsvn_ra_svn-1.a
831 %{_libdir}/libsvn_repos-1.a
832 %{_libdir}/libsvn_subr-1.a
833 %{_libdir}/libsvn_wc-1.a
834
835 %if %{with gnome}
836 %files -n gnome-keyring-subversion
837 %defattr(644,root,root,755)
838 %attr(755,root,root) %{_libdir}/libsvn_auth_gnome_keyring-1.so.*.*.*
839 %attr(755,root,root) %ghost %{_libdir}/libsvn_auth_gnome_keyring-1.so.0
840 %endif
841
842 %if %{with kwallet}
843 %files -n kde4-kwallet-subversion
844 %defattr(644,root,root,755)
845 %attr(755,root,root) %{_libdir}/libsvn_auth_kwallet-1.so.*.*.*
846 %attr(755,root,root) %ghost %{_libdir}/libsvn_auth_kwallet-1.so.0
847 %endif
848
849 %if %{without net_client_only}
850 %files svnserve
851 %defattr(644,root,root,755)
852 %attr(755,root,root) %{_bindir}/svnserve
853 %{_mandir}/man5/svnserve.conf.5*
854 %{_mandir}/man8/svnserve.8*
855 %dir %attr(750,svn,svn) /home/services/subversion
856 %dir %attr(750,svn,svn) /home/services/subversion/repos
857 %if %{with apache}
858 %attr(754,root,root) /etc/rc.d/init.d/svnserve
859 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
860 %endif
861
862 %files tools
863 %defattr(644,root,root,755)
864 # tools/backup/hot-backup.py
865 %attr(755,root,root) %{_bindir}/svn-hot-backup
866
867 # tools/diff
868 %attr(755,root,root) %{_bindir}/svndiff
869 %attr(755,root,root) %{_bindir}/svndiff3
870 %attr(755,root,root) %{_bindir}/svndiff4
871
872 # tools/server-side
873 %attr(755,root,root) %{_bindir}/fsfs-stats
874 %attr(755,root,root) %{_bindir}/svn-populate-node-origins-index
875 %attr(755,root,root) %{_bindir}/svn-rep-sharing-stats
876 %attr(755,root,root) %{_bindir}/svnauthz
877 %attr(755,root,root) %{_bindir}/svnauthz-validate
878
879 # tools/client-side
880 %attr(755,root,root) %{_bindir}/svn-bench
881
882 # tools/dev/svnraisetreeconflict
883 %attr(755,root,root) %{_bindir}/svnraisetreeconflict
884
885 # tools/dev/
886 %attr(755,root,root) %{_bindir}/fsfs-access-map
887 %attr(755,root,root) %{_bindir}/fsfs-reorg
888
889 %files -n bash-completion-subversion
890 %defattr(644,root,root,755)
891 /etc/bash_completion.d/%{name}
892
893 %endif # net_client_only
894
895 %if %{with java}
896 %files -n java-subversion
897 %defattr(644,root,root,755)
898 %attr(755,root,root) %{_libdir}/libsvnjavahl-1.so.*.*.*
899 %attr(755,root,root) %ghost %{_libdir}/libsvnjavahl-1.so.0
900 %attr(755,root,root) %{_libdir}/libsvnjavahl-1.so
901 %{_javadir}/svn-javahl.jar
902 %endif
903
904 %if %{with python}
905 %files -n python-subversion
906 %defattr(644,root,root,755)
907 %doc tools/backup/*.py
908 %attr(755,root,root) %{_libdir}/libsvn_swig_py-1.so.*.*.*
909 %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_py-1.so.0
910 %attr(755,root,root) %{_libdir}/libsvn_swig_py-1.so
911 %dir %{py_sitedir}/libsvn
912 %attr(755,root,root) %{py_sitedir}/libsvn/_*.so
913 %{py_sitedir}/libsvn/*.py[co]
914 %dir %{py_sitedir}/svn
915 %{py_sitedir}/svn/*.py[co]
916 %{_examplesdir}/python-%{name}-%{version}
917 %endif
918
919 %if %{with csvn}
920 %files -n python-csvn
921 %defattr(644,root,root,755)
922 %doc subversion/bindings/ctypes-python/{README,TODO}
923 %doc subversion/bindings/ctypes-python/examples/*.py
924 %dir %{py_sitescriptdir}/csvn
925 %{py_sitescriptdir}/csvn/*.py[co]
926 %dir %{py_sitescriptdir}/csvn/core
927 %{py_sitescriptdir}/csvn/core/*.py[co]
928 %dir %{py_sitescriptdir}/csvn/ext
929 %{py_sitescriptdir}/csvn/ext/*.py[co]
930 %{py_sitescriptdir}/svn_ctypes_python_bindings-0.1-py*.egg-info
931 %endif
932
933 %if %{with perl}
934 %files -n perl-subversion
935 %defattr(644,root,root,755)
936 %attr(755,root,root) %{_libdir}/libsvn_swig_perl-1.so.*.*.*
937 %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_perl-1.so.0
938 %attr(755,root,root) %{_libdir}/libsvn_swig_perl-1.so
939 %{perl_vendorarch}/SVN
940 %dir %{perl_vendorarch}/auto/SVN
941 %dir %{perl_vendorarch}/auto/SVN/*
942 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
943 %{_mandir}/man3/*.3pm*
944 %endif
945
946 %if %{with ruby}
947 %files -n ruby-subversion
948 %defattr(644,root,root,755)
949 %attr(755,root,root) %{_libdir}/libsvn_swig_ruby-1.so.*.*.*
950 %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_ruby-1.so.0
951 %attr(755,root,root) %{_libdir}/libsvn_swig_ruby-1.so
952 %dir %{ruby_vendorarchdir}/svn
953 %{ruby_vendorarchdir}/svn/*.rb
954 %dir %{ruby_vendorarchdir}/svn/ext
955 %attr(755,root,root) %{ruby_vendorarchdir}/svn/ext/*.so
956 %{ruby_ridir}/Svn
957 %endif
958
959 %if %{with apache}
960 %files -n apache-mod_dav_svn
961 %defattr(644,root,root,755)
962 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_dav_svn.conf
963 %attr(755,root,root) %{apachelibdir}/mod_dav_svn.so
964
965 %files -n apache-mod_authz_svn
966 %defattr(644,root,root,755)
967 %doc subversion/mod_authz_svn/INSTALL
968 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_authz_svn.conf
969 %attr(755,root,root) %{apachelibdir}/mod_authz_svn.so
970
971 %files -n apache-mod_dontdothat_svn
972 %defattr(644,root,root,755)
973 %doc tools/server-side/mod_dontdothat/README
974 %attr(755,root,root) %{apachelibdir}/mod_dontdothat.so
975 %endif
This page took 0.087389 seconds and 4 git commands to generate.