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