OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src openpkg-web Date: 01-Feb-2004 00:14:36 Branch: HEAD Handle: 2004013123142409 Added files: openpkg-src/subversion rc.subversion Modified files: openpkg-src/subversion subversion.spec openpkg-web news.txt Log: Enhance packaging of Subversion: - add PDF of Subversion "book" as documentation file - add optional support for cvs2svn tool - add bash completion script - add run-command script for environment and daemon Summary: Revision Changes Path 1.1 +47 -0 openpkg-src/subversion/rc.subversion 1.38 +67 -6 openpkg-src/subversion/subversion.spec 1.8387 +1 -0 openpkg-web/news.txt ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/subversion/rc.subversion ============================================================================ $ cvs diff -u -r0 -r1.1 rc.subversion --- /dev/null 2004-02-01 00:14:35.000000000 +0100 +++ rc.subversion 2004-02-01 00:14:35.000000000 +0100 @@ -0,0 +1,47 @@ [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc +## +## rc.subversion -- Run-Commands +## + +%config + subversion_enable="$openpkg_rc_def" + subversion_env="no" + subversion_daemon="no" + subversion_daemon_host="127.0.0.1" + subversion_daemon_port="3690" + subversion_daemon_host="" + +%status -u @l_susr@ -o + subversion_usable="no" + subversion_active="no" + echo "subversion_enable=\"$subversion_enable\"" + echo "subversion_usable=\"$subversion_usable\"" + echo "subversion_active=\"$subversion_active\"" + +%start -p 100 -u @l_susr@ + rcService subversion enable yes || exit 0 + rcService subversion active yes && exit 0 + if rcVarIsYes subversion_daemon; then + if [ ".$subversion_daemon_root" != . ]; then + @l_prefix@/bin/svnserve \ + --daemon \ + --listen-host $subversion_daemon_host \ + --listen-port $subversion_daemon_port \ + --root $subversion_daemon_root + fi + fi + +%stop -p 100 -u @l_susr@ + rcService subversion enable yes || exit 0 + rcService subversion active no && exit 0 + # FIXME: don't know how to kill svnserve(8) process + +%env + rcService subversion enable yes || exit 0 + if rcVarIsYes subversion_env; then + if [ ".$BASH" != . ]; then + shopt -s extglob progcomp + . @l_prefix@/etc/subversion/subversion.bash + fi + fi + @@ . patch -p0 <<'@@ .' Index: openpkg-src/subversion/subversion.spec ============================================================================ $ cvs diff -u -r1.37 -r1.38 subversion.spec --- openpkg-src/subversion/subversion.spec 25 Jan 2004 08:32:09 -0000 1.37 +++ openpkg-src/subversion/subversion.spec 31 Jan 2004 23:14:33 -0000 1.38 @@ -33,30 +33,40 @@ Group: SCM License: Apache/BSD Version: 0.37.0 -Release: 20040125 +Release: 20040201 + +# package options +%option with_cvs2svn yes # list of sources Source0: http://subversion.tigris.org/tarballs/subversion-%{version}.tar.gz +Source1: http://svnbook.red-bean.com/book.pdf +Source2: rc.subversion # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20030709, diffutils, make PreReq: OpenPKG, openpkg >= 20030709, diffutils -BuildPreReq: libxml, db, openssl, zlib, apr -PreReq: libxml, db, openssl, zlib, apr +BuildPreReq: libxml, db, openssl, zlib +PreReq: libxml, db, openssl, zlib +%if "%{with_cvs2svn}" == "yes" +PreReq: python +%endif AutoReq: no AutoReqProv: no %description Subversion is a new version control system that is a compelling - replacement for CVS. Currently this package only provides the - Subversion client. + 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. %prep %setup -q %build + # configure package CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags libxml2 .}" \ @@ -67,11 +77,16 @@ --with-ssl \ --with-zlib \ --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 @@ -80,7 +95,53 @@ 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 - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + + # 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 + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/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+\"[EMAIL PROTECTED]"}" + ) >cvs2svn + %{l_shtool} install -c -m 755 \ + cvs2svn $RPM_BUILD_ROOT%{l_prefix}/bin/ + %{l_shtool} install -c -m 644 \ + tools/cvs2svn/cvs2svn.py \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/cvs2svn/ + %{l_shtool} install -c -m 644 \ + tools/cvs2svn/rcsparse/*.py \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/subversion/cvs2svn/rcsparse/ + %{l_shtool} install -c -m 644 \ + tools/cvs2svn/cvs2svn.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/ +%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/ + + # 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 @@ . patch -p0 <<'@@ .' Index: openpkg-web/news.txt ============================================================================ $ cvs diff -u -r1.8386 -r1.8387 news.txt --- openpkg-web/news.txt 31 Jan 2004 17:09:37 -0000 1.8386 +++ openpkg-web/news.txt 31 Jan 2004 23:14:24 -0000 1.8387 @@ -1,3 +1,4 @@ +01-Feb-2004: Upgraded package: P<subversion-0.37.0-20040201> 31-Jan-2004: Upgraded package: P<petidomo-4.0b1-20040131> 31-Jan-2004: Upgraded package: P<expect-5.40.0-20040131> 31-Jan-2004: Upgraded package: P<vim-6.2.215-20040131> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]