Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1584379
 поиск   регистрация   авторизация 
 
Группа :: Разработка/Прочее
Пакет: subversion

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

# hey Emacs, its -*- mode: rpm-spec; coding: cyrillic-cp1251; -*-
# Subversion
# Notes:
# * Do not build subversion on the system where an older version is
#   installed. Subversion links against system-installed libraries in
#   that case which may lead to failed tests or other failures during
#   validation stage. Prefer to build subversion in hasher.
# * Update alt-bdb patch when libdb version changes. Otherwise you may
#   have failyres in tests for FS_TYPE=bdb.


%def_with M24

%def_with doc
%def_with server
%def_with dav
%def_with javahl
%def_with swig_py
%def_with swig_pl
%if_with M24
# I didn't tested building of ruby bindings for M24
%def_without swig_rb
%else
# Temporarily disbled due to fail on x86_64
%def_without swig_rb
%endif
# Note: this spec does not have support for building with swig_java
%def_without swig_java

%def_with svn_push

# Global switch to enable/diable all tests

%def_enable check
# Use these switches to selectively turn on/off some of tests
# These make sence only if tests enabled
%def_with fsfs_check
%def_with bdb_check
%def_with pl_check
%def_with rb_check
%def_with javahl_check

# --enable-dso Turn on DSO loading of RA libraries

# Using this option causes to fail some tests:
#   repos_test for FS_TYPE=bdb
#   6ra perl test
#   javahl tests
%def_disable dso

%define svn_ver 1.3.1
%define svn_ver_pre %nil

%if_with M24
%define svn_rel alt0.M24.1
%else
%define svn_rel alt1
%endif

%if_with M24
%define apr_ver 1:0.9.5-alt0.3.M24.1
%else
%define apr_ver 1:0.9.5-alt0.4
%endif

# Master 2.4 does not have %%python_sitelibdir defined

%if_with M24
%define python_libdir %_libdir/python2.3
%define python_sitelibdir %python_libdir/site-packages
%endif

%define svn_user subversion
%define svn_group subversion
%define svn_repo_dir %_localstatedir/subversion
%define svn_service svnserve

# Directory for subversion-tools

%define _svn_tools_dir %_datadir/%name
%define _svn_tools_bindir %_bindir

Name: subversion
Version: %svn_ver
Release: %svn_rel

Summary: A version control system
Group: Development/Other
License: Apache
Url: http://subversion.tigris.org/
Packager: Sviatoslav Sviridov <svd at altlinux.ru>

Source: %name-%version%svn_ver_pre.tar.bz2
Source1: %name.el
Source2: %name-config-1.2.0.tar.bz2
Source3: svnserve.init
Source4: svnserve.sysconfig
Source5: %name-apache.conf
Source6: svnwrapper
Source7: vc-svn.el
Source8: Makefile-tools

Patch1: %name-1.2.0-alt-dockbook.patch
Patch2: %name-1.2.3-alt-perl-DESTROY.patch
Patch3: %name-1.2.0-alt-bdb.patch
Patch4: %name-1.1.1-alt-gen_make.patch
Patch5: %name-1.1.3-alt-quote-filenames.patch
Patch6: %name-1.1.3-alt-makefile-check-javahl.patch
Patch7: %name-1.1.4-alt-swig-linkage.patch
Patch8: %name-1.2.0-r14754-svnversion.patch
Patch9: %name-1.2.0-alt-buildconf.patch
Patch10: %name-1.3.1-alt-M24-bdb.patch
Patch11: %name-1.3.0-alt-linkage-neon.patch
Patch12: %name-1.3.0-deb-swig-1.3.27.patch
Patch13: %name-1.3.0-alt-configure-swig-ruby.patch
Patch14: %name-1.3.1-alt-libsvn_swig-install.patch
Patch15: subversion-1.3.1-alt-libdb-linkage.patch

Requires: lib%name = %version-%release

# since 1.0.6 neon 0.24.7 required (fixes wire compression bugs)

%if_with M24
# libneon-0.24.7 is available in updates for M24
Requires: libneon >= 0.24.7-alt2
%else
# No exact requirement for Sisyphus since we are using libneon0.25
%endif

# Automatically added by buildreq on Tue May 31 2005

BuildRequires: docbook-style-xsl emacs21-common libapr-devel libexpat-devel libgpg-error libruby-devel perl-devel python-base python-modules-compiler python-modules-encodings ruby-stdlibs xsltproc doxygen

BuildRequires: libldap-devel rpm-build-python

%if_without M24
# Master 2.4 has PerlIO.pm as a part of perl-base
BuildPreReq: perl-PerlIO
%endif

%if_with M24
BuildPreReq: XFree86-locales
BuildRequires: libneon-devel
%else
BuildPreReq: xorg-x11-locales
BuildRequires: libneon0.25-devel
%endif

%def_disable static
%{?_enable_static:BuildPreReq: glibc-devel-static}

# Manually removed from list:

# + emacs-related packages (only emacs21-common left)
# + libdb4-devel (specified below as libdb4.3-devel),
# + python-dev (specified below as python-devel = 2.4);
# + swig (coonditional, required for swig bindings)
# + libswigpy (conditional, required for subversion-python)
# + apache2-devel (needed only for subversion-server-dav)
# + j2se-devel, junit (conditional, required for javahl, swig_java)
# + gcc-c++, libstdc++-devel (conditional, required for javahl)
# + perl-PerlIO (specified if building not for 2.4 Master)
%if_with M24
BuildPreReq: libdb4.2-devel = 4.2.52-alt4
%else
# Do no specify explicit dependency to libdb4-devel, implicit dependency
# is implied by aprutil-devel >= 0.9.7-alt3
#BuildPreReq: libdb4.3-devel
%endif
%if_with M24
BuildPreReq: libneon-devel >= 0.24.7-alt2
%else
# subversion in Sisuphus uses libneon0.25-devel
%endif
%if_with M24
BuildPreReq: python-dev
%else
BuildPreReq: python-devel = 2.4
%endif
%if_with M24
BuildPreReq: libaprutil-devel >= 1:0.9.5-alt0.4
%else
# libaprutil-devel with dependency to libdb4.3-devel required
BuildPreReq: libaprutil-devel >= 0.9.7-alt3
%endif

%if_with swig_py
BuildPreReq: swig
%endif

%if_with swig_pl
BuildPreReq: perl-base swig
%endif

%if_with swig_rb
BuildPreReq: ruby swig
%endif

%if_with swig_java
# TBD: What else required to build swig java bindings?
BuildPreReq: swig rpm-build-java  j2se-devel
%endif

%if_with javahl
BuildPreReq: gcc-c++ libstdc++-devel rpm-build-java junit
BuildPreReq: j2se-devel = 1.4.2
BuildPreReq: /proc
%endif

%add_findprov_lib_path %_libdir/libsvn_swig

%description
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains command-line subversion utilities: svn and
svnversion. For more utilities please look for packages subversion-tools
and subversion-server-common.

%package -n lib%name
Summary: Shared libraries required for subversion
Group: System/Libraries
Requires: libapr >= %apr_ver

%description -n lib%name
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.

%package -n lib%name-devel
Summary: Development files for applications which will use subversion libraries
Group: Development/C
Provides: %name-devel = %version-%release
Requires: lib%name = %version-%release
Requires: libapr-devel >= %apr_ver

%description -n lib%name-devel
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.

%package -n lib%name-devel-static
Summary: Static libraries for developing statically linked applications which will use subversion libraries
Group: Development/C
Requires: lib%name-devel = %version-%release

%description -n lib%name-devel-static
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.

%if_with swig_py
%package python
Summary: Pyhton bindings for Subversion
Group: Development/Other
Requires: lib%name = %version-%release

%description python
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains the files necessary to use the subversion library
functions within python scripts.
%endif

%if_with swig_pl
%package perl
Summary: Perl bindings for Subversion
Group: Development/Other
Requires: lib%name = %version-%release

# The following dependecies where found before 'relaxed' _perl_req_method:

#   perl(File/Temp.pm)
#   perl(IO/Handle.pm)
#   perl(Symbol.pm)
#   perl(overload.pm)
#   perl(warnings.pm) - still found automatically
# Now we need to specify dependencies manually (except thouse still found automatically)
Requires: perl(File/Temp.pm)
Requires: perl(IO/Handle.pm)
Requires: perl(Symbol.pm)
Requires: perl(overload.pm)

%description perl
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains the files necessary to use the subversion library
functions within perl scripts.
%endif

%if_with swig_rb
%package ruby
Summary: Ruby bindings for Subversion
Group: Development/Other
Requires: lib%name = %version-%release

%description ruby
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains the files necessary to use the subversion library
functions within ruby scripts.
%endif

%if_with swig_java
%package java
Summary: Java bindings for Subversion
Group: Development/Other
Requires: lib%name = %version-%release
%endif

%if_with javahl
%package javahl
Summary: JavaHL bindings for Subversion
Group: Development/Other
Requires: lib%name = %version-%release

%description javahl
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains the files necessary to use the subversion library
functions within java.
%endif

%package -n emacs-%name
Summary: Subversion support for Emacs
Group: Editors
Requires: %name

%description -n emacs-%name
vc-svn is a VC backend for Subversion.ataff
psvn is an interface for subversion. psvn provides a similar interface
for subversion as pcl-cvs for cvs.

All Emacs Lisp code is byte-compiled, install emacs-%name-el for sources.

%package -n emacs-%name-el
Summary: The Emacs Lisp sources for bytecode included in emacs-%name
Group: Editors

%description -n emacs-%name-el
emacs-%name-el contains the Emacs Lisp sources for the bytecode
included in emacs-%name package

%package doc
Summary: Subversion documentation
Group: Books/Other
Requires(post): %install_info
Requires(preun): %uninstall_info

%description doc
This package contains subversion documentation:
+ the "Version Control with Subversion" book,
+ documents for Subversion programmers,
+ documents for Subversion users.

%package server-common
Summary: Common files required to maintain subversion server
Group: System/Servers
Requires: lib%name = %version-%release

%description server-common
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains common files required for maintaing subversion
repositories.

%package server-standalone
Summary: Subversion standalone server
Group: System/Servers
Requires: %name-server-common = %version-%release

%description server-standalone
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains scripts for running standalone subversion server.

%package server-dav
Summary: Subversion server module for Apache
Group: System/Servers
Requires: %name-server-common = %version-%release
%if_with dav
BuildPreReq: apache2-devel
Requires: apache2
%endif

%description server-dav
The goal of the Subversion project is to build a revision system that is
a compelling replacement for CVS in the open community.  The software is
released under an Apache/BSD-style source license.  See the status page
for current progress.
This package contains the apache2 server shared module for running
subversion server.

%package tools
Summary: Tools for subversion
Group: Development/Other
Requires: %name = %version-%release
Requires: %name-server-common = %version-%release
Requires: %name-python = %version-%release
BuildPreReq: perl-URI

%description tools
Tools for Subversion.  This package includes:
+ hook scripts
+ bash completion,
+ other useful scripts (hot-backup.py, server-vsn.py, showchange.pl),
+ some scripts and code examples.

%package -n bash-completion-svn
Summary: Bash completion for subversion
Group: Development/Other

%description -n bash-completion-svn
Bash completion for subversion

%description -n emacs-%name
vc-svn is a VC backend for Subversion.ataff
psvn is an interface for subversion. psvn provides a similar interface
for subversion as pcl-cvs for cvs.

All Emacs Lisp code is byte-compiled, install emacs-%name-el for sources.

%prep
%setup -q -n %name-%version%svn_ver_pre

# Might be required to build with libneon-0.25

#%%patch1

%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
#%%patch6 -p1
# patch7 applied in upstream
#%patch7 -p1
#patch8 -p1
#patch9: cant apply
#%patch9
%if_with M24
%patch10 -p1
%endif
%patch11 -p1
# Note: this patch is required for sisyphus only, but hopefuly it will
# not break build for M24
%patch12 -p1
%patch13 -p1
#%%patch14 -p1
%patch15 -p1

rm -rf apr apr-util neon

%__mv -f contrib/client-side/vc-svn.el contrib/client-side/vc-svn.el.bak
%__cp %SOURCE7 contrib/client-side/vc-svn.el

%__cp %SOURCE8 .

%if_with M24
# HACK! Needed to remove dependency on File::Path 1.0404 for Master2.4 branch
subst 's|^\(use File::Path\).*|\1;|' contrib/client-side/svn_load_dirs.pl.in
%endif

%build
LIBTOOL_M4=%_datadir/libtool/aclocal/libtool.m4 ./autogen.sh

#CONFIGURE_OPTS="--disable-all-static --disable-rpath"

CONFIGURE_OPTS="%{subst_enable static} --disable-rpath --enable-shared --with-berkeley-db"
# --enable-dso Turn on DSO loading of RA libraries
# Using this option causes to fail some tests:
#   repos_test for FS_TYPE=bdb
#   6ra perl test
#   javahl tests
CONFIGURE_OPTS="$CONFIGURE_OPTS %{subst_enable dso}"
CONFIGURE_OPTS="$CONFIGURE_OPTS --with-ssl --with-neon=%prefix"
CONFIGURE_OPTS="$CONFIGURE_OPTS --with-apr=%prefix --with-apr-util=%prefix"

%if_with dav
CONFIGURE_OPTS="$CONFIGURE_OPTS --with-apxs=%apache_apxs"
%endif

%if_with javahl
CONFIGURE_OPTS="$CONFIGURE_OPTS --enable-javahl --with-jdk=%_libdir/j2se --with-jikes=no"
CONFIGURE_OPTS="$CONFIGURE_OPTS --with-junit=/usr/share/java/junit.jar"
%endif

%if_with swig_rb
CONFIGURE_OPTS="$CONFIGURE_OPTS --with-ruby-sitelibdir=%ruby_sitelibdir --with-ruby-sitearchdir=%ruby_sitearchdir"
%endif

%add_optflags %optflags_shared

SVN_DB_LIBS=-ldb-4
export SVN_DB_LIBS
%configure $CONFIGURE_OPTS
%make_build

%if_with svn_push
%make_build contrib/client-side/svn-push/svn-push
%endif

%if_with swig_py
%make_build libdir=%_libdir/libsvn_swig swig_pydir=%python_sitelibdir/libsvn swig_pydir_extra=%python_sitelibdir/svn swig-py
%endif

%if_with swig_pl
%make_build libdir=%_libdir/libsvn_swig swig-pl-lib
pushd subversion/bindings/swig/perl/native
# This does not work (libraries are being build with RPATH entries)
#%%perl_vendor_build all

%__perl Makefile.PL INSTALLDIRS=vendor PREFIX=%_prefix
# Remove RPATH
#%__subst 's:^LD_RUN_PATH = .*:LD_RUN_PATH =:' Makefile Makefile.[a-z]*
# Add RPATH entry %_libdir/libsvn_swig
#%__subst 's|^\(LD_RUN_PATH = .*\)|\1:%_libdir/libsvn_swig|' Makefile Makefile.[a-z]*
%__subst 's|^\(LD_RUN_PATH =\).*|\1 %_libdir/libsvn_swig|' Makefile Makefile.[a-z]*
%make_build libdir=%_libdir/libsvn_swig all

popd
%endif

%if_with swig_java
%make_build swig-java
%endif

%if_with swig_rb
%make_build libdir=%_libdir/libsvn_swig swig-rb
%endif

%if_with javahl
#%%make_build javahl
# This is workaround to build on SMP machines until makefile is fixed
%make_build javahl-java
%make_build javahl-javah
%make_build javahl-lib


%endif

%if_with doc
# Build subversion documentation
%make XSL_DIR=/usr/share/xml/docbook/xsl-stylesheets \
   doc-all-html doc-all-info

doxygen doc/doxygen.conf
%endif
#hook-scripts/mailer

# Building emacs-subversion files

emacs -batch --eval '(byte-compile-file "contrib/client-side/vc-svn.el")'
emacs -batch --eval '(byte-compile-file "contrib/client-side/psvn/psvn.el")'

# Fix paths in scripts

%__subst 's:^\(SVN=\).*:\1%_bindir/svn:' contrib/client-side/asvn
%__subst 's:#!/usr/bin/env python2:#!/usr/bin/env python:' tools/hook-scripts/mailer/mailer.py
%__subst 's:/usr/bin/env python2$:/usr/bin/env python:' tools/hook-scripts/*.py

# Running tests

%if_enabled check

# There is a workaround to run tests in a chrooted environment

# We need to set LD_LIBRARY_PATH to make all tests executed successfuly
PWD=`pwd`
LDLP=`find subversion -type d -name .libs|while read dir; do echo "$PWD/$dir"; done|xargs echo|tr ' ' ':'`

# Perform generic tests against bdb and fsfs

%if_with fsfs_check
#%make check-clean
# CLEANUP=true
LD_LIBRARY_PATH="$LDLP" %make FS_TYPE=fsfs check
%make check-clean
%endif # with fsfs_check

%if_with bdb_check
# HACK: remove repos-test from TEST_PROGRAMS list
buildmk=build-outputs.mk
#mv -f "$buildmk" "$buildmk.bak"
#sed -e 's:^\(TEST_PROGRAMS = .*\)\(subversion/tests/libsvn_repos/repos-test\$(EXEEXT)\)\(.*\):\1\3:' "$buildmk.bak" >"$buildmk"
LD_LIBRARY_PATH="$LDLP" %make FS_TYPE=bdb check
# restore build-outputs.mk
#mv -f "$buildmk.bak" "$buildmk"
%endif # with bdb_check

%if_with swig_pl
%if_with pl_check
# Perform perl bindings tests
# Tests fail, I do not know why

# Temporarily disable 6ra test (it fails)

#mv -f subversion/bindings/swig/perl/native/t/6ra.t subversion/bindings/swig/perl/native/t/6ra.t.bak
LD_LIBRARY_PATH="$LDLP" %make check-swig-pl
%endif # with pl_check
%endif # with swig_pl

%if_with swig_rb
%if_with rb_check
# Perform ruby bindings tests
LD_LIBRARY_PATH="$LDLP" %make check-swig-rb
%endif # with rb_check
%endif #with swig_rb

# Perform JavaHL tests

%if_with javahl
%if_with javahl_check
%make JAVA_CLASSPATH=%_javadir/junit.jar javahl-tests
LD_LIBRARY_PATH="$LDLP" %make JAVA_CLASSPATH=%_javadir/junit.jar check-javahl
%endif # with javahl_check
%endif # with javahl

%endif # enabled check

%install
# Setting to relaxed untill #9307 resolved
# The following dependecies where found before 'relaxed':
#   perl(File/Temp.pm)
#   perl(IO/Handle.pm)
#   perl(Symbol.pm)
#   perl(overload.pm)
#   perl(warnings.pm)
%set_perl_req_method relaxed

%make_install DESTDIR=%buildroot install
%__mkdir -p %buildroot%_sysconfdir/%name
%__tar xjf %SOURCE2 -C %buildroot%_sysconfdir/%name

use_svnwrapper()
{
local destbindir=%buildroot%_bindir
local target=$1
local suffix=".bin"
local wrappername="svnwrapper"
%__mv "$destbindir/$target" "$destbindir/$target$suffix"
%__ln_s "$wrappername" "$destbindir/$target"
}

# Installing svnwrapper

%__cp %SOURCE6 %buildroot%_bindir
# Making svnserve to use svnwrapper
# Do not forget to update %%files section if using wrappers for other binaries
use_svnwrapper svnserve
#use_svnwrapper svn
#use_svnwrapper svnadmin

%if_with svn_push
%__install -m 755 contrib/client-side/svn-push/.libs/svn-push %buildroot%_bindir
%endif

# Create directory for libsvn_swig libraries

mkdir -p %buildroot%_libdir/libsvn_swig

%if_with swig_py
%make_install DESTDIR=%buildroot swig_py_libdir=%_libdir/libsvn_swig \
   swig_pydir=%python_sitelibdir/libsvn swig_pydir_extra=%python_sitelibdir/svn install-swig-py
rm -f %buildroot%_libdir/libsvn_swig/libsvn_swig_py*.la
#%__install -d %buildroot%python_sitelibdir
#%__rm -f %buildroot%_libdir/svn-python/libsvn/*.a %buildroot%_libdir/svn-python/libsvn/*.la
#%__mv %buildroot%_libdir/svn-python/libsvn %buildroot%python_sitelibdir
#%__rm -rf %buildroot%_libdir/svn-python
%__cp -r %_builddir/%buildsubdir/subversion/bindings/swig/python/svn %buildroot%python_sitelibdir
%endif

%if_with swig_pl
%make_install DESTDIR=%buildroot PREFIX=%_prefix swig_pl_libdir=%_libdir/libsvn_swig install-swig-pl
#%make_install DESTDIR=%buildroot swig_pl_libdir=%_libdir/libsvn_swig install-swig-pl-lib
#pushd subversion/bindings/swig/perl/native
#%make_install DESTDIR=%buildroot PREFIX=%_prefix install
##%%perl_vendor_install
#popd
rm -f %buildroot%perl_vendor_man3dir/SVN::*3*
rm -f %buildroot%_libdir/libsvn_swig/libsvn_swig_pl*.la
%endif

%if_with swig_rb
%make_install DESTDIR=%buildroot swig_rb_libdir=%_libdir/libsvn_swig install-swig-rb
rm -f %buildroot%ruby_sitearchdir/svn/ext/*.la
rm -f %buildroot%_libdir/libsvn_swig/libsvn_swig_ruby*.la
%endif

%if_with swig_java
%make_install DESTDIR=%buildroot install-swig-java
%endif

# Installing javahl bindings

%if_with javahl
%make_install DESTDIR=%buildroot \
javahl_javadir=%_javadir javahl_javahdir=%_includedir/svn-javahl \
install-javahl
%endif

# Installing emacs-subversion files

%__mkdir -p %buildroot%_emacslispdir/%name
%__install -m 644 contrib/client-side/vc-svn.el* %buildroot%_emacslispdir/%name
%__install -m 644 contrib/client-side/psvn/psvn.el* %buildroot%_emacslispdir/%name
%__mkdir -p %buildroot%_sysconfdir/emacs/site-start.d
%__install -m 644 %SOURCE1 %buildroot%_sysconfdir/emacs/site-start.d

%define docdir %_docdir/%name-%version
%__rm -rf %buildroot%docdir
%__mkdir_p %buildroot%docdir
%__install -p -m644 BUGS CHANGES COMMITTERS COPYING HACKING INSTALL README \
%buildroot%docdir/
%if_with doc
# Installing subversion-doc files
%make_install DESTDIR=%buildroot install-docs
#%make_install XSL_DIR=/usr/share/xml/docbook/xsl-stylesheets \
#    INSTALL_DIR=%buildroot%docdir/doc/book \
#    -C doc/book install-misc-html
%make_install INSTALL_DIR=%buildroot%docdir/ -C ./doc install-misc-html

%__mkdir -p %buildroot%docdir/book/
#%__bzip2 -qc9 doc/book/book/book.ps >%buildroot%docdir/doc/book/book.ps.bz2
# TODO: svn-book.{pdf,html} temporary disabled (Hope, until release)
#%__install -p -m644 doc/book/svn-book.pdf %buildroot%docdir/book/
#%__install -p -m644 doc/book/svn-book.html %buildroot%docdir/book/
%__cp -r doc/user %buildroot%docdir/
%__cp doc/README %buildroot%docdir/DOCS.README
%__mkdir -p %buildroot%docdir/programmer/design
%__install -m644 doc/programmer/*.txt %buildroot%docdir/programmer/
%__install -m644 doc/programmer/design/*.html %buildroot%docdir/programmer/design/
#%__cp -r doc/translations %buildroot%docdir/

%__install -m644 doc/programmer/design/*.info* %buildroot%_infodir/

# Install API docs

#%__mkdir %buildroot%docdir/api
%__cp -r doc/doxygen/html/ %buildroot%docdir/api
%endif

%if_with server
# Installing subversion-server files
%__mkdir_p %buildroot%svn_repo_dir
%__mkdir_p %buildroot%_sysconfdir/rc.d/init.d %buildroot%_sysconfdir/sysconfig
%__install -m 755 %SOURCE3 %buildroot%_sysconfdir/rc.d/init.d/%svn_service
%__install -m 644 %SOURCE4 %buildroot%_sysconfdir/sysconfig/%svn_service

%if_with dav
%__mkdir -p %buildroot%apache_addonconfdir
%__install -m 644 %SOURCE5 %buildroot%apache_addonconfdir/A.subversion.conf
%endif
%endif

# Installing subversion-tools files

%if_with oldtoolsinstall
%__mkdir -p %buildroot%_svn_tools_dir/hook-scripts
%__mkdir -p %buildroot%_defaultdocdir/%name-tools-%version/hook-scripts
%__install -m 755 tools/backup/hot-backup.py %buildroot%_svn_tools_bindir/
%__cp -r tools/client-side/* %buildroot%_svn_tools_bindir/
%__mv -f %buildroot%_svn_tools_dir/bash_completion_test %buildroot%_defaultdocdir/%name-tools-%version/
%__cp tools/hook-scripts/*.pl tools/hook-scripts/*.py tools/hook-scripts/mailer/*.py \
%buildroot%_svn_tools_dir/hook-scripts/
# commit-access-control.pl has unresolved dependencies
%__mv -f -- %buildroot%_svn_tools_dir/hook-scripts/commit-access-control.pl %buildroot%_defaultdocdir/%name-tools-%version/hook-scripts/
%__cp tools/hook-scripts/README tools/hook-scripts/*.example tools/hook-scripts/mailer/*.example \
%buildroot%_defaultdocdir/%name-tools-%version/hook-scripts/
%__cp -r tools/examples %buildroot%_defaultdocdir/%name-tools-%version/
#%__cp -r tools/dev %buildroot%_svn_tools_dir/
%__cp tools/xslt/svnindex.* %buildroot%_svn_tools_dir/
%__cp -r contrib/client-side/{asvn,*.pl,wcgrep} %buildroot%_svn_tools_dir/
%__cp -r contrib/client-side/{*.vim,*.README,*.example} \
%buildroot%_defaultdocdir/%name-tools-%version/
%else
%make_install -f Makefile-tools DESTDIR=%buildroot bindir=%_bindir \
docdir=%_defaultdocdir/%name-tools-%version \
toolsdir=%_svn_tools_dir
# commit-access-control.pl has unresolved dependencies
%__mv -f -- %buildroot%_svn_tools_dir/hook-scripts/commit-access-control.pl %buildroot%_defaultdocdir/%name-tools-%version/hook-scripts/
%endif

# Installing bash-completion file

%__mkdir -p %buildroot/etc/bash_completion.d
%__install -m 644 tools/client-side/bash_completion %buildroot/etc/bash_completion.d/svn

%find_lang %name

%post -n lib%name -p %post_ldconfig
%postun -n lib%name -p %postun_ldconfig

%post doc
%install_info svn-design.info

%preun doc
%uninstall_info svn-design.info

%pre server-common
/usr/sbin/groupadd -r -f %svn_group
/usr/sbin/useradd -r -g %svn_group -d %svn_repo_dir -s /dev/null -c 'Subversion' %svn_user >/dev/null 2>&1 ||:
if [ $1 -gt 1 ]; then
/usr/sbin/usermod -d %svn_repo_dir %svn_user
fi

%post server-standalone
%post_service %svn_service

%preun server-standalone
%preun_service %svn_service

%postun server-dav
/sbin/service httpd2 condreload ||:

%files -f %name.lang
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/config
%config(noreplace) %_sysconfdir/%name/servers
%_sysconfdir/%name/README.txt
%_bindir/svn
%_bindir/svnversion
%_mandir/man1/svn.1.*
%_mandir/man1/svnversion.1.*
%dir %docdir
%docdir/[A-Z]*

%files -n lib%name
%_libdir/libsvn_*-*.so.*
%dir %_libdir/libsvn_swig
#%exclude %_libdir/libsvn_swig_py*.so.*
#%exclude %_libdir/libsvn_swig_perl*.so.*
#%exclude %_libdir/libsvn_swig_ruby*.so.*

%files -n lib%name-devel
%_libdir/libsvn_*-*.so
%_includedir/%name-1
%exclude %_libdir/libsvn_swig*

%if_enabled static
%files -n lib%name-devel-static
%_libdir/libsvn_*.a
%endif

%if_with swig_py
%files python
%_libdir/libsvn_swig/libsvn_swig_py*.so.*
%python_sitelibdir/svn
%python_sitelibdir/libsvn
%endif

%if_with swig_pl
%files perl
%_libdir/libsvn_swig/libsvn_swig_perl*.so.*
%perl_vendor_archlib/SVN
%perl_vendor_autolib/SVN
#%perl_vendor_man3dir/SVN*
%endif

%if_with swig_rb
%files ruby
%_libdir/libsvn_swig/libsvn_swig_ruby*.so.*
%dir %ruby_sitelibdir/svn/
%ruby_sitelibdir/svn/*.rb
%dir %ruby_sitearchdir/svn/
%dir %ruby_sitearchdir/svn/ext/
%ruby_sitearchdir/svn/ext/*.so
%endif

%if_with swig-java
%files java
%endif

%if_with javahl
%files javahl
%_libdir/libsvnjavahl*.so.*
%_javadir/svn-javahl.jar
%endif

%files -n emacs-%name
%_sysconfdir/emacs/site-start.d/*.el
%dir %_emacslispdir/%name
%_emacslispdir/%name/*.elc

%files -n emacs-%name-el
%_emacslispdir/%name/*.el

%if_with doc
%files doc
%_infodir/svn-design*
%docdir/DOCS.README
%docdir/book
%docdir/misc-docs
%docdir/programmer
%docdir/user
%docdir/api
%endif

%if_with server
%files server-common
%_bindir/svnserve*
%_bindir/svnadmin
%_bindir/svnlook
%_bindir/svndumpfilter
%_bindir/svnwrapper
%_mandir/man1/svnadmin.1.*
%_mandir/man1/svnlook.1.*
%_mandir/man1/svndumpfilter.1.*
%_mandir/man5/svnserve.conf.5.*
%_mandir/man8/svnserve.8.*
%defattr(640,%svn_user,%svn_group,2710)
%dir %svn_repo_dir

%files server-standalone
%_sysconfdir/rc.d/init.d/%svn_service
%config(noreplace) %_sysconfdir/sysconfig/%svn_service

%if_with dav
%files server-dav
%config(noreplace) %apache_addonconfdir/*.conf
%apache_moduledir/*.so
%endif
%endif

%files tools -f %name-tools.list
%_svn_tools_dir
%_defaultdocdir/%name-tools-%version
%if_with svn_push
%_bindir/svn-push
%endif

%files -n bash-completion-svn
/etc/bash_completion.d/*

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005