You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

169 lines
5.3 KiB

##
## subversion-apache.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_dist 1.6.13
%define V_opkg 1.6.13
# package information
Name: subversion-apache
Summary: Subversion Source Revision Control System (Apache Extension)
URL: http://subversion.apache.org/
Vendor: Apache Software Foundation
Packager: OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class: EVAL
Group: SCM
License: Apache/BSD
Version: %{V_opkg}
Release: 20101002
# package options
%option with_sasl no
# list of sources
Source0: http://subversion.tigris.org/downloads/subversion-%{V_dist}.tar.bz2
Source1: http://subversion.tigris.org/downloads/subversion-deps-%{V_dist}.tar.bz2
Source2: subversion-apache.conf
Patch0: subversion-apache.patch
# build information
BuildPreReq: OpenPKG, openpkg >= 20100101, make, libtool, sed, pkgconfig
PreReq: OpenPKG, openpkg >= 20100101
BuildPreReq: libiconv, expat
PreReq: libiconv, expat
BuildPreReq: apache
PreReq: apache, apache::with_mod_dav = yes
%if "%{with_sasl}" == "yes"
BuildPreReq: sasl
PreReq: sasl
%endif
%description
This is the Apache DAV extension for Subversion.
%track
prog subversion-apache = {
version = %{V_dist}
url = http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260
regex = subversion-(\d+\.\d+.\d+)\.tar\.bz2
}
%prep
%setup -q -n subversion-%{V_dist}
%setup -q -n subversion-%{V_dist} -T -D -b 1
%patch -p0
rm -rf serf
# patch: adjust path to configuration directory
%{l_shtool} subst \
-e 's;/etc/subversion;%{l_prefix}/etc/subversion;g' \
subversion/libsvn_subr/config_impl.h \
subversion/libsvn_subr/config_file.c
# patch: force APR to use own UUID generator to avoid conflicts between OS and OSSP uuid
%{l_shtool} subst \
-e 's;osuuid="1";osuuid="0";' \
apr/configure
%build
# configure package
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags libxml2 .} -DSQLITE_THREADSAFE=1" \
%if "%{with_sasl}" == "yes"
LDFLAGS="%{l_ldflags} `pkg-config sasl --libs-only-L`" \
LIBS="`pkg-config sasl --libs-only-l` -lz" \
%else
LDFLAGS="%{l_ldflags}" \
LIBS="-lz" \
%endif
CONFIG_SHELL="%{l_bash}" \
./configure \
--prefix=%{l_prefix} \
--libdir=%{l_prefix}/lib/subversion-apache \
--mandir=%{l_prefix}/man \
--without-berkeley-db \
--with-sqlite="`pwd`/sqlite-amalgamation/sqlite3.c" \
--without-ssl \
--without-libxml2 \
--without-odbc \
--without-pgsql \
--without-mysql \
%if "%{with_sasl}" == "yes"
--with-sasl \
%else
--without-sasl \
%endif
--without-gssapi \
--without-serf \
--with-apxs \
--disable-mod-activation \
--disable-nls \
--disable-threads \
--enable-shared \
--disable-static
# build package
%{l_make} %{l_mflags}
%install
# install package
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
# strip down installation
rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share
rm -rf $RPM_BUILD_ROOT%{l_prefix}/man
rm -rf $RPM_BUILD_ROOT%{l_prefix}/build-1
rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/subversion-apache/pkgconfig
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/subversion-apache/*.exp
# install Apache configuration file
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
%{l_shtool} install -c -m 644 %{l_value -s -a} \
%{SOURCE subversion-apache.conf} \
$RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/subversion.conf
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%config %{l_prefix}/etc/apache/apache.d/*'
%files -f files
%clean
%post
eval `%{l_rc} apache status 2>/dev/null`
[ ".$apache_active" = .yes ] && %{l_rc} apache restart
exit 0
%preun
[ $1 -eq 0 ] || exit 0
eval `%{l_rc} apache status 2>/dev/null`
[ ".$apache_active" = .yes ] && %{l_rc} apache stop
exit 0