## ## subversion.spec -- OpenPKG RPM Specification ## Copyright (c) 2000-2004 The OpenPKG Project ## Copyright (c) 2000-2004 Ralf S. Engelschall ## Copyright (c) 2000-2004 Cable & Wireless ## ## 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.0 %define V_opkg 1.1.0 %define V_tools 20040829 # 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: 20040930 # 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: http://svnbook.red-bean.com/book.pdf Source3: rc.subversion # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130, diffutils, make PreReq: OpenPKG, openpkg >= 20040130, diffutils BuildPreReq: libxml, db, openssl, zlib PreReq: libxml, db, openssl, zlib %if "%{with_cvs2svn}" == "yes" PreReq: cvs, python %endif %if "%{with_svn2cvs}" == "yes" BuildPreReq: perl PreReq: perl, perl-xml, cvs, rcs %endif AutoReq: no AutoReqProv: no %description Subversion is a new version control system that is a compelling replacement for CVS. Currently this package provides the Subversion client and svnserve server. The Apache+WebDAV/DeltaV based mod_dav_svn server is not included. %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 %build # configure package %{l_shtool} subst \ -e 's;\($ac_abs_srcdir/configure\) $ac_configure_args;\1 --disable-shared;' \ configure CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags libxml2 .}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --with-berkeley-db=%{l_prefix} \ --with-ssl \ --with-zlib \ --enable-static \ --disable-shared # 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 Subversion book %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/share/subversion %{l_shtool} install -c -m 644 \ %{SOURCE book.pdf} $RPM_BUILD_ROOT%{l_prefix}/share/subversion/ # install Subversion Bash command completion %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/subversion %{l_shtool} install -c -m 644 \ tools/client-side/bash_completion \ $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/subversion.bashrc %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.py \${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.py \ $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} \ '%doc %{l_prefix}/share/subversion/book.pdf' %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