svnnotify.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ##
  2. ## svnnotify.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 version
  24. %define V_svn_notify 2.74
  25. %define V_svn_notify_config 0.0911
  26. %define V_svn_notify_mirror 0.038
  27. # package information
  28. Name: svnnotify
  29. Summary: Subversion Repository Notification
  30. URL: http://www.cpan.org/modules/by-module/SVN/
  31. Vendor: David Wheeler et al.
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: SCM
  36. License: GPL/Artistic
  37. Version: %{V_svn_notify}
  38. Release: 20080518
  39. # package options
  40. %option with_config yes
  41. %option with_mirror yes
  42. # list of sources
  43. Source0: http://www.cpan.org/modules/by-module/SVN/SVN-Notify-%{V_svn_notify}.tar.gz
  44. Source1: http://www.cpan.org/modules/by-module/SVN/SVN-Notify-Config-%{V_svn_notify_config}.tar.gz
  45. Source2: http://www.cpan.org/modules/by-module/SVN/SVN-Notify-Mirror-%{V_svn_notify_mirror}.tar.gz
  46. Patch0: svnnotify.patch
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20060823, perl-openpkg
  51. PreReq: OpenPKG, openpkg >= 20060823, subversion
  52. BuildPreReq: perl, perl-net, perl-xml, perl-module
  53. PreReq: perl, perl-net, perl-xml, perl-module
  54. %if "%{with_config}" == "yes"
  55. BuildPreReq: yaml, yaml::with_perl = yes
  56. PreReq: yaml, yaml::with_perl = yes
  57. %endif
  58. %if "%{with_mirror}" == "yes"
  59. BuildPreReq: perl-ssh, perl-sys, rsync
  60. PreReq: perl-ssh, perl-sys, rsync
  61. %endif
  62. AutoReq: no
  63. AutoReqProv: no
  64. %description
  65. svnnotify(1) and the underlying Perl module SVN::Notify may be used
  66. for sending Email messages for Subversion repository activity. There
  67. are a number of different modes supported, and SVN::Notify is fully
  68. sub-classable to easily add new functionality. By default, A list of
  69. all the files affected by the commit will be assembled and listed in
  70. a single message. An additional option allows diffs to be calculated
  71. for the changes and either appended to the message or added as an
  72. attachment.
  73. %track
  74. prog svnnotify:SVN-Notify = {
  75. version = %{V_svn_notify}
  76. url = http://www.cpan.org/modules/by-module/SVN/
  77. regex = SVN-Notify-(__VER__)\.tar\.gz
  78. }
  79. prog svnnotify:SVN-Notify-Config = {
  80. version = %{V_svn_notify_config}
  81. url = http://www.cpan.org/modules/by-module/SVN/
  82. regex = SVN-Notify-Config-(__VER__)\.tar\.gz
  83. }
  84. prog svnnotify:SVN-Notify-Mirror = {
  85. version = %{V_svn_notify_mirror}
  86. url = http://www.cpan.org/modules/by-module/SVN/
  87. regex = SVN-Notify-Mirror-(__VER__)\.tar\.gz
  88. }
  89. %prep
  90. %setup -q -c
  91. %if "%{with_config}" == "yes"
  92. %setup -q -D -T -a 1
  93. %endif
  94. %if "%{with_mirror}" == "yes"
  95. %setup -q -D -T -a 2
  96. %endif
  97. %{l_sed} <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
  98. %build
  99. %install
  100. rm -rf $RPM_BUILD_ROOT
  101. %{l_prefix}/bin/perl-openpkg prepare
  102. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  103. %if "%{with_config}" == "yes"
  104. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  105. %endif
  106. %if "%{with_mirror}" == "yes"
  107. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  108. %endif
  109. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  110. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  111. %{l_files_std} `cat perl-openpkg-files`
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT