| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- ##
- ## cvs.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2003 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.
- ##
- # the involved versions
- %define V_cvs 1.12.4
- %define V_cvslock 0.2
- # package information
- Name: cvs
- Summary: Concurrent Versions Systems (CVS)
- URL: http://www.cvshome.org/
- Vendor: B. Berliner, D.D. Zuhn, J. Polk
- Packager: The OpenPKG Project
- Distribution: OpenPKG [CORE]
- Group: SCM
- License: GPL
- Version: %{V_cvs}
- Release: 20031211
- # package options
- %option with_fsl yes
- %option with_rse yes
- %option with_rse_cvsuser cvs
- # list of sources
- Source0: http://www.cvshome.org/files/19/10/cvs-%{V_cvs}.tar.bz2
- Source1: ftp://riemann.iam.uni-bonn.de/pub/users/roessler/cvslock/cvslock-%{V_cvslock}.tar.gz
- Source2: rc.cvs
- Source3: fsl.cvs
- Patch0: cvs.patch
- Patch1: cvs.patch.rse
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20030718, perl, patch
- PreReq: OpenPKG, openpkg >= 20030718, perl, patch
- %if "%{with_fsl}" == "yes"
- BuildPreReq: fsl >= 1.2.0
- PreReq: fsl >= 1.2.0
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- CVS is a version control system, which allows you to keep old
- versions of files (usually source code), keep a log of who,
- when, and why changes occurred, etc., like RCS or SCCS. Unlike
- the simpler systems, CVS does not just operate on one file at a
- time or one directory at a time, but operates on hierarchical
- collections of directories consisting of version controlled files.
- CVS helps to manage releases and to control the concurrent editing
- of source files among multiple authors. CVS allows triggers to
- enable/log/control various operations and works well over a wide
- area network. CVS keeps a single copy of the master sources. This
- copy is called the source repository.
- %if "%{with_rse}" == "yes"
- This version of CVS has the large set of patches applied from
- Ralf S. Engelschall <rse@engelschall.com> (-DRSE_PATCHES). This
- means that (still undocumented) extra functionality is available.
- %endif
- %prep
- %setup0 -q -c
- %setup1 -q -T -D -a 1
- # apply patches
- ( cd cvs-%{V_cvs}
- %if "%{with_rse}" == "yes"
- cat %{PATCH cvs.patch.rse} |\
- sed -e 's;\(#define RSE_PATCH_CVSUSER_CALLER "\)cvs\("\);\1%{with_rse_cvsuser}\2;' |\
- %{l_patch} -p0
- %endif
- %patch -p0
- ) || exit $?
- %build
- # configure CVS package
- ( cd cvs-%{V_cvs}
- CC="%{l_cc}" \
- %if "%{with_rse}" == "yes"
- CFLAGS="%{l_cflags -O} -DRSE_PATCHES" \
- %else
- CFLAGS="%{l_cflags -O}" \
- %endif
- LDFLAGS="%{l_fsl_ldflags}" \
- LIBS="%{l_fsl_libs}" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-patch=%{l_prefix}/bin/patch \
- --with-tmpdir=%{l_prefix}/var/cvs/tmp \
- --without-krb4 \
- --without-gssapi \
- --enable-encryption \
- --enable-server
- %{l_make} %{l_mflags -O}
- ) || exit $?
- # configure CVSlock package
- ( cd cvslock-%{V_cvslock}
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- ./configure \
- --prefix=%{l_prefix}
- %{l_make} %{l_mflags -O}
- ) || exit $?
- %install
- rm -rf $RPM_BUILD_ROOT
- # install CVS package
- ( cd cvs-%{V_cvs}
- %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
- rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs2log
- rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
- mv $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib/* \
- $RPM_BUILD_ROOT%{l_prefix}/share/cvs/
- rmdir $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib
- rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/cvsbug
- rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/cvsbug.8
- ) || exit $?
- # install CVSlock package
- ( cd cvslock-%{V_cvslock}
- %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
- ) || exit $?
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/var/cvs/tmp
- # 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.cvs} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # install OSSP fsl configuration
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE fsl.cvs} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/etc/fsl' \
- '%config %{l_prefix}/etc/fsl/fsl.cvs' \
- '%attr(1777,%{l_musr},%{l_mgrp}) %{l_prefix}/var/cvs/tmp'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- # after upgrade, restart service
- [ $1 -eq 2 ] || exit 0
- eval `%{l_rc} cvs status 2>/dev/null`
- [ ".$cvs_active" = .yes ] && %{l_rc} cvs restart
- exit 0
- %preun
- # before erase, stop service and remove log files
- [ $1 -eq 0 ] || exit 0
- %{l_rc} cvs stop 2>/dev/null
- rm -f $RPM_INSTALL_PREFIX/var/cvs/cvs.log* >/dev/null 2>&1 || true
- exit 0
|