perl-time.spec 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. ##
  2. ## perl-time.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. # versions of individual parts
  24. %define V_perl 5.10.0
  25. %define V_time_date 1.16
  26. %define V_time_hires 1.9715
  27. %define V_time_local 1.18
  28. %define V_date_manip 5.54
  29. %define V_date_calc 5.4
  30. %define V_class_date 1.1.9
  31. %define V_benchmark_timer 0.7100
  32. %define V_time_modules 2006.0814
  33. %define V_time_tai64 2.11
  34. %define V_datetime_locale 0.41
  35. %define V_datetime 0.43
  36. %define V_datetime_timezone 0.78
  37. %define V_datetime_businesshours 1.01a
  38. %define V_time_piece 1.13
  39. %define V_time_duration 1.06
  40. # package information
  41. Name: perl-time
  42. Summary: Perl Modules for Date/Time Handling
  43. URL: http://www.cpan.org/
  44. Vendor: Perl Community
  45. Packager: OpenPKG Foundation e.V.
  46. Distribution: OpenPKG Community
  47. Class: BASE
  48. Group: Perl
  49. License: GPL/Artistic
  50. Version: %{V_perl}
  51. Release: 20080713
  52. # list of sources
  53. Source0: http://www.cpan.org/modules/by-module/Time/TimeDate-%{V_time_date}.tar.gz
  54. Source1: http://www.cpan.org/modules/by-module/Time/Time-HiRes-%{V_time_hires}.tar.gz
  55. Source2: http://www.cpan.org/modules/by-module/Time/Time-Local-%{V_time_local}.tar.gz
  56. Source3: http://www.cpan.org/modules/by-module/Date/Date-Manip-%{V_date_manip}.tar.gz
  57. Source4: http://www.cpan.org/modules/by-module/Date/Date-Calc-%{V_date_calc}.tar.gz
  58. Source5: http://www.cpan.org/modules/by-module/Class/Class-Date-%{V_class_date}.tar.gz
  59. Source6: http://www.cpan.org/modules/by-module/Benchmark/Benchmark-Timer-%{V_benchmark_timer}.tar.gz
  60. Source7: http://www.cpan.org/modules/by-module/Time/Time-modules-%{V_time_modules}.tar.gz
  61. Source8: http://www.cpan.org/modules/by-module/Time/Time-TAI64-%{V_time_tai64}.tar.gz
  62. Source9: http://www.cpan.org/modules/by-module/DateTime/DateTime-Locale-%{V_datetime_locale}.tar.gz
  63. Source10: http://www.cpan.org/modules/by-module/DateTime/DateTime-%{V_datetime}.tar.gz
  64. Source11: http://www.cpan.org/modules/by-module/DateTime/DateTime-TimeZone-%{V_datetime_timezone}.tar.gz
  65. Source12: http://www.cpan.org/modules/by-module/Time/Time-Piece-%{V_time_piece}.tar.gz
  66. Source13: http://www.cpan.org/modules/by-module/Time/Time-Duration-%{V_time_duration}.tar.gz
  67. Source14: http://www.cpan.org/modules/by-module/DateTime/DateTime-BusinessHours-%{V_datetime_businesshours}.tar.gz
  68. Patch0: perl-time.patch
  69. # build information
  70. Prefix: %{l_prefix}
  71. BuildRoot: %{l_buildroot}
  72. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  73. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  74. BuildPreReq: perl-util, perl-ds, perl-stats, perl-module
  75. PreReq: perl-util, perl-ds, perl-stats, perl-module
  76. AutoReq: no
  77. AutoReqProv: no
  78. %description
  79. Various Perl modules for Date and Time handling:
  80. - Time::Date (%{V_time_date})
  81. - Time::HiRes (%{V_time_hires})
  82. - Time::Local (%{V_time_local})
  83. - Date::Manip (%{V_date_manip})
  84. - Date::Calc (%{V_date_calc})
  85. - Class::Date (%{V_class_date})
  86. - Benchmark::Timer (%{V_benchmark_timer})
  87. - Time::Modules (%{V_time_modules})
  88. - Time::TAI64 (%{V_time_tai64})
  89. - DateTime (%{V_datetime})
  90. - DateTime::Locale (%{V_datetime_locale})
  91. - DateTime::TimeZone (%{V_datetime_timezone})
  92. - DateTime::BusinessHours (%{V_datetime_businesshours})
  93. - Time::Piece (%{V_time_piece})
  94. - Time::Duration (%{V_time_duration})
  95. %track
  96. prog perl-time:Benchmark-Timer = {
  97. version = %{V_benchmark_timer}
  98. url = http://www.cpan.org/modules/by-module/Benchmark/
  99. regex = Benchmark-Timer-(__VER__)\.tar\.gz
  100. }
  101. prog perl-time:Class-Date = {
  102. version = %{V_class_date}
  103. url = http://www.cpan.org/modules/by-module/Class/
  104. regex = Class-Date-(__VER__)\.tar\.gz
  105. }
  106. prog perl-time:Date-Calc = {
  107. version = %{V_date_calc}
  108. url = http://www.cpan.org/modules/by-module/Date/
  109. regex = Date-Calc-(__VER__)\.tar\.gz
  110. }
  111. prog perl-time:DateManip = {
  112. version = %{V_date_manip}
  113. url = http://www.cpan.org/modules/by-module/Date/
  114. regex = Date-Manip-(__VER__)\.tar\.gz
  115. }
  116. prog perl-time:Time-modules = {
  117. version = %{V_time_modules}
  118. url = http://www.cpan.org/modules/by-module/Time/
  119. regex = Time-modules-(__VER__)\.tar\.gz
  120. }
  121. prog perl-time:Time-HiRes = {
  122. version = %{V_time_hires}
  123. url = http://www.cpan.org/modules/by-module/Time/
  124. regex = Time-HiRes-(__VER__)\.tar\.gz
  125. }
  126. prog perl-time:Time-Local = {
  127. version = %{V_time_local}
  128. url = http://www.cpan.org/modules/by-module/Time/
  129. regex = Time-Local-(__VER__)\.tar\.gz
  130. }
  131. prog perl-time:TimeDate = {
  132. version = %{V_time_date}
  133. url = http://www.cpan.org/modules/by-module/Time/
  134. regex = TimeDate-(__VER__)\.tar\.gz
  135. }
  136. prog perl-time:Time-TAI64 = {
  137. version = %{V_time_tai64}
  138. url = http://www.cpan.org/modules/by-module/Time/
  139. regex = Time-TAI64-(__VER__)\.tar\.gz
  140. }
  141. prog perl-time:DateTime = {
  142. version = %{V_datetime}
  143. url = http://www.cpan.org/modules/by-module/DateTime/
  144. regex = DateTime-(\d+\.\d\d)\.tar\.gz
  145. }
  146. prog perl-time:DateTime-Locale = {
  147. version = %{V_datetime_locale}
  148. url = http://www.cpan.org/modules/by-module/DateTime/
  149. regex = DateTime-Locale-(\d+\.\d\d)\.tar\.gz
  150. }
  151. prog perl-time:DateTime-TimeZone = {
  152. version = %{V_datetime_timezone}
  153. url = http://www.cpan.org/modules/by-module/DateTime/
  154. regex = DateTime-TimeZone-(\d+\.\d\d)\.tar\.gz
  155. }
  156. prog perl-time:DateTime-BusinessHours = {
  157. version = %{V_datetime_businesshours}
  158. url = http://www.cpan.org/modules/by-module/DateTime/
  159. regex = DateTime-BusinessHours-(__VER__)\.tar\.gz
  160. }
  161. prog perl-time:Time-Piece = {
  162. version = %{V_time_piece}
  163. url = http://www.cpan.org/modules/by-module/Time/
  164. regex = Time-Piece-(__VER__)\.tar\.gz
  165. }
  166. prog perl-time:Time-Duration = {
  167. version = %{V_time_duration}
  168. url = http://www.cpan.org/modules/by-module/Time/
  169. regex = Time-Duration-(__VER__)\.tar\.gz
  170. }
  171. %prep
  172. %setup -q -c
  173. %setup -q -T -D -a 1
  174. %setup -q -T -D -a 2
  175. %setup -q -T -D -a 3
  176. %setup -q -T -D -a 4
  177. %setup -q -T -D -a 5
  178. %setup -q -T -D -a 6
  179. %setup -q -T -D -a 7
  180. %setup -q -T -D -a 8
  181. %setup -q -T -D -a 9
  182. %setup -q -T -D -a 10
  183. %setup -q -T -D -a 11
  184. %setup -q -T -D -a 12
  185. %setup -q -T -D -a 13
  186. %setup -q -T -D -a 14
  187. %patch -p0
  188. %build
  189. %install
  190. rm -rf $RPM_BUILD_ROOT
  191. %{l_prefix}/bin/perl-openpkg prepare
  192. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  193. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  194. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  195. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  196. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  197. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  198. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  199. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  200. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  201. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  202. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  203. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  204. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  205. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  206. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  207. # FIXME: remove the Date::Calc conflict files
  208. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  209. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  210. %files -f files
  211. %clean
  212. rm -rf $RPM_BUILD_ROOT