cvs.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. ##
  2. ## cvs.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # the involved versions
  26. %define V_cvs 1.11.5
  27. %define V_cvslock 0.2
  28. # package information
  29. Name: cvs
  30. Summary: Concurrent Versions Systems (CVS)
  31. URL: http://www.cvshome.org/
  32. Vendor: B. Berliner, D.D. Zuhn, J. Polk
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [CORE]
  35. Group: SCM
  36. License: GPL
  37. Version: %{V_cvs}
  38. Release: 20030328
  39. # optional support for applying the RSE patches
  40. %option with_rse_patches no
  41. %option with_rse_patch_cvsuser_caller cvs
  42. # list of sources
  43. Source0: http://www.cvshome.org/files/19/10/cvs-%{V_cvs}.tar.gz
  44. Source1: ftp://riemann.iam.uni-bonn.de/pub/users/roessler/cvslock/cvslock-%{V_cvslock}.tar.gz
  45. Source2: cvs.patches.rse
  46. Source3: cvs.patches.msvb
  47. Source4: rc.cvs
  48. # build information
  49. Prefix: %{l_prefix}
  50. BuildRoot: %{l_buildroot}
  51. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, patch
  52. PreReq: OpenPKG, openpkg >= 20030103, perl, patch
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. CVS is a version control system, which allows you to keep old
  57. versions of files (usually source code), keep a log of who,
  58. when, and why changes occurred, etc., like RCS or SCCS. Unlike
  59. the simpler systems, CVS does not just operate on one file at a
  60. time or one directory at a time, but operates on hierarchical
  61. collections of directories consisting of version controlled files.
  62. CVS helps to manage releases and to control the concurrent editing
  63. of source files among multiple authors. CVS allows triggers to
  64. enable/log/control various operations and works well over a wide
  65. area network. CVS keeps a single copy of the master sources. This
  66. copy is called the source repository.
  67. Additionally the following popular CVS tools are included: cvs2cl
  68. (a tool for assembling a GNU ChangeLog file from "cvs log" output)
  69. and cvslock (an administration tool for manually locking a CVS
  70. repository area).
  71. %if "%{with_rse_patches}" == "yes"
  72. This version of CVS has the large set of patches applied from
  73. Ralf S. Engelschall <rse@engelschall.com> (-DRSE_PATCHES). This
  74. means that (still undocumented) extra functionality is available.
  75. %endif
  76. %prep
  77. %setup0 -q -c
  78. %setup1 -q -T -D -a 1
  79. %if "%{with_rse_patches}" == "yes"
  80. ( cd cvs-%{V_cvs}
  81. cat %{SOURCE cvs.patches.rse} |\
  82. sed -e 's;\(#define RSE_PATCH_CVSUSER_CALLER "\)cvs\("\);\1%{with_rse_patch_cvsuser_caller}\2;' |\
  83. %{l_patch} -p0
  84. # patch the patches to run on Solaris
  85. case "%{l_target}" in
  86. *-solaris* )
  87. %{l_patch} -p0 < %{SOURCE cvs.patches.msvb}
  88. ;;
  89. esac
  90. )
  91. %endif
  92. %build
  93. ( cd cvs-%{V_cvs}
  94. CC="%{l_cc}" \
  95. %if "%{with_rse_patches}" == "yes"
  96. CFLAGS="%{l_cflags -O} -DRSE_PATCHES" \
  97. %else
  98. CFLAGS="%{l_cflags -O}" \
  99. %endif
  100. ./configure \
  101. --prefix=%{l_prefix} \
  102. --with-patch=%{l_prefix}/bin/patch \
  103. --with-tmpdir=%{l_prefix}/var/cvs/tmp \
  104. --without-krb4 \
  105. --without-gssapi \
  106. --enable-encryption \
  107. --enable-server
  108. %{l_make} %{l_mflags -O}
  109. )
  110. ( cd cvslock-%{V_cvslock}
  111. CC="%{l_cc}" \
  112. CFLAGS="%{l_cflags -O}" \
  113. ./configure \
  114. --prefix=%{l_prefix}
  115. %{l_make} %{l_mflags -O}
  116. )
  117. %install
  118. rm -rf $RPM_BUILD_ROOT
  119. ( cd cvs-%{V_cvs}
  120. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  121. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs2log
  122. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  123. mv $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib/* \
  124. $RPM_BUILD_ROOT%{l_prefix}/share/cvs/
  125. rmdir $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib
  126. )
  127. ( cd cvslock-%{V_cvslock}
  128. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  129. )
  130. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  131. %{l_shtool} mkdir -f -p -m 755 \
  132. $RPM_BUILD_ROOT%{l_prefix}/var/cvs/tmp
  133. %if "%{with_rse_patches}" == "yes"
  134. %{l_shtool} mkdir -f -p -m 755 \
  135. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  136. %{l_shtool} install -c -m 755 \
  137. -e 's;@l_prefix@;%{l_prefix};g' \
  138. -e 's;@l_susr@;%{l_susr};g' \
  139. -e 's;@l_musr@;%{l_musr};g' \
  140. -e 's;@l_mgrp@;%{l_mgrp};g' \
  141. %{SOURCE rc.cvs} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  142. %endif
  143. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  144. %{l_files_std} \
  145. '%attr(1777,-,-) %{l_prefix}/var/cvs/tmp'
  146. %files -f files
  147. %clean
  148. rm -rf $RPM_BUILD_ROOT