viewvc.spec 4.5 KB

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