cvs.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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.12.1
  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: 20030527
  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.bz2
  44. Source1: ftp://riemann.iam.uni-bonn.de/pub/users/roessler/cvslock/cvslock-%{V_cvslock}.tar.gz
  45. Source2: cvs.patches.rse
  46. Source3: rc.cvs
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, patch
  51. PreReq: OpenPKG, openpkg >= 20030103, perl, patch
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. CVS is a version control system, which allows you to keep old
  56. versions of files (usually source code), keep a log of who,
  57. when, and why changes occurred, etc., like RCS or SCCS. Unlike
  58. the simpler systems, CVS does not just operate on one file at a
  59. time or one directory at a time, but operates on hierarchical
  60. collections of directories consisting of version controlled files.
  61. CVS helps to manage releases and to control the concurrent editing
  62. of source files among multiple authors. CVS allows triggers to
  63. enable/log/control various operations and works well over a wide
  64. area network. CVS keeps a single copy of the master sources. This
  65. copy is called the source repository.
  66. Additionally the following popular CVS tools are included: cvs2cl
  67. (a tool for assembling a GNU ChangeLog file from "cvs log" output)
  68. and cvslock (an administration tool for manually locking a CVS
  69. repository area).
  70. %if "%{with_rse_patches}" == "yes"
  71. This version of CVS has the large set of patches applied from
  72. Ralf S. Engelschall <rse@engelschall.com> (-DRSE_PATCHES). This
  73. means that (still undocumented) extra functionality is available.
  74. %endif
  75. %prep
  76. %setup0 -q -c
  77. %setup1 -q -T -D -a 1
  78. %if "%{with_rse_patches}" == "yes"
  79. ( cd cvs-%{V_cvs}
  80. cat %{SOURCE cvs.patches.rse} |\
  81. sed -e 's;\(#define RSE_PATCH_CVSUSER_CALLER "\)cvs\("\);\1%{with_rse_patch_cvsuser_caller}\2;' |\
  82. %{l_patch} -p0
  83. )
  84. %endif
  85. %build
  86. ( cd cvs-%{V_cvs}
  87. CC="%{l_cc}" \
  88. %if "%{with_rse_patches}" == "yes"
  89. CFLAGS="%{l_cflags -O} -DRSE_PATCHES" \
  90. %else
  91. CFLAGS="%{l_cflags -O}" \
  92. %endif
  93. ./configure \
  94. --prefix=%{l_prefix} \
  95. --with-patch=%{l_prefix}/bin/patch \
  96. --with-tmpdir=%{l_prefix}/var/cvs/tmp \
  97. --without-krb4 \
  98. --without-gssapi \
  99. --enable-encryption \
  100. --enable-server
  101. %{l_make} %{l_mflags -O}
  102. )
  103. ( cd cvslock-%{V_cvslock}
  104. CC="%{l_cc}" \
  105. CFLAGS="%{l_cflags -O}" \
  106. ./configure \
  107. --prefix=%{l_prefix}
  108. %{l_make} %{l_mflags -O}
  109. )
  110. %install
  111. rm -rf $RPM_BUILD_ROOT
  112. ( cd cvs-%{V_cvs}
  113. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  114. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs2log
  115. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  116. mv $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib/* \
  117. $RPM_BUILD_ROOT%{l_prefix}/share/cvs/
  118. rmdir $RPM_BUILD_ROOT%{l_prefix}/share/cvs/contrib
  119. )
  120. ( cd cvslock-%{V_cvslock}
  121. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  122. )
  123. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  124. %{l_shtool} mkdir -f -p -m 755 \
  125. $RPM_BUILD_ROOT%{l_prefix}/var/cvs/tmp
  126. %if "%{with_rse_patches}" == "yes"
  127. %{l_shtool} mkdir -f -p -m 755 \
  128. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  129. %{l_shtool} install -c -m 755 \
  130. -e 's;@l_prefix@;%{l_prefix};g' \
  131. -e 's;@l_susr@;%{l_susr};g' \
  132. -e 's;@l_musr@;%{l_musr};g' \
  133. -e 's;@l_mgrp@;%{l_mgrp};g' \
  134. %{SOURCE rc.cvs} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  135. %endif
  136. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  137. %{l_files_std} \
  138. '%attr(1777,-,-) %{l_prefix}/var/cvs/tmp'
  139. %files -f files
  140. %clean
  141. rm -rf $RPM_BUILD_ROOT