svnweb.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## svnweb.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 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 information
  24. Name: svnweb
  25. Summary: Subversion Repository Viewer
  26. URL: http://search.cpan.org/~nikc/SVN-Web/
  27. Vendor: Chia-liang Kao, Nik Clayton et al.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: SCM
  32. License: Artistic/GPL
  33. Version: 0.53
  34. Release: 20081026
  35. # list of sources
  36. Source0: http://www.cpan.org/authors/id/N/NI/NIKC/SVN-Web-%{version}.tar.gz
  37. Source1: svnweb-apache.conf
  38. Source2: svnweb.yaml
  39. Patch0: svnweb.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, perl-openpkg
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. BuildPreReq: perl, perl-parse, perl-text, perl-mail, perl-locale, perl-time, perl-util, perl-ds, perl-www, perl-template
  46. PreReq: perl, perl-parse, perl-text, perl-mail, perl-locale, perl-time, perl-util, perl-ds, perl-www, perl-template
  47. BuildPreReq: yaml, yaml::with_perl = yes
  48. PreReq: yaml, yaml::with_perl = yes
  49. BuildPreReq: subversion, subversion::with_perl = yes
  50. PreReq: subversion, subversion::with_perl = yes
  51. PreReq: apache, apache-perl
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. SVN::Web provides a full-featured and theme-able Web interface to
  56. local or remote Subversion (SVN) repositories.
  57. %track
  58. prog svnweb = {
  59. version = %{version}
  60. url = http://search.cpan.org/~nikc/SVN-Web/
  61. regex = SVN-Web-(__VER__)\.tar\.gz
  62. }
  63. %prep
  64. %setup -q -n SVN-Web-%{version}
  65. chmod a+rw Build.PL
  66. %patch -p0
  67. %build
  68. %install
  69. rm -rf $RPM_BUILD_ROOT
  70. %{l_shtool} mkdir -f -p -m 755 \
  71. $RPM_BUILD_ROOT%{l_prefix}/etc/svnweb \
  72. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
  73. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  74. %{SOURCE svnweb.yaml} \
  75. $RPM_BUILD_ROOT%{l_prefix}/etc/svnweb/config.yaml
  76. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  77. %{SOURCE svnweb-apache.conf} \
  78. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/svnweb.conf
  79. %{l_prefix}/bin/perl-openpkg prepare
  80. %{l_prefix}/bin/perl-openpkg configure \
  81. -A --norun_apache_tests \
  82. -A --norun_apache_cgi_tests \
  83. -A --norun_svnweb-server_tests \
  84. -A --skip_questions
  85. %{l_prefix}/bin/perl-openpkg configure build install
  86. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  88. %{l_files_std} \
  89. `cat perl-openpkg-files` \
  90. '%config %{l_prefix}/etc/svnweb/*' \
  91. '%config %{l_prefix}/etc/apache/apache.d/*'
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT
  95. %post
  96. # after upgrade, restart service
  97. [ $1 -eq 2 ] || exit 0
  98. eval `%{l_rc} apache status 2>/dev/null`
  99. [ ".$apache_active" = .yes ] && %{l_rc} apache restart
  100. exit 0