2007-01-15 23:38:11 +00:00
#
2011-03-04 13:12:38 +00:00
# spec file for package subversion
2007-01-15 23:38:11 +00:00
#
2012-02-14 01:06:19 +00:00
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
2010-09-27 13:53:08 +00:00
# Copyright (c) 2009-2010 Pascal Bleser <pascal.bleser@opensuse.org>
2007-01-15 23:38:11 +00:00
#
2008-09-06 01:45:22 +00:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2007-01-15 23:38:11 +00:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-05-31 12:09:14 +00:00
# Subversion as of 1.7.4 does not work with ruby 1.9 in Factory
%define with_ruby 0%{?suse_version} > 1110 && 0%{?suse_version} < 1220
2011-08-17 08:52:19 +00:00
%define with_intree_swig 0%{?suse_version} != 1110
2011-10-23 15:26:21 +00:00
%if 0%{?always_use_intree_sqlite:1}
2011-08-02 16:05:34 +00:00
%define with_intree_sqlite 1
2011-08-19 15:39:57 +00:00
%define with_python_ctypes 0%{?suse_version} > 1110
2011-08-02 16:05:34 +00:00
%else
2011-07-27 14:15:40 +00:00
%define with_intree_sqlite 0%{?suse_version} < 1110
2011-08-19 15:39:57 +00:00
%define with_python_ctypes 0
2011-08-02 16:05:34 +00:00
%endif
2011-12-01 20:22:12 +00:00
%if %suse_version >= 1220
2011-11-02 19:26:58 +00:00
%define with_python_ctypes 0
%endif
2011-10-21 15:47:02 +00:00
%define with_kde4_kwallet 0%{?suse_version} > 1100
%define with_gnome_keyring 0%{?suse_version} > 1100
2008-02-15 00:41:45 +00:00
2012-05-31 12:09:14 +00:00
%bcond_without serf
2011-08-23 22:34:50 +00:00
2012-05-31 12:09:14 +00:00
# do not run regression tests for Factory, unless --with=regression_tests
%if 0%{?suse_version} > 1210
%bcond_with regression_tests
%else
# run regression tests for previous releases, unless --without=regression_tests
2012-01-03 15:19:50 +00:00
%bcond_without regression_tests
2012-05-31 12:09:14 +00:00
%endif # suse_version
2012-01-03 15:19:50 +00:00
2012-03-10 01:32:18 +00:00
%if 0%{?sles_version} > 10 && 0%{?sles_version} < 12
%define with_bashcomp 0
%else
%define with_bashcomp 1
%endif
2007-01-15 23:38:11 +00:00
Name : subversion
2012-05-31 12:09:14 +00:00
Version : 1.7.5
2012-02-26 23:10:09 +00:00
Release : 0
2009-06-09 15:49:58 +00:00
# in-tree SWIG version to use for the build:
%define swig_version 1.3.36
2011-10-23 19:17:14 +00:00
%define sqlite_version 3.7.6.3
%define sqlite_pkg_version 3070603
2012-02-26 23:10:09 +00:00
BuildRequires : apache2-devel
BuildRequires : db-devel
BuildRequires : file-devel
BuildRequires : gcc-c++
BuildRequires : libstdc++-devel
BuildRequires : libtool
BuildRequires : pkgconfig
BuildRequires : python-devel
BuildRequires : python-xml
2011-10-21 21:46:23 +00:00
BuildRequires : update-alternatives
2012-02-26 23:10:09 +00:00
BuildRequires : zlib-devel
2012-03-10 01:32:18 +00:00
%if %with_bashcomp
BuildRequires : bash-completion
%endif #with_bashcomp
2009-06-09 15:49:58 +00:00
%if %with_python_ctypes
2011-10-23 15:26:21 +00:00
BuildRequires : ctypesgen
2011-10-21 21:46:23 +00:00
%endif
2009-06-09 15:49:58 +00:00
%if %with_ruby
BuildRequires : ruby-devel
%endif # with_ruby
BuildRequires : apache2-prefork
BuildRequires : cyrus-sasl-devel
%if %with_gnome_keyring
BuildRequires : dbus-1-devel
2010-01-07 12:03:44 +00:00
BuildRequires : glib2-devel
%if 0%{?suse_version} >= 1130
BuildRequires : libgnome-keyring-devel
%else
BuildRequires : gnome-keyring-devel
%endif
2009-06-09 15:49:58 +00:00
%endif # with_gnome_keyring
2012-05-31 12:09:14 +00:00
%if %{with serf}
2011-10-21 15:47:02 +00:00
BuildRequires : libserf-devel
2011-08-23 22:34:50 +00:00
%endif
2009-06-09 15:49:58 +00:00
%if %with_kde4_kwallet
2012-02-26 23:10:09 +00:00
BuildRequires : dbus-1-devel
BuildRequires : kdelibs4-core
BuildRequires : libkde4-devel
BuildRequires : libqt4-devel
2009-06-09 15:49:58 +00:00
%endif # with_kde4_kwallet
2011-07-27 14:48:34 +00:00
%if 0%{?suse_version} >= 1130
2009-06-09 15:49:58 +00:00
%define with_java 1
2011-10-21 21:46:23 +00:00
BuildRequires : java-devel >= 1.6.0
BuildRequires : junit
2009-06-09 15:49:58 +00:00
%else
2011-07-27 14:51:53 +00:00
%define with_java 0
2011-10-21 21:46:23 +00:00
%endif
2007-10-29 11:30:52 +00:00
%if 0%{?suse_version} > 1030
BuildRequires : libneon-devel
%else
2012-02-26 23:10:09 +00:00
BuildRequires : neon-devel
BuildRequires : openldap2-devel
2009-06-09 15:49:58 +00:00
%endif # suse_version > 1030
2009-10-23 14:00:56 +00:00
# for %check section, to find a free port:
BuildRequires : iproute2
2007-04-28 12:34:43 +00:00
#
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
2007-01-15 23:38:11 +00:00
#
2009-06-09 15:49:58 +00:00
%define apxs /usr/sbin/apxs2
2007-01-15 23:38:11 +00:00
%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR)
2009-10-23 14:00:56 +00:00
%define apache_mmn %(MMN="$(%{apxs} -q LIBEXECDIR)_MMN"; test -x "$MMN" && "$MMN")
2009-06-09 15:49:58 +00:00
%if %{!?site_python:1}0
%define site_python %(%__python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
%endif
2007-01-15 23:38:11 +00:00
#
PreReq : %insserv_prereq %fillup_prereq
#
2011-10-21 15:57:03 +00:00
Summary : Subversion version control system
2012-02-26 23:10:09 +00:00
License : Apache-2.0
2007-01-15 23:38:11 +00:00
Group : Development/Tools/Version Control
2012-02-26 23:10:09 +00:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2010-11-24 18:36:35 +00:00
Url : http://subversion.apache.org
2011-10-21 15:57:03 +00:00
Source0 : http://www.apache.org/dist/subversion/subversion-%{version} .tar.bz2
2007-01-15 23:38:11 +00:00
Source1 : subversion.conf
Source2 : subversion.README.SuSE
2009-06-10 00:21:40 +00:00
Source3 : svnmerge.py
2011-10-23 19:17:14 +00:00
Source4 : contrib-1187941.tar.bz2
2007-01-15 23:38:11 +00:00
Source9 : subversion.rcsvnserve
Source10 : subversion.sysconfig.svnserve
2007-04-28 12:34:43 +00:00
Source12 : subversion.sysconfig.svnserve.remoteaccess
2007-06-20 17:33:17 +00:00
Source13 : subversion.xinetd.svnserve
2007-01-15 23:38:11 +00:00
Source42 : subversion.svngrep.sh
Source43 : subversion.svndiff.sh
2011-07-21 14:47:59 +00:00
%if %with_intree_swig
2009-10-23 14:00:56 +00:00
# http://ovh.dl.sourceforge.net/project/swig/swig/swig-%{swig_version}/swig-%{swig_version}.tar.gz
2009-06-09 15:49:58 +00:00
Source90 : swig-%{swig_version} .tar.bz2
2011-07-27 14:15:40 +00:00
%else
BuildRequires : swig
2011-07-21 14:47:59 +00:00
%endif
2009-06-09 15:49:58 +00:00
%if %with_intree_sqlite
# http://www.sqlite.org/sqlite-amalgamation-%{sqlite_version}.tar.gz
2011-10-23 19:17:14 +00:00
Source91 : sqlite-autoconf-%{sqlite_pkg_version} .tar.bz2
2009-06-09 15:49:58 +00:00
%else
2011-07-21 14:59:13 +00:00
BuildRequires : sqlite3-devel >= %{sqlite_version}
2011-08-02 16:05:34 +00:00
%requires_ge libsqlite3-0
2009-06-09 15:49:58 +00:00
%endif # with_intree_sqlite
2009-10-23 14:00:56 +00:00
Source92 : %{name} .rpmlintrc
2007-01-15 23:38:11 +00:00
#
Patch11 : subversion.libtool-verbose.patch
# build fixes
Patch20 : subversion-swig-perl-install_vendor.patch
Patch23 : subversion.libtool-pie-flags.patch
Patch31 : subversion.perl.LD_RUN_PATH.patch
2010-09-27 13:53:08 +00:00
Patch37 : subversion-no-build-date.patch
2010-09-29 08:17:03 +00:00
# PATCH-FEATURE-UPSTREAM subversion-neon-systemproxy.patch dimstar@opensuse.org -- Use system proxy offered by neon, if no specific config is used (Thus, actually using libproxy in the background to use 'the right proxy' as configured in the system).
Patch38 : subversion-neon-systemproxy.patch
2012-05-31 12:09:14 +00:00
# PATCH-FIX-UPSTREAM subversion-1.7.4-ruby-1.9-RbConfig.patch andreas.stieger@gmx.de -- Fixes warning/error in ruby 1.9 "Use RbConfig instead of obsolete and deprecated Config"
Patch39 : subversion-1.7.4-ruby-1.9-RbConfig.patch
2012-06-11 14:40:09 +00:00
Patch40 : subversion.kwallet.patch
2007-01-15 23:38:11 +00:00
#
2009-06-09 15:49:58 +00:00
%if %with_ruby
%if %{!?rb_arch:1}0
%define rb_arch %(echo "%{_host_cpu}-%{_os}" | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/")
%endif
%if %{!?rb_major_ver:1}0
%define rb_major_ver %(/usr/bin/ruby -e 'puts VERSION'|cut -f1,2 -d.)
%endif
%if %{!?site_ruby:1}0
%define site_ruby %{_usr}/%{_lib}/ruby/site_ruby/%{rb_major_ver}
%endif
%endif # with_ruby
%if %with_java
Provides : subversion-javahl = %{version} -%{release}
%endif # with_java
2007-01-15 23:38:11 +00:00
%description
2011-10-21 15:57:03 +00:00
Subversion exists to be universally recognized and adopted as an open-source,
centralized version control system characterized by its reliability as a safe
haven for valuable data; the simplicity of its model and usage; and its ability
to support the needs of a wide variety of users and projects, from individuals
to large-scale enterprise operations.
2007-01-15 23:38:11 +00:00
%package devel
Summary : Development package for Subversion developers
2012-02-26 23:10:09 +00:00
Group : Development/Libraries/C and C++
2007-01-15 23:38:11 +00:00
Requires : subversion = %{version}
2007-12-13 20:03:06 +00:00
# this pulls in libapr1-devel and libexpat-devel
Requires : libapr-util1-devel
2007-01-15 23:38:11 +00:00
%description devel
The subversion-devel package includes the static libraries and include
files for developers interacting with the subversion package.
%package tools
Summary : Tools for Subversion
2012-02-26 23:10:09 +00:00
Group : Development/Tools/Version Control
2007-01-15 23:38:11 +00:00
%description tools
2011-10-21 15:57:03 +00:00
This package contains some tools for subversion server and
repository admins.
2007-01-15 23:38:11 +00:00
%package perl
2010-09-27 13:53:08 +00:00
Summary : Allows Perl scripts to directly use Subversion repositories
2012-02-26 23:10:09 +00:00
Group : Development/Tools/Version Control
2010-09-27 13:53:08 +00:00
Requires : perl = %{perl_version}
2012-05-31 12:09:14 +00:00
Requires : perl >= 5.8
Requires : subversion = %{version}
2007-01-15 23:38:11 +00:00
%description perl
Provides Perl (SWIG) support for Subversion.
%package python
2010-09-27 13:53:08 +00:00
Summary : Allows Python scripts to directly use Subversion repositories
2012-02-26 23:10:09 +00:00
Group : Development/Tools/Version Control
2007-01-15 23:38:11 +00:00
Requires : subversion = %{version}
%description python
2009-06-09 15:49:58 +00:00
Provides Python (SWIG) support for Subversion.
%if %with_python_ctypes
2007-01-15 23:38:11 +00:00
2009-06-09 15:49:58 +00:00
%package python-ctypes
Summary : High-Level Python Bindings for Subversion
2012-02-26 23:10:09 +00:00
Group : Development/Tools/Version Control
2009-06-09 15:49:58 +00:00
Requires : subversion = %{version}
%description python-ctypes
Provides high-level Python support for Subversion, based on ctypes.
%endif # with_python_ctypes
%if %with_ruby
%package ruby
2010-09-27 13:53:08 +00:00
Summary : Allows Ruby scripts to directly use Subversion repositories
2012-02-26 23:10:09 +00:00
Group : Development/Tools/Version Control
2009-06-09 15:49:58 +00:00
Requires : subversion = %{version}
%description ruby
Provides Ruby (SWIG) support for Subversion.
2007-01-15 23:38:11 +00:00
2009-06-09 15:49:58 +00:00
%endif # with_ruby
2007-01-15 23:38:11 +00:00
%package server
Summary : Apache server module for Subversion server
2012-02-26 23:10:09 +00:00
Group : Development/Tools/Version Control
Requires : %{apache_mmn}
Requires : apache2
Requires : subversion = %{version}
2007-01-15 23:38:11 +00:00
%description server
The subversion-server package adds the Subversion server Apache module
to the Apache directories and configuration.
2011-10-23 19:17:14 +00:00
http://subversion.apache.org
2007-01-15 23:38:11 +00:00
2009-06-09 15:49:58 +00:00
%if %with_kde4_kwallet
2009-07-09 09:12:54 +00:00
%package -n libsvn_auth_kwallet-1-0
2009-06-09 15:49:58 +00:00
Summary : A Concurrent Versioning system similar to but better than CVS
Group : Development/Tools/Version Control
2009-07-09 09:12:54 +00:00
%description -n libsvn_auth_kwallet-1-0
2011-10-21 15:57:03 +00:00
Provides KWallet integration for Subversion.
2009-06-09 15:49:58 +00:00
%endif # with_kde4_kwallet
%if %with_gnome_keyring
2009-07-09 09:12:54 +00:00
%package -n libsvn_auth_gnome_keyring-1-0
2009-06-09 15:49:58 +00:00
Summary : A Concurrent Versioning system similar to but better than CVS
Group : Development/Tools/Version Control
2009-07-09 09:12:54 +00:00
%description -n libsvn_auth_gnome_keyring-1-0
2009-06-09 15:49:58 +00:00
Subversion does the same thing cvs (CVS (Concurrent Versioning System))
but has major enhancements compared to CVS. The name of the cmdline
client is svn.
%endif # with_gnome_keyring
2012-03-10 01:32:18 +00:00
%if %with_bashcomp
%package bash-completion
Summary : Bash Completion for %{name}
Group : Development/Tools/Version Control
Requires : %{name} = %{version}
Requires : bash-completion
%if %{?suse_version} >= 1130
BuildArch : noarch
%endif
%description bash-completion
Bash command line completion support for %{name} - completion of subcommands,
parameters and keywords for the svn command and other tools.
%endif # with_bashcomp
2007-01-15 23:38:11 +00:00
%prep
2011-07-27 14:15:40 +00:00
%if %with_intree_swig
2011-10-23 19:17:14 +00:00
%setup -q -n subversion-%{version} -a 4 -b 90
2011-07-27 14:15:40 +00:00
%else
2011-10-23 19:17:14 +00:00
%setup -q -n subversion-%{version} -a 4
2011-07-27 14:15:40 +00:00
%endif
2007-01-15 23:38:11 +00:00
#
2009-06-09 15:49:58 +00:00
%if %with_intree_sqlite
%__install -d ./sqlite-amalgamation
pushd ./sqlite-amalgamation
2011-10-23 19:17:14 +00:00
%__bzip 2 -d -c " %{SOURCE91} " | %__tar xf - " s q l i t e - a u t o c o n f - %{sqlite_pkg_version} / s q l i t e 3 . c "
%__mv " s q l i t e - a u t o c o n f - %{sqlite_pkg_version} / s q l i t e 3 . c " .
%__rm -rf " s q l i t e - a u t o c o n f - %{sqlite_pkg_version} "
2009-06-09 15:49:58 +00:00
popd #./sqlite-amalgamation
%endif # with_intree_sqlite
2007-11-05 23:38:23 +00:00
#
2009-06-09 15:49:58 +00:00
%patch11 -p0
2010-09-27 13:53:08 +00:00
%patch20
2009-06-09 15:49:58 +00:00
%patch23 -p0
2010-09-27 13:53:08 +00:00
%patch31
%patch37
2010-09-29 08:17:03 +00:00
%patch38
2012-05-31 12:09:14 +00:00
%patch39
2012-06-11 14:40:09 +00:00
%patch40
2007-01-15 23:38:11 +00:00
2010-09-27 13:53:08 +00:00
SQLITE_RECOMMENDED_VER=$(grep -E '^SQLITE_RECOMMENDED_VER=' configure.ac|cut -f2 -d=|cut -f2 -d\" )
#"
[ " $ S Q L I T E _ R E C O M M E N D E D _ V E R " = " %{sqlite_version} " ] || {
echo " E R R O R : r e c o m m e n d e d s q l i t e v e r s i o n i s $ S Q L I T E _ R E C O M M E N D E D _ V E R , b u t w e ' r e u s i n g %{sqlite_version} " >&2;
exit 1;
}
2007-01-15 23:38:11 +00:00
%build
2010-09-29 08:17:03 +00:00
# Re-boot strap, needed for patch37
./autogen.sh
2009-07-09 09:12:54 +00:00
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
2009-06-09 15:49:58 +00:00
%if 0%{?sles_version} == 9
mkdir BUILDPATH
%__ln_s " % { _ u s r } / b i n / p y t h o n 2 . 5 " " B U I L D P A T H / p y t h o n "
export PATH=" $ P W D / B U I L D P A T H : $ P A T H "
export PYTHON=" % { _ u s r } / b i n / p y t h o n 2 . 5 "
%endif
2011-07-21 14:47:59 +00:00
%if %with_intree_swig
2009-06-09 15:49:58 +00:00
SWIG_ROOT=`cd ..; pwd`/intree-swig
pushd " . . / s w i g - %{swig_version} "
CFLAGS=" %{optflags} " \
CXXFLAGS=" %{optflags} " \
./configure \
--prefix=" $ S W I G _ R O O T " \
--libdir=" $ S W I G _ R O O T / % { _ l i b } " \
--without-tcl \
--without-java \
--without-gcj \
--without-guile \
--without-mzscheme \
--without-ocaml \
--without-pike \
--without-chicken \
--without-csharp \
--without-lua \
--without-allegrocl \
--without-clisp \
--without-r \
2011-07-27 14:37:44 +00:00
--with-swiglibdir=" $ S W I G _ R O O T / s h a r e / s w i g "
2009-06-09 15:49:58 +00:00
%__make %{?jobs:-j%{jobs} }
%__make install
popd #swig
2011-07-21 14:47:59 +00:00
%endif
2007-01-15 23:38:11 +00:00
with_jdk=none
2009-06-09 15:49:58 +00:00
%if %with_java
2007-01-15 23:38:11 +00:00
for i in \
2008-12-19 14:15:53 +00:00
/usr/%{_lib}/jvm/java-openjdk \
2009-01-12 17:21:58 +00:00
/usr/%{_lib}/jvm/java \
/usr/%{_lib}/jvm/java-1.5.0-ibm \
2007-01-15 23:38:11 +00:00
/usr/%{_lib}/jvm/java-1.4.2-gcj \
/usr/%{_lib}/BEAJava2-1.4.2 \
/usr/%{_lib}/SunJava2-1.4.2 \
/usr/%{_lib}/jvm/java-1.4.2-sun \
/usr/lib/jvm/java-1.4.2-sun \
/usr/%{_lib}/jvm/java-1.5.0-ibm \
/usr/%{_lib}/jvm/java-1.5.0-sun \
/usr/lib/jvm/java-1.5.0-sun \
/usr/%{_lib}/jvm/java-1.4.2-ibm \
/usr/%{_lib}/jvm/IBMJava2-1.4.2 \
/usr/lib/BEAJava2-1.4.2 \
/usr/lib/SunJava2-1.4.2 \
/usr/lib/jvm/java-1.4.2-sun \
/usr/lib/IBMJava2-1.4 \
; do
if [ -d " $ i " ] ; then
with_jdk=" $ i "
break
fi
done
2009-06-09 15:49:58 +00:00
%endif # with_java
2007-01-15 23:38:11 +00:00
if [ " $ w i t h _ j d k " != " n o n e " ] ; then
with_jdk=" - - w i t h - j d k = $ w i t h _ j d k - - e n a b l e - j a v a h l "
echo with_jdk > with_jdk
cat > with_jdk.files <<EOF-JAVA
%{_libdir} /libsvnjavahl*.so.*
%{_libdir} /libsvnjavahl*.so
%dir %{_libdir} /svn-javahl
%{_libdir} /svn-javahl/svn-javahl.jar
2009-06-09 15:49:58 +00:00
%{_datadir} /java/svn-javahl.jar
2007-01-15 23:38:11 +00:00
EOF-JAVA
else
with_jdk=" "
rm -f with_jdk
echo -n '' > with_jdk.files
fi
2009-06-09 15:49:58 +00:00
%if !%with_java
2007-01-15 23:38:11 +00:00
with_jdk=" "
rm -f with_jdk
echo -n '' > with_jdk.files
2009-06-09 15:49:58 +00:00
%endif # !with_java
2007-01-15 23:38:11 +00:00
cat with_jdk.files
# ### these possibly need further discussion
# swig_pydir = @libdir@/svn-python/libsvn
# swig_pydir_extra = @libdir@/svn-python/svn
2008-07-15 22:26:38 +00:00
sed --in-place=~ "
2007-01-15 23:38:11 +00:00
s@^swig_pydir = .*@swig_pydir = %{site_python} /libsvn@
s@^swig_pydir_extra = .*@swig_pydir_extra = %{site_python} /svn@
2008-07-15 22:26:38 +00:00
" M a k e f i l e . i n
diff -u Makefile.in~ Makefile.in || true
2007-01-15 23:38:11 +00:00
sh -x autogen.sh
2007-10-16 16:33:45 +00:00
for i in subversion/bindings/javahl/native/*.cpp
2007-01-15 23:38:11 +00:00
do
2007-10-16 16:33:45 +00:00
d=$(sed -n '/^#include "..\/include/{s@^[^/]\+\([^"]\+\).*@subversion/bindings/javahl\1@;H};${x;s@\n@ @gp}' $i)
2007-01-15 23:38:11 +00:00
echo
echo " # $ i "
if ! test -z " $ d "
then
echo ${i%.cpp}.lo: $d
fi
echo
2007-10-16 16:33:45 +00:00
done >> build-outputs.mK
2011-10-21 21:46:23 +00:00
export CFLAGS=" $ ( %{apxs} - q C F L A G S ) %{optflags} - f p i e - f s t a c k - p r o t e c t o r "
2007-01-15 23:38:11 +00:00
export CXXFLAGS=" $ C F L A G S "
2011-10-21 21:46:23 +00:00
export LDFLAGS=-pie
2009-06-09 15:49:58 +00:00
export PATH=" $ { S W I G _ R O O T } / b i n : $ { P A T H } "
2007-12-13 20:03:06 +00:00
%configure \
2007-01-15 23:38:11 +00:00
--with-editor=" v i m - c ' s e t t w = 7 2 e t ' " \
--with-neon=%{_prefix} \
2012-05-31 12:09:14 +00:00
%if %{with serf}
--with-serf=%{_prefix} \
%endif
2007-01-15 23:38:11 +00:00
--with-apr=%{_prefix} \
--with-apr-util=%{_prefix} \
--with-apxs=%{apxs} \
2007-10-16 16:33:45 +00:00
--with-zlib=%{_prefix} \
2009-07-09 09:12:54 +00:00
--with-berkeley-db=db.h:db.h:%{_prefix} :db \
2007-01-15 23:38:11 +00:00
$with_jdk \
2009-06-09 15:49:58 +00:00
%if %with_java
--with-junit=" % { _ u s r } / s h a r e / j a v a / j u n i t . j a r " \
%endif
2007-01-15 23:38:11 +00:00
--with-jikes=no \
2011-07-27 14:15:40 +00:00
%if %with_intree_swig
2009-06-09 15:49:58 +00:00
--with-swig=" $ S W I G _ R O O T " \
2011-07-27 14:15:40 +00:00
%endif
2009-06-09 15:49:58 +00:00
%if %with_intree_sqlite
--with-sqlite=" . / s q l i t e - a m a l g a m a t i o n / s q l i t e 3 . c " \
%else
--with-sqlite=" % { _ u s r } " \
%endif
%if %with_gnome_keyring
--with-gnome-keyring \
%endif
%if %with_kde4_kwallet
--with-kwallet \
%endif
2007-12-13 20:03:06 +00:00
--disable-mod-activation \
2011-10-23 19:17:14 +00:00
--with-libmagic \
2007-12-13 20:03:06 +00:00
--disable-static
2009-06-09 15:49:58 +00:00
%__make %{?jobs:-j%jobs} SWIG_LDFLAGS=
2007-01-15 23:38:11 +00:00
#
if [ " $ w i t h _ j d k " != " " ] ; then
with_jdk=javahl
fi
2009-06-09 15:49:58 +00:00
%if %with_ruby
ruby_target=swig-rb
%else
ruby_target=
%endif # with_ruby
%if %with_python_ctypes
python_ctypes_target=ctypes-python
%else
python_ctypes_target=
%endif # with_python_ctypes
2011-10-23 19:17:14 +00:00
%__make extraclean-swig
2009-06-09 15:49:58 +00:00
%__make swig-py $python_ctypes_target swig-pl $ruby_target SWIG_LDFLAGS= $with_jdk
2007-01-15 23:38:11 +00:00
%install
if [ -f with_jdk ] ; then
with_jdk=install-javahl
else
with_jdk=
fi
2009-06-09 15:49:58 +00:00
%if %with_ruby
ruby_target=install-swig-rb
%else
ruby_target=
%endif # with_ruby
%if %with_python_ctypes
python_ctypes_target=install-ctypes-python
%else
python_ctypes_target=
%endif # with_python_ctypes
%__make DESTDIR=" $RPM_BUILD_ROOT " install install-swig-pl install-swig-py $python_ctypes_target $ruby_target $with_jdk
%if %with_python_ctypes
# remove csvn .pyc files and recompile them because they contain the $RPM_BUILD_ROOT path:
2011-08-13 06:20:56 +00:00
find " %{buildroot} %{py_prefix} / l i b / p y t h o n %{py_ver} / s i t e - p a c k a g e s / c s v n / " -name " * . p y c " | xargs %__rm -f
%__python " %{py_libdir} / c o m p i l e a l l . p y " -f -d " %{py_prefix} / l i b / p y t h o n %{py_ver} / s i t e - p a c k a g e s / c s v n " " %{buildroot} / %{py_prefix} / l i b / p y t h o n %{py_ver} / c s v n "
2009-06-09 15:49:58 +00:00
%endif # with_python_ctypes
2007-01-15 23:38:11 +00:00
#
# double check that the essential repository access schemes have been compiled in
#
2011-08-23 22:34:50 +00:00
schemes=$(LD_LIBRARY_PATH=" ${RPM_BUILD_ROOT} %{_libdir} " " ${RPM_BUILD_ROOT} %{_bindir} / s v n " --version | %__grep " ' " | cut -d\' -f2 | sort -u)
2007-01-15 23:38:11 +00:00
# reset vim syntax: '
2011-08-23 22:34:50 +00:00
test " $ s c h e m e s " = " f i l e
http
2007-01-15 23:38:11 +00:00
https
2011-08-23 22:34:50 +00:00
svn"
2007-01-15 23:38:11 +00:00
#
2012-05-31 12:09:14 +00:00
%if %{with serf}
#
# double check that when building with serf support, ra_serf is actually available and handles http and https schemes
#
serf_schemes=$(LD_LIBRARY_PATH=" ${RPM_BUILD_ROOT} %{_libdir} " " ${RPM_BUILD_ROOT} %{_bindir} / s v n " --version | %__grep -A2 " r a _ s e r f " | %__grep " ' " | cut -d\' -f2 )
# reset vim syntax: '
test " $ s e r f _ s c h e m e s " = " h t t p
https"
#
%endif # with serf
#
2007-01-15 23:38:11 +00:00
%perl_process_packlist
%find_lang %name
#
2009-06-09 15:49:58 +00:00
cp -Lav %{S:42} $RPM_BUILD_ROOT %{_bindir} /svngrep
cp -Lav %{S:43} $RPM_BUILD_ROOT %{_bindir} /svndiff
2007-01-15 23:38:11 +00:00
#
mkdir -p $RPM_BUILD_ROOT /usr/share/emacs/site-lisp/
2007-10-16 16:33:45 +00:00
cp -avL contrib/client-side/emacs/*.el $RPM_BUILD_ROOT /usr/share/emacs/site-lisp/
2008-01-23 09:38:45 +00:00
rm -f $RPM_BUILD_ROOT /usr/share/emacs/site-lisp/vc-svn.el
2007-01-15 23:38:11 +00:00
#
2011-10-23 19:17:14 +00:00
install -m 755 contrib/client-side/svnmerge/svnmerge.py $RPM_BUILD_ROOT /usr/bin/svnmerge.py
2008-06-26 14:26:23 +00:00
cp -avL contrib/client-side/svn_apply_autoprops.py $RPM_BUILD_ROOT /usr/bin
2007-01-25 17:26:57 +00:00
#
2007-01-15 23:38:11 +00:00
mkdir -p $RPM_BUILD_ROOT /%{apache_sysconfdir} /conf.d
cp -av %{S:1} $RPM_BUILD_ROOT /%{apache_sysconfdir} /conf.d/subversion.conf
#
2007-04-28 12:34:43 +00:00
cp -avL %{S:2} README.SuSE
cp -avL subversion/mod_authz_svn/INSTALL README.mod_authz_svn
2007-01-15 23:38:11 +00:00
cat %name.lang > files.subversion
cat with_jdk.files >> files.subversion
#
# tools
2011-10-21 21:46:23 +00:00
%__make DESTDIR=" $RPM_BUILD_ROOT " install-tools
2011-10-23 19:17:14 +00:00
%__mv $RPM_BUILD_ROOT %{_bindir} /svn-tools/{svn-populate-node-origins-index,svn-rep-sharing-stats,svnauthz-validate,svnmucc} $RPM_BUILD_ROOT %{_bindir}
2011-10-21 21:46:23 +00:00
# discard all other tools
%__rm -rf $RPM_BUILD_ROOT %{_bindir} /svn-tools
2007-01-15 23:38:11 +00:00
#
#
#
mkdir -p $RPM_BUILD_ROOT /usr/sbin
mkdir -p $RPM_BUILD_ROOT /var/adm/fillup-templates
2011-10-21 21:46:23 +00:00
install -m 644 -D %{S:13} $RPM_BUILD_ROOT /etc/xinetd.d/svnserve
2011-08-02 16:32:04 +00:00
install -m 755 -D %{S:9} $RPM_BUILD_ROOT /etc/init.d/svnserve
2007-01-15 23:38:11 +00:00
ln -sv /etc/init.d/svnserve $RPM_BUILD_ROOT /usr/sbin/rcsvnserve
2011-10-21 21:46:23 +00:00
install -m 644 -D %{S:10} $RPM_BUILD_ROOT /var/adm/fillup-templates/sysconfig.svnserve
install -m 644 -D %{S:12} $RPM_BUILD_ROOT /%{_fwdefdir} /svnserve
2007-12-13 20:03:06 +00:00
#useless libtool stuff
rm -f %{buildroot} %{_libdir} /*.la
2009-06-09 15:49:58 +00:00
if [ " $ w i t h _ j d k " != " " ] ; then
install -d -m 0755 $RPM_BUILD_ROOT /%{_datadir} /java
ln -sv %{_libdir} /svn-javahl/svn-javahl.jar $RPM_BUILD_ROOT /%{_datadir} /java/svn-javahl.jar
fi
2010-12-27 15:17:17 +00:00
rm -f %{buildroot} /var/adm/perl-modules/subversion
2009-06-09 15:49:58 +00:00
2012-03-10 01:32:18 +00:00
%if %with_bashcomp
%__install -D -m0644 tools/client-side/bash_completion " %{buildroot} / e t c / b a s h _ c o m p l e t i o n . d / %{name} "
%endif #with_bashcomp
2009-06-09 15:49:58 +00:00
%check
2012-01-03 15:19:50 +00:00
%if %{with regression_tests}
2011-08-12 22:44:28 +00:00
ulimit -a
2009-07-11 15:37:12 +00:00
# During "make check", auth-test loads DSOs at runtime and can't find
# them if we don't set up LD_LIBRARY_PATH as below.
export LD_LIBRARY_PATH=" $ P W D / s u b v e r s i o n / l i b s v n _ a u t h _ k w a l l e t / . l i b s : $ P W D / s u b v e r s i o n / l i b s v n _ a u t h _ g n o m e _ k e y r i n g / . l i b s : $ L D _ L I B R A R Y _ P A T H "
# run test over ra_local (file://)
2011-08-12 22:44:28 +00:00
CHECK_FS_TYPE=fsfs
%__make check LOG_TO_STDOUT=true CLEANUP=true FS_TYPE=" $ C H E C K _ F S _ T Y P E "
2009-10-23 14:00:56 +00:00
SVNSERVE_PIDFILE=" $ P W D / s v n s e r v e . p i d "
# hook up cleanup routine
function on_exit {
if [ -e " $ S V N S E R V E _ P I D F I L E " ]; then
pid=`cat " $ S V N S E R V E _ P I D F I L E " 2>/dev/null || :`
test -n " $ p i d " && kill -9 " $ p i d " || :
fi
}
trap on_exit EXIT
# find free port
free_port=" "
for p in `/usr/sbin/ss -nat|tail +2|awk '{ split($4, a, ":"); if (a[2] > 1024) { print a[2]; }}' `; do used_port[$p]=" $ p " ; done
for p in `seq 1025 65535`; do
if [ -z " $ { u s e d _ p o r t [ $ p ] } " ]; then
free_port=" $ p "
break
fi
done
if [ -z " $ f r e e _ p o r t " ]; then
echo " E R R O R : f a i l e d t o f i n d a f r e e p o r t " >&2
echo " U s e d T C P p o r t s : $ { u s e d _ p o r t [ * ] } " >&2
exit 1
fi
2009-07-11 15:37:12 +00:00
# run tests over ra_svn (svn://)
2009-10-23 14:00:56 +00:00
" $ P W D / s u b v e r s i o n / s v n s e r v e / s v n s e r v e " --listen-host 127.0.0.1 --listen-port " $ f r e e _ p o r t " --pid-file " $ S V N S E R V E _ P I D F I L E " -d -r " $ P W D / s u b v e r s i o n / t e s t s / c m d l i n e "
2011-08-12 22:44:28 +00:00
%__make check LOG_TO_STDOUT=true CLEANUP=true FS_TYPE=" $ C H E C K _ F S _ T Y P E " BASE_URL=" s v n : / / 1 2 7 . 0 . 0 . 1 : $ f r e e _ p o r t " || cat $RPM_SOURCE_DIR /%name*/tests.log
2009-10-23 14:00:56 +00:00
kill -9 `cat " $ S V N S E R V E _ P I D F I L E " 2>/dev/null`
%__rm " $ S V N S E R V E _ P I D F I L E "
2009-06-09 15:49:58 +00:00
%if %with_java
%__make check-javahl
%endif # with_java
2009-07-11 15:37:12 +00:00
%__make check-swig-pl
2011-08-18 10:50:28 +00:00
%if 0%{?suse_version} > 1140
2011-08-17 14:31:24 +00:00
# python bindings fail testsuite on 11.4
2009-07-11 15:37:12 +00:00
%__make check-swig-py
2011-08-17 14:31:24 +00:00
%endif
2009-07-11 15:37:12 +00:00
%if %with_ruby
%__make check-swig-rb
%endif # with_ruby
2012-01-03 15:19:50 +00:00
%endif # with regression_tests
2007-01-15 23:38:11 +00:00
2007-05-22 23:41:58 +00:00
%clean
2009-06-09 15:49:58 +00:00
%__rm -rf " %{buildroot} "
2007-05-22 23:41:58 +00:00
2007-12-13 20:03:06 +00:00
%preun
%stop_on_removal svnserve
2007-01-15 23:38:11 +00:00
%post
%{fillup_and_insserv -n svnserve svnserve}
2007-12-13 20:03:06 +00:00
/sbin/ldconfig
2007-01-15 23:38:11 +00:00
%postun
2007-12-13 20:03:06 +00:00
%restart_on_update svnserve
2007-01-15 23:38:11 +00:00
%{insserv_cleanup}
2007-12-13 20:03:06 +00:00
/sbin/ldconfig
2007-01-15 23:38:11 +00:00
2007-05-22 23:41:58 +00:00
%post -n subversion-python -p /sbin/ldconfig
%postun -n subversion-python -p /sbin/ldconfig
%post -n subversion-perl -p /sbin/ldconfig
%postun -n subversion-perl -p /sbin/ldconfig
2009-06-09 15:49:58 +00:00
%if %with_ruby
%post -n subversion-ruby -p /sbin/ldconfig
%postun -n subversion-ruby -p /sbin/ldconfig
%endif # with_ruby
%if %with_gnome_keyring
2009-07-09 09:12:54 +00:00
%post -n libsvn_auth_gnome_keyring-1-0 -p /sbin/ldconfig
2009-06-09 15:49:58 +00:00
2009-07-09 09:12:54 +00:00
%postun -n libsvn_auth_gnome_keyring-1-0 -p /sbin/ldconfig
2009-06-09 15:49:58 +00:00
%endif # with_gnome_keyring
%if %with_kde4_kwallet
2009-07-09 09:12:54 +00:00
%post -n libsvn_auth_kwallet-1-0 -p /sbin/ldconfig
2009-06-09 15:49:58 +00:00
2009-07-09 09:12:54 +00:00
%postun -n libsvn_auth_kwallet-1-0 -p /sbin/ldconfig
2009-06-09 15:49:58 +00:00
%endif # with_kde4_kwallet
2007-05-22 23:41:58 +00:00
2007-01-15 23:38:11 +00:00
%files -f files.subversion
%defattr (-,root,root)
2011-10-23 19:17:14 +00:00
%doc README.SuSE BUGS CHANGES LICENSE README.mod_authz_svn
2007-01-15 23:38:11 +00:00
#
2007-06-21 22:14:11 +00:00
%config (noreplace) /etc/xinetd.d/svnserve
2007-01-15 23:38:11 +00:00
%attr (754,root,root) /etc/init.d/svnserve
%attr (754,root,root) /usr/sbin/rcsvnserve
/var/adm/fillup-templates/sysconfig.svnserve
2007-04-28 12:34:43 +00:00
%config %{_fwdefdir} /*
2007-01-15 23:38:11 +00:00
#
%attr (755,root,root) /usr/bin/svn
%attr (755,root,root) /usr/bin/svnadmin
%attr (755,root,root) /usr/bin/svndumpfilter
%attr (755,root,root) /usr/bin/svnlook
%attr (755,root,root) /usr/bin/svnserve
%attr (755,root,root) /usr/bin/svnversion
%attr (755,root,root) /usr/bin/svndiff
%attr (755,root,root) /usr/bin/svngrep
%attr (755,root,root) /usr/bin/svnsync
2011-10-23 19:17:14 +00:00
%attr (755,root,root) /usr/bin/svnrdump
2007-01-15 23:38:11 +00:00
%{_libdir} /libsvn_client*.so.*
%{_libdir} /libsvn_delta*.so.*
%{_libdir} /libsvn_diff*.so.*
%{_libdir} /libsvn_fs*.so.*
%{_libdir} /libsvn_ra*.so.*
%{_libdir} /libsvn_repos*.so.*
%{_libdir} /libsvn_subr*.so.*
%{_libdir} /libsvn_wc*.so.*
2007-12-13 20:03:06 +00:00
%{_mandir} /man?/svn*
2007-01-15 23:38:11 +00:00
#
2007-03-29 20:24:26 +00:00
/usr/share/emacs
2007-01-15 23:38:11 +00:00
%files perl
%defattr (-,root,root)
%doc %{_mandir} /man?/SVN::*
%{_libdir} /libsvn_swig_perl-1.so.*
%perl_vendorarch/SVN
%perl_vendorarch/auto/SVN
%files python
%defattr (-,root,root)
%dir %{site_python}
%dir %{site_python} /svn
%dir %{site_python} /libsvn
%{_libdir} /libsvn_swig_py-1.so.*
%{site_python} /libsvn/*
%{site_python} /svn/*
2009-06-09 15:49:58 +00:00
%if %with_python_ctypes
%files python-ctypes
%defattr (-,root,root)
%doc subversion/bindings/ctypes-python/examples
%dir %{site_python}
%{site_python} /csvn
%if %suse_version >= 1020
%{site_python} /svn_ctypes_python_bindings-*-py%{py_ver} .egg-info
%endif # suse_version >= 1020
%endif # with_python_ctypes
%if %with_ruby
%files ruby
%defattr (-,root,root)
%dir %{site_ruby}
%{site_ruby} /svn
%{site_ruby} /%{rb_arch} /svn
%{_libdir} /libsvn_swig_ruby-1.so.*
%endif # with_ruby
2007-01-15 23:38:11 +00:00
%files devel
%defattr (-,root,root)
2007-12-13 20:03:06 +00:00
%dir %{_includedir} /subversion-1
2007-01-15 23:38:11 +00:00
%{_libdir} /libsvn_*.so
2007-12-13 20:03:06 +00:00
%{_includedir} /subversion-1/*
2007-01-15 23:38:11 +00:00
%files tools
%defattr (-,root,root)
2009-06-09 15:49:58 +00:00
%attr (755,root,root) %{_bindir} /svnmerge.py
%attr (755,root,root) %{_bindir} /svn_apply_autoprops.py
2011-10-23 19:17:14 +00:00
%{_bindir} /svn-populate-node-origins-index
%{_bindir} /svnauthz-validate
%{_bindir} /svn-rep-sharing-stats
%{_bindir} /svnmucc
2007-01-15 23:38:11 +00:00
%files server
%defattr (-,root,root)
%dir %{apache_sysconfdir} /conf.d
%config (noreplace) %{apache_sysconfdir} /conf.d/subversion.conf
%dir %{apache_libexecdir}
%{apache_libexecdir} /mod_dav_svn.*
%{apache_libexecdir} /mod_authz_svn.*
2012-02-14 01:06:19 +00:00
%{apache_libexecdir} /mod_dontdothat.*
2009-06-09 15:49:58 +00:00
%if %with_gnome_keyring
2009-07-09 09:12:54 +00:00
%files -n libsvn_auth_gnome_keyring-1-0
2009-06-09 15:49:58 +00:00
%defattr (-,root,root)
%{_libdir} /libsvn_auth_gnome_keyring-1.so.0
%{_libdir} /libsvn_auth_gnome_keyring-1.so.0.*
%endif # with_gnome_keyring
%if %with_kde4_kwallet
2009-07-09 09:12:54 +00:00
%files -n libsvn_auth_kwallet-1-0
2009-06-09 15:49:58 +00:00
%defattr (-,root,root)
%{_libdir} /libsvn_auth_kwallet-1.so.0
%{_libdir} /libsvn_auth_kwallet-1.so.0.*
%endif # with_kde4_kwallet
2007-11-23 13:13:53 +00:00
2012-03-10 01:32:18 +00:00
%if %with_bashcomp
%files bash-completion
%defattr (-,root,root)
%config %{_sysconfdir} /bash_completion.d/%{name}
%endif #with_bashcomp
2007-02-25 22:44:39 +00:00
%changelog