viewvc.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## viewvc.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_dist 0.9.4
  26. %define V_subdir 3330/27671
  27. # package information
  28. Name: viewvc
  29. Summary: Version Control Repository Viewer
  30. URL: http://www.viewvc.org/
  31. Vendor: The ViewCVS Group
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: EVAL
  35. Group: Web
  36. License: BSD
  37. Version: %{V_dist}
  38. Release: 20060207
  39. # package options
  40. %option with_cvsgraph no
  41. # list of sources
  42. Source0: http://viewvc.tigris.org/files/documents/%{V_subdir}/viewcvs-%{V_dist}.tar.gz
  43. Patch0: viewvc.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130, python
  48. PreReq: OpenPKG, openpkg >= 20040130, python, diffutils, rcs, enscript
  49. %if "%{with_cvsgraph}" == "yes"
  50. PreReq: cvsgraph
  51. %endif
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. ViewVC is a browser interface for CVS and Subversion version control
  56. repositories. It generates templatized HTML to present navigable
  57. directory, revision, and change log listings. It can display
  58. specific versions of files as well as diffs between those versions.
  59. Basically, ViewVC provides the bulk of the report-like functionality
  60. you expect out of your version control tool, but much more prettily
  61. than the average textual command-line program output.
  62. %track
  63. prog viewvc = {
  64. version = %{V_dist}
  65. url = http://viewvc.tigris.org/servlets/ProjectDocumentList?folderID=6004
  66. regex = /files/documents/\d+/\d+/view(?:vc|cvs)-(__VER__)\.tar\.gz
  67. }
  68. prog viewvc:subdir = {
  69. version = %{V_subdir}
  70. url = http://viewvc.tigris.org/servlets/ProjectDocumentList?folderID=6004
  71. regex = /files/documents/(\d+/\d+)/view(?:vc|cvs)-__VER__\.tar\.gz
  72. }
  73. %prep
  74. %setup -q -n viewcvs-%{V_dist}
  75. %patch -p0
  76. %build
  77. %{l_shtool} subst \
  78. -e "s;@RPM_BUILD_ROOT@;$RPM_BUILD_ROOT;" \
  79. viewcvs-install
  80. %{l_shtool} subst \
  81. -e "s;^use_enscript =.*;use_enscript = 1;" \
  82. -e "s;^enscript_path =.*;enscript_path = %{l_prefix}/bin/;" \
  83. cgi/viewcvs.conf.dist
  84. %if "%{with_cvsgraph}" == "yes"
  85. %{l_shtool} subst \
  86. -e "s;^use_cvsgraph =.*;use_cvsgraph = 1;" \
  87. -e "s;^cvsgraph_path =.*;cvsgraph_path = %{l_prefix}/bin/;" \
  88. cgi/viewcvs.conf.dist
  89. %endif
  90. %install
  91. rm -rf $RPM_BUILD_ROOT
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/share/viewvc
  94. echo "%{l_prefix}/share/viewvc" | ./viewcvs-install
  95. for py in $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/lib/*.py; do
  96. %{l_shtool} subst -q \
  97. -e 's;%{l_prefix}/share/viewvc/viewcvs\.conf;%{l_prefix}/etc/viewvc/viewcvs.conf;g' \
  98. -e 's;%{l_prefix}/share/viewvc/cvsgraph\.conf;%{l_prefix}/etc/viewvc/cvsgraph.conf;g' \
  99. $py
  100. eval "%{l_prefix}/bin/python -c 'import py_compile; py_compile.compile(\"$py\")'"
  101. done
  102. %{l_shtool} mkdir -f -p -m 755 \
  103. $RPM_BUILD_ROOT%{l_prefix}/etc/viewvc
  104. mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/viewcvs.conf \
  105. $RPM_BUILD_ROOT%{l_prefix}/etc/viewvc/viewcvs.conf
  106. mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/cvsgraph.conf \
  107. $RPM_BUILD_ROOT%{l_prefix}/etc/viewvc/cvsgraph.conf
  108. mv $RPM_BUILD_ROOT%{l_prefix}/share/viewvc/cgi \
  109. $RPM_BUILD_ROOT%{l_prefix}/cgi
  110. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  111. %{l_files_std} \
  112. '%config %{l_prefix}/etc/viewvc/*'
  113. %files -f files
  114. %clean
  115. rm -rf $RPM_BUILD_ROOT