]> git.pld-linux.org Git - packages/subversion.git/blob - subversion.spec
4ce51a35f63ed76b7d5b40125b2345ed5fbcffd4
[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.2
54 Release:        1
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:  9927b167d1c67d663ca63125907f6f69
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
270 %description tools
271 Subversion tools and scripts.
272
273 %description tools -l pl.UTF-8
274 Narzędzia oraz skrypty dla subversion.
275
276 %package -n bash-completion-subversion
277 Summary:        bash completion for subversion
278 Summary(pl.UTF-8):      Dopełnienia basha dla subversion
279 Group:          Applications/Shells
280 Requires:       %{name} = %{version}-%{release}
281 Requires:       bash-completion
282 Conflicts:      %{name}-tools <= 1.1.0-0.rc6.1
283 BuildArch:      noarch
284
285 %description -n bash-completion-subversion
286 Bash completion for subversion.
287
288 %description -n bash-completion-subversion -l pl.UTF-8
289 Dopełnienia basha dla subversion.
290
291 %package -n java-subversion
292 Summary:        Subversion Java bindings
293 Summary(pl.UTF-8):      Dowiązania do Subversion dla Javy
294 Group:          Development/Languages/Java
295 Requires:       %{name}-libs = %{version}-%{release}
296
297 %description -n java-subversion
298 This is a set of Java classes which provide the functionality of
299 subversion-libs, the Subversion libraries. It is useful if you want
300 to, for example, write a Java class that manipulates a Subversion
301 repository or working copy. See the 'subversion' package for more
302 information.
303
304 %description -n java-subversion -l pl.UTF-8
305 Ten pakiet zawiera zestaw klas Javy udostępniających funkcjonalność
306 subversion-libs, czyli bibliotek Subversion. Jest przydatny przy
307 pisaniu klas Javy np. modyfikujących repozytorium Subversion lub kopię
308 roboczą. Więcej informacji w pakiecie subversion.
309
310 %package -n python-subversion
311 Summary:        Subversion Python bindings
312 Summary(pl.UTF-8):      Dowiązania do Subversion dla Pythona
313 Summary(pt_BR.UTF-8):   Módulos Python para acessar os recursos do Subversion
314 Group:          Development/Languages/Python
315 Requires:       %{name}-libs = %{version}-%{release}
316 Requires:       python
317 Obsoletes:      subversion-python
318
319 %description -n python-subversion
320 Subversion Python bindings.
321
322 %description -n python-subversion -l pl.UTF-8
323 Dowiązania do Subversion dla Pythona.
324
325 %description -n python-subversion -l pt_BR.UTF-8
326 Módulos Python para acessar os recursos do Subversion.
327
328 %package -n python-csvn
329 Summary:        CTypes Subversion Python bindings
330 Summary(pl.UTF-8):      Dowiązania do Subversion dla Pythona
331 Summary(pt_BR.UTF-8):   Módulos Python para acessar os recursos do Subversion
332 Group:          Development/Languages/Python
333 Requires:       %{name}-libs = %{version}-%{release}
334 Requires:       python
335
336 %description -n python-csvn
337 Subversion CTypes Python bindings.
338
339 %description -n python-csvn -l pl.UTF-8
340 Dowiązania do Subversion dla Pythona używające CTypes.
341
342 %description -n python-csvn -l pt_BR.UTF-8
343 Módulos Python para acessar os recursos do Subversion.
344
345 %package -n perl-subversion
346 Summary:        Subversion Perl bindings
347 Summary(pl.UTF-8):      Dowiązania do Subversion dla Perla
348 Summary(pt_BR.UTF-8):   Módulos Perl para acessar os recursos do Subversion
349 Group:          Development/Languages/Perl
350 Requires:       %{name}-libs = %{version}-%{release}
351 Obsoletes:      subversion-perl
352
353 %description -n perl-subversion
354 Subversion Perl bindings.
355
356 %description -n perl-subversion -l pl.UTF-8
357 Dowiązania do Subversion dla Perla.
358
359 %description -n perl-subversion -l pt_BR.UTF-8
360 Módulos Perl para acessar os recursos do Subversion.
361
362 %package -n ruby-subversion
363 Summary:        Subversion Ruby bindings
364 Summary(pl.UTF-8):      Dowiązania do Subversion dla języka Ruby
365 Summary(pt_BR.UTF-8):   Módulos Ruby para acessar os recursos do Subversion
366 Group:          Development/Languages
367 Requires:       %{name}-libs = %{version}-%{release}
368 Obsoletes:      subversion-ruby
369
370 %description -n ruby-subversion
371 Subversion Ruby bindings.
372
373 %description -n ruby-subversion -l pl.UTF-8
374 Dowiązania do Subversion dla języka Ruby.
375
376 %description -n ruby-subversion -l pt_BR.UTF-8
377 Módulos Ruby para acessar os recursos do Subversion.
378
379 %package -n apache-mod_dav_svn
380 Summary:        Apache module: Subversion Server
381 Summary(pl.UTF-8):      Moduł Apache'a: serwer Subversion
382 Group:          Networking/Daemons
383 Requires:       %{name} = %{version}-%{release}
384 Requires:       apache(modules-api) = %apache_modules_api
385 Requires:       apache-mod_dav
386
387 %description -n apache-mod_dav_svn
388 Apache module: Subversion Server.
389
390 %description -n apache-mod_dav_svn -l pl.UTF-8
391 Moduł Apache'a: serwer Subversion.
392
393 %package -n apache-mod_authz_svn
394 Summary:        Apache module: Subversion Server - path-based authorization
395 Summary(pl.UTF-8):      Moduł Apache'a: autoryzacja na podstawie ścieżki dla serwera Subversion
396 Group:          Networking/Daemons
397 Requires:       %{name}-libs = %{version}-%{release}
398 Requires:       apache(modules-api) = %apache_modules_api
399 Requires:       apache-mod_dav_svn = %{version}-%{release}
400
401 %description -n apache-mod_authz_svn
402 Apache module: Subversion Server - path-based authorization.
403
404 %description -n apache-mod_authz_svn -l pl.UTF-8
405 Moduł Apache'a: autoryzacja na podstawie ścieżki dla serwera
406 Subversion.
407
408 %package -n apache-mod_dontdothat_svn
409 Summary:        Apache module: Allows you to block specific svn requests
410 Summary(pl.UTF-8):      Moduł Apache'a pozwalający na blokowanie pewnych zapytań svn
411 Group:          Networking/Daemons
412 Requires:       %{name}-libs = %{version}-%{release}
413 Requires:       apache(modules-api) = %apache_modules_api
414 Requires:       apache-mod_dav_svn = %{version}-%{release}
415
416 %description -n apache-mod_dontdothat_svn
417 Apache module: Allows you to block specific svn requests.
418
419 %description -n apache-mod_dontdothat_svn -l pl.UTF-8
420 Moduł Apache'a pozwalający na blokowanie pewnych zapytań svn.
421
422 %package -n gnome-keyring-subversion
423 Summary:        GNOME Keyring authentication provider for Subversion
424 Summary(pl.UTF-8):      Moduł uwierzytelniający GNOME Keyring dla Subversion
425 Group:          X11/Applications
426 Requires:       %{name}-libs = %{version}-%{release}
427
428 %description -n gnome-keyring-subversion
429 Authentication provider module for Subversion which allows SVN client
430 to authenticate using GNOME Keyring.
431
432 %description -n gnome-keyring-subversion -l pl.UTF-8
433 Moduł uwierzytelniający dla Subversion pozwalający klientom SVN
434 uwierzytelniać się przy użyciu mechanizmu GNOME Keyring.
435
436 %package -n kde5-kwallet-subversion
437 Summary:        KDE Wallet authentication provider for Subversion
438 Summary(pl.UTF-8):      Moduł uwierzytelniający dla Subversion wykorzystujący Portfel KDE
439 Group:          X11/Applications
440 Requires:       %{name}-libs = %{version}-%{release}
441
442 %description -n kde5-kwallet-subversion
443 Authentication provider module for Subversion which allows SVN client
444 to authenticate using KDE Wallet.
445
446 %description -n kde5-kwallet-subversion -l pl.UTF-8
447 Moduł uwierzytelniający dla Subversion pozwalający klientom SVN
448 uwierzytelniać się przy użyciu Portfela KDE.
449
450 %prep
451 %setup -q
452 %patch0 -p0
453 %patch1 -p1
454 %patch2 -p0
455 %patch3 -p1
456 %patch4 -p1
457 %patch5 -p1
458
459 sed -i -e 's#serf_prefix/lib#serf_prefix/%{_lib}#g' build/ac-macros/serf.m4
460
461 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,' \
462         tools/backup/hot-backup.py.in \
463         tools/examples/blame.py \
464         tools/examples/check-modified.py \
465         tools/examples/dumpprops.py \
466         tools/examples/get-location-segments.py \
467         tools/examples/getfile.py \
468         tools/examples/geturl.py \
469         tools/examples/putfile.py \
470         tools/examples/revplist.py \
471         tools/examples/svnlook.py \
472         tools/examples/svnshell.py \
473         tools/examples/walk-config-auth.py
474
475 %build
476 # disabled regeneration - subversion 1.6.13 is not ready for swig 2.0.x
477 #%{__rm} subversion/bindings/swig/proxy/*.swg
478 #cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
479 chmod +x ./autogen.sh && ./autogen.sh
480 #{__libtoolize}
481 %configure \
482         --disable-mod-activation \
483         --disable-runtime-module-search \
484         --with-apr=%{_bindir}/apr-1-config \
485         --with-apr-util=%{_bindir}/apu-1-config \
486         --with-editor=vi \
487         --with-serf=%{_prefix} \
488         --with-zlib=%{_libdir} \
489 %if %{with apache}
490         --with-apache-libexecdir="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
491         --with-apxs=%{_sbindir}/apxs \
492 %else
493         --without-apxs \
494 %endif
495 %if %{with db}
496         --with-berkeley-db="db.h:%{_includedir}:%{_libdir}:db" \
497         %{?with_db6:--enable-bdb6} \
498 %else
499         --without-berkeley-db \
500 %endif
501 %if %{with csvn}
502         --with-ctypesgen=%{_bindir}/ctypesgen-2 \
503 %endif
504 %if %{with gnome}
505         --with-gnome-keyring \
506 %endif
507 %if %{with kwallet}
508         --with-kwallet \
509 %endif
510 %if %{without swig}
511         --without-swig \
512 %endif
513 %if %{with python}
514         --with-swig=/usr/bin/swig-3 \
515 %endif
516 %if %{with ruby}
517         svn_cv_ruby_sitedir_libsuffix="" \
518         svn_cv_ruby_sitedir_archsuffix="" \
519         --with-ruby-sitedir=%{ruby_vendorarchdir} \
520 %else
521         ac_cv_path_RUBY=none \
522 %endif
523 %if %{with java}
524         --enable-javahl \
525         --with-jdk="%{java_home}" \
526         --without-jikes \
527 %else
528         --disable-javahl \
529 %endif
530
531 %{__make} -j1
532
533 %{__make} tools
534
535 %if %{with csvn}
536 # Python ctypes bindings
537 %{__make} ctypes-python
538 %endif
539 %if %{with python}
540 # Python swig bindings
541 %{__make} swig-py \
542         swig_pydir=%{py_sitedir}/libsvn \
543         swig_pydir_extra=%{py_sitedir}/svn
544 %endif
545 %if %{with perl}
546 # Perl swig bindings
547 %{__make} -j1 swig-pl-lib
548 cd subversion/bindings/swig/perl/native
549 %{__perl} Makefile.PL INSTALLDIRS=vendor
550 %{__make} -j1
551 cd -
552 %endif
553 %if %{with java}
554 %{__make} -j1 javahl \
555         javahl_javadir="%{_javadir}"
556 %endif
557 # ruby
558 %if %{with ruby}
559 %{__make} swig-rb
560 %endif
561
562 %if %{with tests}
563 %{__make} -j1 check
564 %if %{with csvn}
565 %{__make} -j1 check-ctypes-python
566 %endif
567 %if %{with python}
568 %{__make} -j1 check-swig-py
569 %endif
570 %if %{with perl}
571 %{__make} -j1 check-swig-pl
572 %endif
573 %if %{with ruby}
574 # disabled, see https://bugs.launchpad.net/pld-linux/+bug/734340
575 #%{__make} check-swig-rb
576 %endif
577 %endif
578
579 %install
580 rm -rf $RPM_BUILD_ROOT
581 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
582         $RPM_BUILD_ROOT{%{apacheconfdir},%{apachelibdir},%{_infodir}} \
583         $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
584         $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
585         $RPM_BUILD_ROOT/home/services/subversion{,/repos}
586
587 %{__make} -j1 install \
588         pkgconfig_dir=%{_pkgconfigdir} \
589         toolsdir=%{_bindir} \
590         DESTDIR=$RPM_BUILD_ROOT \
591         APACHE_LIBEXECDIR="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
592 %if %{with java}
593         install-javahl \
594         javahl_javadir="%{_javadir}" \
595 %endif
596 %if %{with python}
597         install-swig-py \
598         swig_pydir=%{py_sitedir}/libsvn \
599         swig_pydir_extra=%{py_sitedir}/svn \
600 %endif
601         install-tools
602
603 %if %{with csvn}
604 # manually execute install-ctypes-python target
605 cd subversion/bindings/ctypes-python
606 %py_install
607 cd ../../..
608 %endif
609
610 %if %{with ruby}
611 %{__make} -j1 install-swig-rb install-swig-rb-doc \
612         SWIG_RB_RI_DATADIR=$RPM_BUILD_ROOT%{ruby_ridir} \
613         DESTDIR=$RPM_BUILD_ROOT
614
615 # not our package
616 %{__rm} -r $RPM_BUILD_ROOT%{ruby_ridir}/OptionParser
617 %{__rm} -r $RPM_BUILD_ROOT%{ruby_ridir}/Time
618 %if "%{ruby_abi}" >= "2.0"
619 %{__rm} -r $RPM_BUILD_ROOT%{ruby_ridir}/File
620 %endif
621 %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri
622 %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid
623 %endif
624
625 %if %{with perl}
626 %{__make} install-swig-pl-lib \
627         DESTDIR=$RPM_BUILD_ROOT
628 %{__make} -C subversion/bindings/swig/perl/native install \
629         DESTDIR=$RPM_BUILD_ROOT \
630         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
631         LIBDIR=$RPM_BUILD_ROOT%{_libdir}
632 %endif
633
634 %if %{with apache}
635 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/65_mod_dav_svn.conf
636 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/66_mod_authz_svn.conf
637 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
638 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
639 %endif
640
641 %if %{without net_client_only}
642 install -p tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
643 %endif
644
645 # rename not to conflict with standard packages. (are these needed at all?)
646 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,svn}diff
647 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,svn}diff3
648 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,svn}diff4
649
650 %if %{with python} || %{with csvn}
651 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
652 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
653 %py_postclean
654 %endif
655 %if %{with python}
656 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/libsvn/*.la
657 # .a created on ac only
658 %{__rm} -f $RPM_BUILD_ROOT%{py_sitedir}/libsvn/*.a
659 cp -p tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
660 %endif
661
662 cp -p tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
663 cp -p tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
664
665 %if %{with java}
666 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsvnjavahl*.{la,a}
667 %endif
668 %if %{with swig}
669 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsvn_swig*.{la,a}
670 %if %{with ruby}
671 %{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/svn/ext/*.la
672 %endif
673 %endif
674 %if %{with gnome} || %{with kwallet}
675 # dlopened by soname (libsvn_auth_*-1.so.0)
676 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsvn_auth_*-1.{so,la}
677 %endif
678
679 %find_lang %{name}
680
681 %clean
682 rm -rf $RPM_BUILD_ROOT
683
684 %pre svnserve
685 %groupadd -g 86 svn
686 %useradd -u 180 -d /home/services/subversion -c "Subversion svnserve" -g svn svn
687
688 %post   libs -p /sbin/ldconfig
689 %postun libs -p /sbin/ldconfig
690
691 %post   devel -p /sbin/postshell
692 -/usr/sbin/fix-info-dir -c %{_infodir}
693
694 %postun devel -p /sbin/postshell
695 -/usr/sbin/fix-info-dir -c %{_infodir}
696
697 %post   -n java-subversion -p /sbin/ldconfig
698 %postun -n java-subversion -p /sbin/ldconfig
699
700 %post   -n perl-subversion -p /sbin/ldconfig
701 %postun -n perl-subversion -p /sbin/ldconfig
702
703 %post   -n python-subversion -p /sbin/ldconfig
704 %postun -n python-subversion -p /sbin/ldconfig
705
706 %post   -n ruby-subversion -p /sbin/ldconfig
707 %postun -n ruby-subversion -p /sbin/ldconfig
708
709 %post   -n gnome-keyring-subversion -p /sbin/ldconfig
710 %postun -n gnome-keyring-subversion -p /sbin/ldconfig
711
712 %post   -n kde5-kwallet-subversion -p /sbin/ldconfig
713 %postun -n kde5-kwallet-subversion -p /sbin/ldconfig
714
715 %post svnserve
716 /sbin/chkconfig --add svnserve
717 %service svnserve restart "svnserve daemon"
718
719 %preun svnserve
720 if [ "$1" = "0" ]; then
721         %service svnserve stop
722         /sbin/chkconfig --del svnserve
723 fi
724
725 %postun svnserve
726 if [ "$1" = "0" ]; then
727         %userremove svn
728         %groupremove svn
729 fi
730
731 %post -n apache-mod_dav_svn
732 %service -q httpd restart
733
734 %postun -n apache-mod_dav_svn
735 if [ "$1" = "0" ]; then
736         %service -q httpd restart
737 fi
738
739 %post -n apache-mod_authz_svn
740 %service -q httpd restart
741
742 %postun -n apache-mod_authz_svn
743 if [ "$1" = "0" ]; then
744         %service -q httpd restart
745 fi
746
747 %post -n apache-mod_dontdothat_svn
748 %service -q httpd restart
749
750 %postun -n apache-mod_dontdothat_svn
751 if [ "$1" = "0" ]; then
752         %service -q httpd restart
753 fi
754
755 %files
756 %defattr(644,root,root,755)
757 %doc BUGS CHANGES INSTALL README
758 %doc doc/*/*.html
759 %doc tools/hook-scripts/*.{pl,py,example}
760 %doc tools/hook-scripts/mailer/*.{py,example}
761 %doc tools/xslt/*
762 %attr(755,root,root) %{_bindir}/fsfs-stats
763 %attr(755,root,root) %{_bindir}/svn
764 %attr(755,root,root) %{_bindir}/svn-mergeinfo-normalizer
765 %attr(755,root,root) %{_bindir}/svnadmin
766 %attr(755,root,root) %{_bindir}/svnconflict
767 %attr(755,root,root) %{_bindir}/svndumpfilter
768 %attr(755,root,root) %{_bindir}/svnlook
769 %attr(755,root,root) %{_bindir}/svnmover
770 %attr(755,root,root) %{_bindir}/svnmucc
771 %attr(755,root,root) %{_bindir}/svnrdump
772 %attr(755,root,root) %{_bindir}/svnsync
773 %attr(755,root,root) %{_bindir}/svnversion
774 %{_mandir}/man1/svn.1*
775 %{_mandir}/man1/svnadmin.1*
776 %{_mandir}/man1/svndumpfilter.1*
777 %{_mandir}/man1/svnrdump.1*
778 %{_mandir}/man1/svnlook.1*
779 %{_mandir}/man1/svnmucc.1*
780 %{_mandir}/man1/svnsync.1*
781 %{_mandir}/man1/svnversion.1*
782
783 %files libs -f %{name}.lang
784 %defattr(644,root,root,755)
785 %dir %{_sysconfdir}/%{name}
786 %attr(755,root,root) %{_libdir}/libsvn_client-1.so.*.*.*
787 %attr(755,root,root) %ghost %{_libdir}/libsvn_client-1.so.0
788 %attr(755,root,root) %{_libdir}/libsvn_delta-1.so.*.*.*
789 %attr(755,root,root) %ghost %{_libdir}/libsvn_delta-1.so.0
790 %attr(755,root,root) %{_libdir}/libsvn_diff-1.so.*.*.*
791 %attr(755,root,root) %ghost %{_libdir}/libsvn_diff-1.so.0
792 %attr(755,root,root) %{_libdir}/libsvn_fs-1.so.*.*.*
793 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs-1.so.0
794 %if %{without net_client_only}
795 %attr(755,root,root) %{_libdir}/libsvn_fs_base-1.so.*.*.*
796 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_base-1.so.0
797 %endif
798 %attr(755,root,root) %{_libdir}/libsvn_fs_fs-1.so.*.*.*
799 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_fs-1.so.0
800 %attr(755,root,root) %{_libdir}/libsvn_fs_util-1.so.*.*.*
801 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_util-1.so.0
802 %attr(755,root,root) %{_libdir}/libsvn_fs_x-1.so.*.*.*
803 %attr(755,root,root) %ghost %{_libdir}/libsvn_fs_x-1.so.0
804 %attr(755,root,root) %{_libdir}/libsvn_ra-1.so.*.*.*
805 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra-1.so.0
806 %attr(755,root,root) %{_libdir}/libsvn_ra_local-1.so.*.*.*
807 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_local-1.so.0
808 %attr(755,root,root) %{_libdir}/libsvn_ra_serf-1.so.*.*.*
809 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_serf-1.so.0
810 %attr(755,root,root) %{_libdir}/libsvn_ra_svn-1.so.*.*.*
811 %attr(755,root,root) %ghost %{_libdir}/libsvn_ra_svn-1.so.0
812 %attr(755,root,root) %{_libdir}/libsvn_repos-1.so.*.*.*
813 %attr(755,root,root) %ghost %{_libdir}/libsvn_repos-1.so.0
814 %attr(755,root,root) %{_libdir}/libsvn_subr-1.so.*.*.*
815 %attr(755,root,root) %ghost %{_libdir}/libsvn_subr-1.so.0
816 %attr(755,root,root) %{_libdir}/libsvn_wc-1.so.*.*.*
817 %attr(755,root,root) %ghost %{_libdir}/libsvn_wc-1.so.0
818
819 %files devel
820 %defattr(644,root,root,755)
821 %attr(755,root,root) %{_libdir}/libsvn_client-1.so
822 %attr(755,root,root) %{_libdir}/libsvn_delta-1.so
823 %attr(755,root,root) %{_libdir}/libsvn_diff-1.so
824 %attr(755,root,root) %{_libdir}/libsvn_fs-1.so
825 %if %{without net_client_only}
826 %attr(755,root,root) %{_libdir}/libsvn_fs_base-1.so
827 %endif
828 %attr(755,root,root) %{_libdir}/libsvn_fs_fs-1.so
829 %attr(755,root,root) %{_libdir}/libsvn_fs_util-1.so
830 %attr(755,root,root) %{_libdir}/libsvn_fs_x-1.so
831 %attr(755,root,root) %{_libdir}/libsvn_ra-1.so
832 %attr(755,root,root) %{_libdir}/libsvn_ra_local-1.so
833 %attr(755,root,root) %{_libdir}/libsvn_ra_serf-1.so
834 %attr(755,root,root) %{_libdir}/libsvn_ra_svn-1.so
835 %attr(755,root,root) %{_libdir}/libsvn_repos-1.so
836 %attr(755,root,root) %{_libdir}/libsvn_subr-1.so
837 %attr(755,root,root) %{_libdir}/libsvn_wc-1.so
838 %{_libdir}/libsvn_client-1.la
839 %{_libdir}/libsvn_delta-1.la
840 %{_libdir}/libsvn_diff-1.la
841 %{_libdir}/libsvn_fs-1.la
842 %if %{without net_client_only}
843 %{_libdir}/libsvn_fs_base-1.la
844 %endif
845 %{_libdir}/libsvn_fs_fs-1.la
846 %{_libdir}/libsvn_fs_util-1.la
847 %{_libdir}/libsvn_fs_x-1.la
848 %{_libdir}/libsvn_ra-1.la
849 %{_libdir}/libsvn_ra_local-1.la
850 %{_libdir}/libsvn_ra_serf-1.la
851 %{_libdir}/libsvn_ra_svn-1.la
852 %{_libdir}/libsvn_repos-1.la
853 %{_libdir}/libsvn_subr-1.la
854 %{_libdir}/libsvn_wc-1.la
855 %if %{with gnome}
856 # only for feature check, linking will fail (no libsvn_auth_gnome_keyring.so)
857 %{_pkgconfigdir}/libsvn_auth_gnome_keyring.pc
858 %endif
859 %if %{with kwallet}
860 # only for feature check, linking will fail (no libsvn_auth_kwallet.so)
861 %{_pkgconfigdir}/libsvn_auth_kwallet.pc
862 %endif
863 %{_pkgconfigdir}/libsvn_client.pc
864 %{_pkgconfigdir}/libsvn_delta.pc
865 %{_pkgconfigdir}/libsvn_diff.pc
866 %{_pkgconfigdir}/libsvn_fs.pc
867 %if %{without net_client_only}
868 %{_pkgconfigdir}/libsvn_fs_base.pc
869 %endif
870 %{_pkgconfigdir}/libsvn_fs_fs.pc
871 %{_pkgconfigdir}/libsvn_fs_util.pc
872 %{_pkgconfigdir}/libsvn_fs_x.pc
873 %{_pkgconfigdir}/libsvn_ra.pc
874 %{_pkgconfigdir}/libsvn_ra_local.pc
875 %{_pkgconfigdir}/libsvn_ra_serf.pc
876 %{_pkgconfigdir}/libsvn_ra_svn.pc
877 %{_pkgconfigdir}/libsvn_repos.pc
878 %{_pkgconfigdir}/libsvn_subr.pc
879 %{_pkgconfigdir}/libsvn_wc.pc
880 %{_includedir}/%{name}-1
881 %{_examplesdir}/%{name}-%{version}
882
883 %files static
884 %defattr(644,root,root,755)
885 %{_libdir}/libsvn_client-1.a
886 %{_libdir}/libsvn_delta-1.a
887 %{_libdir}/libsvn_diff-1.a
888 %{_libdir}/libsvn_fs-1.a
889 %if %{without net_client_only}
890 %{_libdir}/libsvn_fs_base-1.a
891 %endif
892 %{_libdir}/libsvn_fs_fs-1.a
893 %{_libdir}/libsvn_fs_util-1.a
894 %{_libdir}/libsvn_fs_x-1.a
895 %{_libdir}/libsvn_ra-1.a
896 %{_libdir}/libsvn_ra_local-1.a
897 %{_libdir}/libsvn_ra_serf-1.a
898 %{_libdir}/libsvn_ra_svn-1.a
899 %{_libdir}/libsvn_repos-1.a
900 %{_libdir}/libsvn_subr-1.a
901 %{_libdir}/libsvn_wc-1.a
902
903 %if %{with gnome}
904 %files -n gnome-keyring-subversion
905 %defattr(644,root,root,755)
906 %attr(755,root,root) %{_libdir}/libsvn_auth_gnome_keyring-1.so.*.*.*
907 %attr(755,root,root) %ghost %{_libdir}/libsvn_auth_gnome_keyring-1.so.0
908 # does anything use it? requires libsvn_auth_gnome_keyring.so
909 #%{_pkgconfigdir}/libsvn_auth_gnome_keyring.pc
910 %endif
911
912 %if %{with kwallet}
913 %files -n kde5-kwallet-subversion
914 %defattr(644,root,root,755)
915 %attr(755,root,root) %{_libdir}/libsvn_auth_kwallet-1.so.*.*.*
916 %attr(755,root,root) %ghost %{_libdir}/libsvn_auth_kwallet-1.so.0
917 # does anything use it? requires libsvn_auth_kwallet.so
918 #%{_pkgconfigdir}/libsvn_auth_kwallet.pc
919 %endif
920
921 %if %{without net_client_only}
922 %files svnserve
923 %defattr(644,root,root,755)
924 %attr(755,root,root) %{_bindir}/svnserve
925 %{_mandir}/man5/svnserve.conf.5*
926 %{_mandir}/man8/svnserve.8*
927 %dir %attr(750,svn,svn) /home/services/subversion
928 %dir %attr(750,svn,svn) /home/services/subversion/repos
929 %if %{with apache}
930 %attr(754,root,root) /etc/rc.d/init.d/svnserve
931 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svnserve
932 %endif
933
934 %files tools
935 %defattr(644,root,root,755)
936 # tools/backup/hot-backup.py
937 %attr(755,root,root) %{_bindir}/svn-hot-backup
938
939 # tools/diff
940 %attr(755,root,root) %{_bindir}/svndiff
941 %attr(755,root,root) %{_bindir}/svndiff3
942 %attr(755,root,root) %{_bindir}/svndiff4
943
944 # tools/server-side
945 %attr(755,root,root) %{_bindir}/svnfsfs
946 %attr(755,root,root) %{_bindir}/svn-populate-node-origins-index
947 %attr(755,root,root) %{_bindir}/svnauthz
948 %attr(755,root,root) %{_bindir}/svnauthz-validate
949
950 # tools/client-side
951 %attr(755,root,root) %{_bindir}/svnbench
952
953 # tools/dev/svnraisetreeconflict
954 %attr(755,root,root) %{_bindir}/svnraisetreeconflict
955
956 # tools/dev/
957 %attr(755,root,root) %{_bindir}/fsfs-access-map
958 %attr(755,root,root) %{_bindir}/x509-parser
959
960 %files -n bash-completion-subversion
961 %defattr(644,root,root,755)
962 /etc/bash_completion.d/%{name}
963
964 %endif # net_client_only
965
966 %if %{with java}
967 %files -n java-subversion
968 %defattr(644,root,root,755)
969 %attr(755,root,root) %{_libdir}/libsvnjavahl-1.so.*.*.*
970 %attr(755,root,root) %ghost %{_libdir}/libsvnjavahl-1.so.0
971 %attr(755,root,root) %{_libdir}/libsvnjavahl-1.so
972 %{_javadir}/svn-javahl.jar
973 %endif
974
975 %if %{with python}
976 %files -n python-subversion
977 %defattr(644,root,root,755)
978 %doc tools/backup/*.py
979 %attr(755,root,root) %{_libdir}/libsvn_swig_py-1.so.*.*.*
980 %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_py-1.so.0
981 %attr(755,root,root) %{_libdir}/libsvn_swig_py-1.so
982 %dir %{py_sitedir}/libsvn
983 %attr(755,root,root) %{py_sitedir}/libsvn/_*.so
984 %{py_sitedir}/libsvn/*.py[co]
985 %dir %{py_sitedir}/svn
986 %{py_sitedir}/svn/*.py[co]
987 %{_examplesdir}/python-%{name}-%{version}
988 %endif
989
990 %if %{with csvn}
991 %files -n python-csvn
992 %defattr(644,root,root,755)
993 %doc subversion/bindings/ctypes-python/{README,TODO}
994 %doc subversion/bindings/ctypes-python/examples/*.py
995 %dir %{py_sitescriptdir}/csvn
996 %{py_sitescriptdir}/csvn/*.py[co]
997 %dir %{py_sitescriptdir}/csvn/core
998 %{py_sitescriptdir}/csvn/core/*.py[co]
999 %dir %{py_sitescriptdir}/csvn/ext
1000 %{py_sitescriptdir}/csvn/ext/*.py[co]
1001 %{py_sitescriptdir}/svn_ctypes_python_bindings-0.1-py*.egg-info
1002 %endif
1003
1004 %if %{with perl}
1005 %files -n perl-subversion
1006 %defattr(644,root,root,755)
1007 %attr(755,root,root) %{_libdir}/libsvn_swig_perl-1.so.*.*.*
1008 %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_perl-1.so.0
1009 %attr(755,root,root) %{_libdir}/libsvn_swig_perl-1.so
1010 %{perl_vendorarch}/SVN
1011 %dir %{perl_vendorarch}/auto/SVN
1012 %dir %{perl_vendorarch}/auto/SVN/*
1013 %attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
1014 %{_mandir}/man3/SVN::*.3pm*
1015 %endif
1016
1017 %if %{with ruby}
1018 %files -n ruby-subversion
1019 %defattr(644,root,root,755)
1020 %attr(755,root,root) %{_libdir}/libsvn_swig_ruby-1.so.*.*.*
1021 %attr(755,root,root) %ghost %{_libdir}/libsvn_swig_ruby-1.so.0
1022 %attr(755,root,root) %{_libdir}/libsvn_swig_ruby-1.so
1023 %dir %{ruby_vendorarchdir}/svn
1024 %{ruby_vendorarchdir}/svn/*.rb
1025 %dir %{ruby_vendorarchdir}/svn/ext
1026 %attr(755,root,root) %{ruby_vendorarchdir}/svn/ext/*.so
1027 %{ruby_ridir}/Svn
1028 %endif
1029
1030 %if %{with apache}
1031 %files -n apache-mod_dav_svn
1032 %defattr(644,root,root,755)
1033 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_dav_svn.conf
1034 %attr(755,root,root) %{apachelibdir}/mod_dav_svn.so
1035
1036 %files -n apache-mod_authz_svn
1037 %defattr(644,root,root,755)
1038 %doc subversion/mod_authz_svn/INSTALL
1039 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_authz_svn.conf
1040 %attr(755,root,root) %{apachelibdir}/mod_authz_svn.so
1041
1042 %files -n apache-mod_dontdothat_svn
1043 %defattr(644,root,root,755)
1044 %doc tools/server-side/mod_dontdothat/README
1045 %attr(755,root,root) %{apachelibdir}/mod_dontdothat.so
1046 %endif
This page took 0.130307 seconds and 3 git commands to generate.