perl-locale.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. ##
  2. ## perl-locale.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # versions of individual parts
  26. %define V_perl 5.8.5
  27. %define V_i18n_langtags 0.35
  28. %define V_encode 2.08
  29. %define V_encode_newlines 0.03
  30. %define V_encode_registry 0.12
  31. %define V_libintl_perl 1.11
  32. %define V_gettext 1.03
  33. %define V_locale_po 0.13a
  34. %define V_locale_maketext 1.09
  35. %define V_locale_maketext_fuzzy 0.02
  36. %define V_locale_maketext_lexicon 0.45
  37. %define V_locale_codes 2.07
  38. %define V_locale_subcountry 1.34
  39. # package information
  40. Name: perl-locale
  41. Summary: Perl Locale Modules
  42. URL: http://www.cpan.org/
  43. Vendor: Perl Community
  44. Packager: The OpenPKG Project
  45. Distribution: OpenPKG
  46. Class: BASE
  47. Group: Language
  48. License: GPL/Artistic
  49. Version: %{V_perl}
  50. Release: 20041124
  51. # list of sources
  52. Source0: http://www.cpan.org/modules/by-module/I18N/I18N-LangTags-%{V_i18n_langtags}.tar.gz
  53. Source1: http://www.cpan.org/modules/by-module/Encode/Encode-%{V_encode}.tar.gz
  54. Source2: http://www.cpan.org/modules/by-module/Encode/Encode-Newlines-%{V_encode_newlines}.tar.gz
  55. Source3: http://www.cpan.org/modules/by-module/Encode/Encode-Registry-%{V_encode_registry}.tar.gz
  56. Source4: http://www.cpan.org/modules/by-module/Locale/libintl-perl-%{V_libintl_perl}.tar.gz
  57. Source5: http://www.cpan.org/modules/by-module/Locale/gettext-%{V_gettext}.tar.gz
  58. Source6: http://www.cpan.org/modules/by-module/Locale/Locale-PO-%{V_locale_po}.tar.gz
  59. Source7: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-%{V_locale_maketext}.tar.gz
  60. Source8: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Fuzzy-%{V_locale_maketext_fuzzy}.tar.gz
  61. Source9: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Lexicon-%{V_locale_maketext_lexicon}.tar.gz
  62. Source10: http://www.cpan.org/modules/by-module/Locale/Locale-Codes-%{V_locale_codes}.tar.gz
  63. Source11: http://www.cpan.org/modules/by-module/Locale/Locale-SubCountry-%{V_locale_subcountry}.tar.gz
  64. # build information
  65. Prefix: %{l_prefix}
  66. BuildRoot: %{l_buildroot}
  67. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  68. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  69. BuildPreReq: gettext, libiconv
  70. PreReq: gettext, libiconv
  71. AutoReq: no
  72. AutoReqProv: no
  73. %description
  74. Various Perl modules for locale handling:
  75. - I18N::LangTags (%{V_i18n_langtags})
  76. - Encode (%{V_encode})
  77. - Encode::Newlines (%{V_encode_newlines})
  78. - Encode::Registry (%{V_encode_registry})
  79. - libintl-perl (%{V_libintl_perl})
  80. - Locale::gettext (%{V_gettext})
  81. - Locale::PO (%{V_locale_po})
  82. - Locale::Maketext (%{V_locale_maketext})
  83. - Locale::Maketext::Fuzzy (%{V_locale_maketext_fuzzy})
  84. - Locale::Maketext::Lexicon (%{V_locale_maketext_lexicon})
  85. - Locale::Codes (%{V_locale_codes})
  86. - Locale::SubCountry (%{V_locale_subcountry})
  87. %track
  88. prog perl-locale:I18N-LangTags = {
  89. version = %{V_i18n_langtags}
  90. url = http://www.cpan.org/modules/by-module/I18N/
  91. regex = I18N-LangTags-(__VER__)\.tar\.gz
  92. }
  93. prog perl-locale:Encode = {
  94. version = %{V_encode}
  95. url = http://www.cpan.org/modules/by-module/Encode/
  96. regex = Encode-(__VER__)\.tar\.gz
  97. }
  98. prog perl-locale:Encode-Newlines = {
  99. version = %{V_encode_newlines}
  100. url = http://www.cpan.org/modules/by-module/Encode/
  101. regex = Encode-Newlines-(__VER__)\.tar\.gz
  102. }
  103. prog perl-locale:Encode-Registry = {
  104. version = %{V_encode_registry}
  105. url = http://www.cpan.org/modules/by-module/Encode/
  106. regex = Encode-Registry-(__VER__)\.tar\.gz
  107. }
  108. prog perl-locale:libintl-perl = {
  109. version = %{V_libintl_perl}
  110. url = http://www.cpan.org/modules/by-module/Locale/
  111. regex = libintl-perl-(__VER__)\.tar\.gz
  112. }
  113. prog perl-locale:gettext = {
  114. version = %{V_gettext}
  115. url = http://www.cpan.org/modules/by-module/Locale/
  116. regex = gettext-(__VER__)\.tar\.gz
  117. }
  118. prog perl-locale:Locale-PO = {
  119. version = %{V_locale_po}
  120. url = http://www.cpan.org/modules/by-module/Locale/
  121. regex = Locale-PO-(__VER__)\.tar\.gz
  122. }
  123. prog perl-locale:Locale-Maketext = {
  124. version = %{V_locale_maketext}
  125. url = http://www.cpan.org/modules/by-module/Locale/
  126. regex = Locale-Maketext-(__VER__)\.tar\.gz
  127. }
  128. prog perl-locale:Locale-Maketext-Fuzzy = {
  129. version = %{V_locale_maketext_fuzzy}
  130. url = http://www.cpan.org/modules/by-module/Locale/
  131. regex = Locale-Maketext-Fuzzy-(__VER__)\.tar\.gz
  132. }
  133. prog perl-locale:Locale-Maketext-Lexicon = {
  134. version = %{V_locale_maketext_lexicon}
  135. url = http://www.cpan.org/modules/by-module/Locale/
  136. regex = Locale-Maketext-Lexicon-(__VER__)\.tar\.gz
  137. }
  138. prog perl-locale:Locale-Codes = {
  139. version = %{V_locale_codes}
  140. url = http://www.cpan.org/modules/by-module/Locale/
  141. regex = Locale-Codes-(__VER__)\.tar\.gz
  142. }
  143. prog perl-locale:Locale-SubCountry = {
  144. version = %{V_locale_subcountry}
  145. url = http://www.cpan.org/modules/by-module/Locale/
  146. regex = Locale-SubCountry-(__VER__)\.tar\.gz
  147. }
  148. %prep
  149. %setup -q -c
  150. %setup -q -T -D -a 1
  151. %setup -q -T -D -a 2
  152. %setup -q -T -D -a 3
  153. %setup -q -T -D -a 4
  154. %setup -q -T -D -a 5
  155. %setup -q -T -D -a 6
  156. %setup -q -T -D -a 7
  157. %setup -q -T -D -a 8
  158. %setup -q -T -D -a 9
  159. %setup -q -T -D -a 10
  160. %setup -q -T -D -a 11
  161. %build
  162. %install
  163. rm -rf $RPM_BUILD_ROOT
  164. %{l_prefix}/bin/perl-openpkg prepare
  165. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  166. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  167. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  168. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  169. ( cd libintl-perl-%{V_libintl_perl}
  170. %{l_shtool} subst \
  171. -e 's;\($Config{ccflags}\);\1 . "%{l_cflags} %{l_cppflags}";' \
  172. -e 's;\($Config{libs}\);"%{l_ldflags}" . \1;' \
  173. Makefile.PL
  174. %{l_shtool} subst \
  175. -e 's;\(PL_FILES\);INC => "%{l_cppflags}", \1;' \
  176. -e 's;\(-lintl\);%{l_ldflags} \1;' \
  177. -e 's;\(-liconv\);%{l_ldflags} \1;' \
  178. gettext_xs/Makefile.PL
  179. %{l_prefix}/bin/perl-openpkg configure build install
  180. ) || exit $?
  181. ( cd gettext-%{V_gettext}
  182. %{l_shtool} subst \
  183. -e 's;-lintl;%{l_ldflags} -lintl;' \
  184. Makefile.PL
  185. %{l_prefix}/bin/perl-openpkg configure build install
  186. ) || exit $?
  187. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  188. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  189. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  190. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  191. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  192. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  193. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xgettext.pl
  194. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  195. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  196. %files -f files
  197. %clean
  198. rm -rf $RPM_BUILD_ROOT