cvs.spec 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ##
  2. ## cvs.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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.2
  27. %define V_cvslock 0.2
  28. # optional support for applying the RSE patches
  29. %ifndef with_rse_patches
  30. %define with_rse_patches no
  31. %endif
  32. %ifndef with_rse_patch_cvsuser_caller
  33. %define with_rse_patch_cvsuser_caller cvs
  34. %endif
  35. # package information
  36. Name: cvs
  37. Summary: Concurrent Versions Systems (CVS)
  38. URL: http://www.cvshome.org/
  39. Vendor: B. Berliner, D.D. Zuhn, J. Polk
  40. Packager: The OpenPKG Project
  41. Distribution: OpenPKG [BASE]
  42. Group: SCM
  43. License: GPL
  44. Version: %{V_cvs}
  45. Release: 20020822
  46. # list of sources
  47. Source0: http://www.cvshome.org/files/19/10/cvs-%{V_cvs}.tar.gz
  48. Source1: ftp://riemann.iam.uni-bonn.de/pub/users/roessler/cvslock/cvslock-%{V_cvslock}.tar.gz
  49. Source2: http://www.red-bean.com/cvs2cl/cvs2cl.pl
  50. Source3: cvs.patches.rse
  51. Source4: rc.cvs
  52. Patch0: cvs.patch
  53. # build information
  54. Prefix: %{l_prefix}
  55. BuildRoot: %{l_buildroot}
  56. BuildPreReq: OpenPKG, openpkg >= 20020714, perl, patch
  57. PreReq: OpenPKG, openpkg >= 20020714, perl, patch
  58. AutoReq: no
  59. AutoReqProv: no
  60. %description
  61. CVS is a version control system, which allows you to keep old
  62. versions of files (usually source code), keep a log of who,
  63. when, and why changes occurred, etc., like RCS or SCCS. Unlike
  64. the simpler systems, CVS does not just operate on one file at a
  65. time or one directory at a time, but operates on hierarchical
  66. collections of directories consisting of version controlled files.
  67. CVS helps to manage releases and to control the concurrent editing
  68. of source files among multiple authors. CVS allows triggers to
  69. enable/log/control various operations and works well over a wide
  70. area network. CVS keeps a single copy of the master sources. This
  71. copy is called the source repository.
  72. Additionally the following popular CVS tools are included: cvs2cl
  73. (a tool for assembling a GNU ChangeLog file from "cvs log" output)
  74. and cvslock (an administration tool for manually locking a CVS
  75. repository area).
  76. Options:
  77. --define 'with_rse_patches %{with_rse_patches}' \
  78. --define 'with_rse_patch_cvsuser_caller %{with_rse_patch_cvsuser_caller}'
  79. %if "%{with_rse_patches}" == "yes"
  80. This version of CVS has the large set of patches applied from
  81. Ralf S. Engelschall <rse@engelschall.com> (-DRSE_PATCHES). This
  82. means that (still undocumented) extra functionality is available.
  83. %endif
  84. %prep
  85. %setup0 -q -c
  86. %patch0 -p0
  87. %setup1 -q -T -D -a 1
  88. %if "%{with_rse_patches}" == "yes"
  89. ( cd cvs-%{V_cvs}
  90. cat %{SOURCE cvs.patches.rse} |\
  91. sed -e 's;\(#define RSE_PATCH_CVSUSER_CALLER "\)cvs\("\);\1%{with_rse_patch_cvsuser_caller}\2;' |\
  92. %{l_patch} -p0
  93. )
  94. %endif
  95. %build
  96. ( cd cvs-%{V_cvs}
  97. CC="%{l_cc}" \
  98. %if "%{with_rse_patches}" == "yes"
  99. CFLAGS="%{l_cflags -O} -DRSE_PATCHES" \
  100. %else
  101. CFLAGS="%{l_cflags -O}" \
  102. %endif
  103. ./configure \
  104. --prefix=%{l_prefix} \
  105. --with-patch=%{l_prefix}/bin/patch \
  106. --without-krb4 \
  107. --without-gssapi \
  108. --enable-encryption \
  109. --enable-server
  110. %{l_make} %{l_mflags -O}
  111. )
  112. ( cd cvslock-%{V_cvslock}
  113. CC="%{l_cc}" \
  114. CFLAGS="%{l_cflags -O}" \
  115. ./configure \
  116. --prefix=%{l_prefix}
  117. %{l_make} %{l_mflags -O}
  118. )
  119. %install
  120. rm -rf $RPM_BUILD_ROOT
  121. ( cd cvs-%{V_cvs}
  122. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  123. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs2log
  124. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  125. mv $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib/* \
  126. $RPM_BUILD_ROOT%{l_prefix}/share/cvs/
  127. rmdir $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib
  128. )
  129. ( cd cvslock-%{V_cvslock}
  130. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  131. )
  132. %{l_shtool} install -c -m 755 \
  133. %{SOURCE cvs2cl.pl} $RPM_BUILD_ROOT%{l_prefix}/bin/cvs2cl
  134. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  135. %if "%{with_rse_patches}" == "yes"
  136. %{l_shtool} mkdir -f -p -m 755 \
  137. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  138. $RPM_BUILD_ROOT%{l_prefix}/var/cvs
  139. %{l_shtool} install -c -m 755 \
  140. -e 's;@l_prefix@;%{l_prefix};g' \
  141. -e 's;@l_musr@;%{l_musr};g' \
  142. -e 's;@l_mgrp@;%{l_mgrp};g' \
  143. %{SOURCE rc.cvs} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  144. %endif
  145. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  146. %files -f files
  147. %clean
  148. rm -rf $RPM_BUILD_ROOT