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
#
2011-01-14 00:45:36 +00:00
# Copyright (c) 2011 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/
#
# norootforbuild
2011-07-27 14:15:40 +00:00
%define with_ruby 0%{?suse_version} > 1110
2011-08-17 08:52:19 +00:00
%define with_intree_swig 0%{?suse_version} != 1110
2011-08-02 16:05:34 +00:00
%if 0%{?always_use_intree_sqlite}
%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-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
2011-08-23 22:34:50 +00:00
%bcond_with subversion_libserf_support
2007-01-15 23:38:11 +00:00
Name : subversion
2011-06-01 21:59:29 +00:00
Version : 1.6.17
2011-03-03 20:08:01 +00:00
Release : 1
2009-06-09 15:49:58 +00:00
# in-tree SWIG version to use for the build:
%define swig_version 1.3.36
2010-09-27 13:53:08 +00:00
%define sqlite_version 3.6.13
2008-07-15 22:26:38 +00:00
%if 0%{?suse_version} > 910
BuildRequires : update-alternatives
2009-06-09 15:49:58 +00:00
%endif # suse_version > 910
2011-10-21 15:57:03 +00:00
BuildRequires : apache2-devel db-devel file-devel gcc-c++ libstdc++-devel zlib-devel
2009-06-09 15:49:58 +00:00
BuildRequires : pkgconfig
%if 0%{?sles_version} == 9
2009-07-11 15:37:12 +00:00
BuildRequires : python-xml python25 python25-devel
2009-06-09 15:49:58 +00:00
%else
2009-07-11 15:37:12 +00:00
BuildRequires : python-devel python-xml
2008-07-15 22:26:38 +00:00
%endif
2009-06-09 15:49:58 +00:00
%if %with_python_ctypes
BuildRequires : ctypesgen
%endif # with_python_ctypes
%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
2011-08-23 22:34:50 +00:00
%if %{with subversion_libserf_support}
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
2011-07-21 14:47:59 +00:00
BuildRequires : dbus-1-devel kdelibs4-core libkde4-devel libqt4-devel
2009-06-09 15:49:58 +00:00
%endif # with_kde4_kwallet
%ifarch ppc ppc64
# no JDK on ppc
%define with_java 0
%else
%if 0%{?sles_version}
# no JDK on SLE either
%define with_java 0
%else
2011-07-27 14:48:34 +00:00
%if 0%{?suse_version} >= 1130
# OpenJDK is available by default on openSUSE >= 11.3
2009-06-09 15:49:58 +00:00
%define with_java 1
BuildRequires : java-1_6_0-openjdk-devel
%else
2011-07-27 14:51:53 +00:00
%define with_java 0
2011-07-27 14:48:34 +00:00
%endif # suse_version >= 1130
2009-06-09 15:49:58 +00:00
%endif # sles_version
%endif # ifarch
%if %with_java
BuildRequires : junit
%endif #with_java
2007-10-29 11:30:52 +00:00
%if 0%{?suse_version} > 1030
BuildRequires : libneon-devel
%else
2007-12-13 20:03:06 +00:00
BuildRequires : neon-devel 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
2007-01-15 23:38:11 +00:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2010-09-27 13:53:08 +00:00
License : ASLv2
2007-01-15 23:38:11 +00:00
Group : Development/Tools/Version Control
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
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
Source91 : sqlite-amalgamation-%{sqlite_version} .tar.bz2
%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
2009-06-09 15:49:58 +00:00
Patch12 : subversion-fix_nonvoid_function_without_return.patch
2007-01-15 23:38:11 +00:00
# build fixes
Patch20 : subversion-swig-perl-install_vendor.patch
Patch23 : subversion.libtool-pie-flags.patch
Patch31 : subversion.perl.LD_RUN_PATH.patch
Patch33 : subversion.header_wrappers.patch
Patch35 : subversion.java14.patch
2009-06-09 15:49:58 +00:00
Patch36 : subversion-ctypes-remove_shebang.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
2011-08-19 15:39:57 +00:00
Patch39 : fix-swig-building.diff
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
2010-09-27 13:53:08 +00:00
License : ASLv2
2007-01-15 23:38:11 +00:00
Group : Development/Libraries/C and C++
Summary : Development package for Subversion developers
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
2010-09-27 13:53:08 +00:00
License : ASLv2 ; Subversion License, http://subversion.tigris.org/license-1.html
2007-01-15 23:38:11 +00:00
Group : Development/Tools/Version Control
Summary : Tools for Subversion
%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-10-02 21:21:49 +00:00
License : ASLv2 ; Subversion License, http://subversion.tigris.org/license-1.html
2007-01-15 23:38:11 +00:00
Group : Development/Tools/Version Control
2010-09-27 13:53:08 +00:00
Summary : Allows Perl scripts to directly use Subversion repositories
2007-01-15 23:38:11 +00:00
Requires : subversion = %{version}
Requires : perl >= 5.8
2010-09-27 13:53:08 +00:00
Requires : perl = %{perl_version}
2007-01-15 23:38:11 +00:00
%description perl
Provides Perl (SWIG) support for Subversion.
%package python
2010-10-02 21:21:49 +00:00
License : ASLv2 ; Subversion License, http://subversion.tigris.org/license-1.html
2007-01-15 23:38:11 +00:00
Group : Development/Tools/Version Control
2010-09-27 13:53:08 +00:00
Summary : Allows Python scripts to directly use Subversion repositories
2007-01-15 23:38:11 +00:00
Requires : subversion = %{version}
2009-06-09 15:49:58 +00:00
%if 0%{?sles_version} == 9
Requires : python25
%endif
2007-01-15 23:38:11 +00:00
%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
Group : Development/Tools/Version Control
Summary : High-Level Python Bindings for Subversion
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
2009-07-09 09:12:54 +00:00
License : Apache Software License .. ; Subversion License, http://subversion.tigris.org/license-1.html
2009-06-09 15:49:58 +00:00
Group : Development/Tools/Version Control
2010-09-27 13:53:08 +00:00
Summary : Allows Ruby scripts to directly use Subversion repositories
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
2010-09-27 13:53:08 +00:00
License : ASLv2
2007-01-15 23:38:11 +00:00
Group : Development/Tools/Version Control
Summary : Apache server module for Subversion server
2009-02-19 22:52:07 +00:00
Requires : subversion = %{version} apache2 %{apache_mmn}
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.
http://subversion.tigris.org
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
License : Subversion license, http://subversion.tigris.org/license-1.html
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
License : Subversion license, http://subversion.tigris.org/license-1.html
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
2007-01-15 23:38:11 +00:00
%prep
2011-07-27 14:15:40 +00:00
%if %with_intree_swig
2009-06-09 15:49:58 +00:00
%setup -q -n subversion-%{version} -b 90
2011-07-27 14:15:40 +00:00
%else
%setup -q -n subversion-%{version}
%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
%__bzip 2 -d -c " %{SOURCE91} " | %__tar xf - " s q l i t e - %{sqlite_version} / s q l i t e 3 . c "
%__mv " s q l i t e - %{sqlite_version} / s q l i t e 3 . c " .
%__rm -rf " s q l i t e - %{sqlite_version} "
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
%patch12 -p0
2007-01-15 23:38:11 +00:00
#
2010-09-27 13:53:08 +00:00
%patch20
2008-07-15 22:26:38 +00:00
%if 0%{?suse_version} > 930
2009-06-09 15:49:58 +00:00
%patch23 -p0
2008-07-15 22:26:38 +00:00
%endif
2010-09-27 13:53:08 +00:00
%patch31
%patch33
%patch35
2009-06-09 15:49:58 +00:00
%patch36 -p0
2010-09-27 13:53:08 +00:00
%patch37
2010-09-29 08:17:03 +00:00
%patch38
2011-08-19 15:39:57 +00:00
%patch39 -p0
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
2007-01-15 23:38:11 +00:00
export CFLAGS=" $ ( %{apxs} - q C F L A G S ) - W a l l - g "
CFLAGS=" $ C F L A G S - f p i e "
export LDFLAGS=-pie
%if 0%{?suse_version} > 1000
CFLAGS=" $ C F L A G S - f s t a c k - p r o t e c t o r "
2009-06-09 15:49:58 +00:00
%endif # suse_version > 1000
2007-01-15 23:38:11 +00:00
export CXXFLAGS=" $ C F L A G S "
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} \
2011-09-29 09:46:00 +00:00
%{?_with_subversion_libserf_support} \
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 \
--disable-static
2008-07-15 22:26:38 +00:00
%if 0%{?suse_version} == 910
sed --in-place=~ " s , \ / u s r \ / l i b , %{_libdir} , g " Makefile
%endif
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
%__make swig-py $python_ctypes_target swig-pl $ruby_target SWIG_LDFLAGS= $with_jdk
2007-01-15 23:38:11 +00:00
#
2009-06-09 15:49:58 +00:00
# build additional tools
TOOLS_LIBS=" "
for d in subversion/libsvn_*/.libs; do
TOOLS_LIBS=" $ T O O L S _ L I B S - L $ { P W D } / $ d "
done
TOOLS_LIBS=" $ T O O L S _ L I B S $ ( p k g - c o n f i g - - l i b s a p r - 1 a p r - u t i l - 1 ) "
TOOLS_LIBS=" $ T O O L S _ L I B S - l s v n _ s u b r - 1 - l s v n _ f s - 1 - l s v n _ r e p o s - 1 "
TOOLS_CFLAGS=$(pkg-config --cflags apr-1 apr-util-1)
TOOLS_CFLAGS=" $ T O O L S _ C F L A G S - I $ P W D / s u b v e r s i o n / i n c l u d e "
pushd tools/server-side
for f in svn-populate-node-origins-index svnauthz-validate; do
%__cc %{optflags} ${TOOLS_CFLAGS} ${TOOLS_LIBS} -o " $ { f } " " $ { f } . c "
done
popd #tools/server-side
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
#
%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
#
2009-06-10 00:21:40 +00:00
cp -avL %{SOURCE3} $RPM_BUILD_ROOT /usr/bin
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
mkdir -p $RPM_BUILD_ROOT /usr/share/subversion/
cp -a tools $RPM_BUILD_ROOT /usr/share/subversion/
2007-04-28 12:34:43 +00:00
#m -rf $RPM_BUILD_ROOT/usr/share/subversion/tools/cvs2svn
2007-01-15 23:38:11 +00:00
mkdir $RPM_BUILD_ROOT /usr/share/subversion/tools/svn_load_dirs
2007-10-16 16:33:45 +00:00
cp -aL contrib/client-side/svn_load_dirs/svn_load_dirs.README $RPM_BUILD_ROOT /usr/share/subversion/tools/svn_load_dirs/README
cp -aL contrib/client-side/svn_load_dirs/svn_load_dirs_property_table.example $RPM_BUILD_ROOT /usr/share/subversion/tools/svn_load_dirs/
2008-10-22 16:50:48 +00:00
sed 's:@SVN_BINDIR@:/usr/bin:' contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in > $RPM_BUILD_ROOT /usr/share/subversion/tools/svn_load_dirs/svn_load_dirs.pl
2007-01-15 23:38:11 +00:00
chmod 755 $RPM_BUILD_ROOT /usr/share/subversion/tools/svn_load_dirs/svn_load_dirs.pl
2007-05-22 23:41:58 +00:00
find $RPM_BUILD_ROOT \( -name .svn -o -name CVS -o -name tests \) -type d -print0 | xargs -0 rm -rfv
find $RPM_BUILD_ROOT \( -name " * . a " -o -name " * . c " \) -type f -print0 | xargs -0 rm -rfv
2008-02-01 23:43:26 +00:00
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/buildbot
2007-05-22 23:41:58 +00:00
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/diff
2008-02-01 23:43:26 +00:00
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/dist
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/hook-scripts/verify-po.py
2007-05-22 23:41:58 +00:00
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/po
2008-01-26 16:38:52 +00:00
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/server-side/*svn_dav_log_parse*
2008-02-01 23:43:26 +00:00
rm -rf $RPM_BUILD_ROOT /usr/share/subversion/tools/test-scripts
2007-01-15 23:38:11 +00:00
#
#
#
mkdir -p $RPM_BUILD_ROOT /etc/init.d
2007-06-21 22:14:11 +00:00
mkdir -p $RPM_BUILD_ROOT /etc/xinetd.d
2007-01-15 23:38:11 +00:00
mkdir -p $RPM_BUILD_ROOT /usr/sbin
mkdir -p $RPM_BUILD_ROOT /var/adm/fillup-templates
2007-06-21 22:14:11 +00:00
cp -aL %{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
2007-05-22 23:41:58 +00:00
cp -aL %{S:10} $RPM_BUILD_ROOT /var/adm/fillup-templates/sysconfig.svnserve
2007-04-28 12:34:43 +00:00
mkdir -p $RPM_BUILD_ROOT /%{_fwdefdir}
install -m 644 %{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
pushd tools/server-side
%__install -m0755 \
svn-populate-node-origins-index \
svnauthz-validate \
" %{buildroot} %{_bindir} / "
# delete or the binaries will also be installed under /usr/share
%__rm " %{buildroot} %{_datadir} / s u b v e r s i o n / t o o l s / s e r v e r - s i d e " /{svn-populate-node-origins-index,svnauthz-validate}
popd #tools/server-side
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
%check
2011-08-17 08:53:08 +00:00
%if 0%{?suse_version} < 1210
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
2011-08-17 08:53:08 +00:00
%endif
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)
%doc README.SuSE BUGS CHANGES COPYING subversion/LICENSE README.mod_authz_svn
#
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
%{_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)
%dir /usr/share/subversion
/usr/share/subversion/tools
2009-06-09 15:49:58 +00:00
%attr (755,root,root) %{_bindir} /svnmerge.py
%attr (755,root,root) %{_bindir} /svn_apply_autoprops.py
%{_bindir} /svn-populate-node-origins-index
%{_bindir} /svnauthz-validate
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.*
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
2007-02-25 22:44:39 +00:00
%changelog