| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- ##
- ## subversion.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
- ##
- ## 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.1.3
- %define V_opkg 1.1.3
- %define V_tools 20050305
- # package information
- Name: subversion
- Summary: Source Revision Control System
- URL: http://subversion.tigris.org/
- Vendor: Tigris
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: BASE
- Group: SCM
- License: Apache/BSD
- Version: %{V_opkg}
- Release: 20050305
- # package options
- %option with_cvs2svn no
- %option with_svn2cvs no
- # list of sources
- Source0: http://subversion.tigris.org/tarballs/subversion-%{V_dist}.tar.gz
- Source1: ftp://ftp.openpkg.org/sources/CPY/subversion/subversion-tools-%{V_tools}.tar.gz
- Source2: subversion.config
- Source3: subversion.servers
- Source4: rc.subversion
- Patch0: subversion.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, make
- PreReq: OpenPKG, openpkg >= 20040130
- BuildPreReq: diffutils, libxml, db, openssl, zlib, neon
- PreReq: diffutils, libxml, db, openssl, zlib, neon
- %if "%{with_cvs2svn}" == "yes"
- PreReq: rcs, python
- %endif
- %if "%{with_svn2cvs}" == "yes"
- BuildPreReq: perl
- PreReq: perl, perl-xml, cvs, rcs
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Subversion is a modern Version Control System (VCS) providing most
- current CVS features, versioned directories/renames/meta-data,
- atomic commits, cheap branching and tagging, native client/server
- architecture, and the choice of database or plain-file repository
- implementations.
- %track
- prog subversion = {
- version = %{V_dist}
- url = http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260
- regex = subversion-(\d+\.\d+\.\d+)\.tar\.gz
- }
- prog subversion:tools = {
- version = %{V_tools}
- url = ftp://ftp.openpkg.org/sources/CPY/subversion/
- regex = subversion-tools-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q
- %setup -q -T -D -a 1
- %patch -p0
- %build
- # configure package
- %{l_shtool} subst \
- -e 's;\($ac_abs_srcdir/configure\) $ac_configure_args;\1 --disable-shared;' \
- configure
- %{l_shtool} subst \
- -e 's;/etc/subversion;%{l_prefix}/etc/subversion;g' \
- subversion/libsvn_subr/config_impl.h \
- subversion/libsvn_subr/config_file.c
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags libxml2 .}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-berkeley-db=%{l_prefix} \
- --with-neon=%{l_prefix} \
- --with-zlib \
- --enable-static \
- --disable-nls \
- --disable-shared \
- --without-apxs
- # build package
- %{l_make} %{l_mflags}
- %install
- # install package
- rm -rf $RPM_BUILD_ROOT
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
- # strip down installation
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/build
- rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/neon*
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
- rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-config
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- # install svn_load_dirs(1) tool
- %{l_shtool} install -c -m 755 \
- -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
- contrib/client-side/svn_load_dirs.pl \
- $RPM_BUILD_ROOT%{l_prefix}/bin/svn_load_dirs
- # install Subversion default global configuration files
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/subversion
- %{l_shtool} install -c -m 644 \
- %{SOURCE subversion.config} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/config
- %{l_shtool} install -c -m 644 \
- %{SOURCE subversion.servers} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/servers
- # install Subversion Bash command completion
- %{l_shtool} install -c -m 644 \
- tools/client-side/bash_completion \
- $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/bashrc
- # install Subversion book
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/share/subversion
- %{l_shtool} install -c -m 644 \
- doc/book/book/svn-book.html \
- doc/book/book/svn-book.pdf \
- $RPM_BUILD_ROOT%{l_prefix}/share/subversion/
- %if "%{with_cvs2svn}" == "yes"
- # install cvs2svn(1) tool
- ( cd subversion-tools
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/cvs2svn/cvs2svn_rcsparse
- ( echo "#!/bin/sh"
- echo "PYTHONPATH=\"%{l_prefix}/libexec/subversion/cvs2svn\""
- echo "export PYTHONPATH"
- echo "%{l_prefix}/bin/python %{l_prefix}/libexec/subversion/cvs2svn/cvs2svn \${1+\"\$@\"}"
- ) >cvs2svn.sh
- %{l_shtool} install -c -m 755 \
- cvs2svn.sh $RPM_BUILD_ROOT%{l_prefix}/bin/cvs2svn
- %{l_shtool} install -c -m 644 \
- cvs2svn.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
- %{l_bzip2} -d -c cvs2svn.tar.bz2 | %{l_tar} xf -
- %{l_shtool} install -c -m 644 \
- cvs2svn/cvs2svn \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/cvs2svn/
- %{l_shtool} install -c -m 644 \
- cvs2svn/cvs2svn_rcsparse/*.py \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/cvs2svn/cvs2svn_rcsparse/
- ) || exit $?
- %endif
- %if "%{with_svn2cvs}" == "yes"
- # install svn2cvs(1) tool
- ( cd subversion-tools
- %{l_shtool} install -c -m 755 \
- -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
- svn2cvs.pl $RPM_BUILD_ROOT%{l_prefix}/bin/svn2cvs
- %{l_prefix}/bin/pod2man svn2cvs.pl >svn2cvs.1
- %{l_shtool} install -c -m 644 \
- svn2cvs.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/svn2cvs.1
- ) || exit $?
- %endif
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.subversion} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # create directory for default repository and svnserve pidfile
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/var/subversion
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/subversion/*' \
- '%doc %{l_prefix}/share/subversion/svn-book.*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- if [ ! -d $RPM_INSTALL_PREFIX/var/subversion/default ]; then
- # create default repository
- $RPM_INSTALL_PREFIX/bin/svnadmin create \
- $RPM_INSTALL_PREFIX/var/subversion/default
- fi
|