cvs.spec 6.2 KB

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