perl-locale.spec 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. ##
  2. ## perl-locale.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 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.6
  27. %define V_i18n_langtags 0.35
  28. %define V_encode 2.09
  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.04
  33. %define V_locale_po 0.14
  34. %define V_locale_maketext 1.09
  35. %define V_locale_maketext_fuzzy 0.02
  36. %define V_locale_maketext_lexicon 0.47
  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: 20050206
  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. Patch0: perl-locale.patch
  65. # build information
  66. Prefix: %{l_prefix}
  67. BuildRoot: %{l_buildroot}
  68. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  69. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  70. BuildPreReq: gettext, libiconv
  71. PreReq: gettext, libiconv
  72. AutoReq: no
  73. AutoReqProv: no
  74. %description
  75. Various Perl modules for locale handling:
  76. - I18N::LangTags (%{V_i18n_langtags})
  77. - Encode (%{V_encode})
  78. - Encode::Newlines (%{V_encode_newlines})
  79. - Encode::Registry (%{V_encode_registry})
  80. - libintl-perl (%{V_libintl_perl})
  81. - Locale::gettext (%{V_gettext})
  82. - Locale::PO (%{V_locale_po})
  83. - Locale::Maketext (%{V_locale_maketext})
  84. - Locale::Maketext::Fuzzy (%{V_locale_maketext_fuzzy})
  85. - Locale::Maketext::Lexicon (%{V_locale_maketext_lexicon})
  86. - Locale::Codes (%{V_locale_codes})
  87. - Locale::SubCountry (%{V_locale_subcountry})
  88. %track
  89. prog perl-locale:I18N-LangTags = {
  90. version = %{V_i18n_langtags}
  91. url = http://www.cpan.org/modules/by-module/I18N/
  92. regex = I18N-LangTags-(__VER__)\.tar\.gz
  93. }
  94. prog perl-locale:Encode = {
  95. version = %{V_encode}
  96. url = http://www.cpan.org/modules/by-module/Encode/
  97. regex = Encode-(__VER__)\.tar\.gz
  98. }
  99. prog perl-locale:Encode-Newlines = {
  100. version = %{V_encode_newlines}
  101. url = http://www.cpan.org/modules/by-module/Encode/
  102. regex = Encode-Newlines-(__VER__)\.tar\.gz
  103. }
  104. prog perl-locale:Encode-Registry = {
  105. version = %{V_encode_registry}
  106. url = http://www.cpan.org/modules/by-module/Encode/
  107. regex = Encode-Registry-(__VER__)\.tar\.gz
  108. }
  109. prog perl-locale:libintl-perl = {
  110. version = %{V_libintl_perl}
  111. url = http://www.cpan.org/modules/by-module/Locale/
  112. regex = libintl-perl-(__VER__)\.tar\.gz
  113. }
  114. prog perl-locale:gettext = {
  115. version = %{V_gettext}
  116. url = http://www.cpan.org/modules/by-module/Locale/
  117. regex = gettext-(__VER__)\.tar\.gz
  118. }
  119. prog perl-locale:Locale-PO = {
  120. version = %{V_locale_po}
  121. url = http://www.cpan.org/modules/by-module/Locale/
  122. regex = Locale-PO-(__VER__)\.tar\.gz
  123. }
  124. prog perl-locale:Locale-Maketext = {
  125. version = %{V_locale_maketext}
  126. url = http://www.cpan.org/modules/by-module/Locale/
  127. regex = Locale-Maketext-(__VER__)\.tar\.gz
  128. }
  129. prog perl-locale:Locale-Maketext-Fuzzy = {
  130. version = %{V_locale_maketext_fuzzy}
  131. url = http://www.cpan.org/modules/by-module/Locale/
  132. regex = Locale-Maketext-Fuzzy-(__VER__)\.tar\.gz
  133. }
  134. prog perl-locale:Locale-Maketext-Lexicon = {
  135. version = %{V_locale_maketext_lexicon}
  136. url = http://www.cpan.org/modules/by-module/Locale/
  137. regex = Locale-Maketext-Lexicon-(__VER__)\.tar\.gz
  138. }
  139. prog perl-locale:Locale-Codes = {
  140. version = %{V_locale_codes}
  141. url = http://www.cpan.org/modules/by-module/Locale/
  142. regex = Locale-Codes-(__VER__)\.tar\.gz
  143. }
  144. prog perl-locale:Locale-SubCountry = {
  145. version = %{V_locale_subcountry}
  146. url = http://www.cpan.org/modules/by-module/Locale/
  147. regex = Locale-SubCountry-(__VER__)\.tar\.gz
  148. }
  149. %prep
  150. %setup -q -c
  151. %setup -q -T -D -a 1
  152. %setup -q -T -D -a 2
  153. %setup -q -T -D -a 3
  154. %setup -q -T -D -a 4
  155. %setup -q -T -D -a 5
  156. %setup -q -T -D -a 6
  157. %setup -q -T -D -a 7
  158. %setup -q -T -D -a 8
  159. %setup -q -T -D -a 9
  160. %setup -q -T -D -a 10
  161. %setup -q -T -D -a 11
  162. %patch -p0
  163. %build
  164. %install
  165. rm -rf $RPM_BUILD_ROOT
  166. %{l_prefix}/bin/perl-openpkg prepare
  167. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  168. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  169. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  170. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  171. ( cd libintl-perl-%{V_libintl_perl}
  172. %{l_shtool} subst \
  173. -e 's;\($Config{ccflags}\);\1 . "%{l_cflags} %{l_cppflags}";' \
  174. -e 's;\($Config{libs}\);"%{l_ldflags}" . \1;' \
  175. Makefile.PL
  176. %{l_shtool} subst \
  177. -e 's;\(PL_FILES\);INC => "%{l_cppflags}", \1;' \
  178. -e 's;\(-lintl\);%{l_ldflags} \1;' \
  179. -e 's;\(-liconv\);%{l_ldflags} \1;' \
  180. gettext_xs/Makefile.PL
  181. %{l_prefix}/bin/perl-openpkg configure build install
  182. ) || exit $?
  183. ( cd gettext-%{V_gettext}
  184. %{l_shtool} subst \
  185. -e 's;\(incs = .\)\(.\);\1%{l_cppflags}\2;' \
  186. -e 's;\(libs = .\)\(.\);\1%{l_ldflags} -lintl -liconv\2;' \
  187. Makefile.PL
  188. %{l_prefix}/bin/perl-openpkg configure build install
  189. ) || exit $?
  190. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  191. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  192. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  193. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  194. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  195. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  196. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xgettext.pl
  197. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  198. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  199. %files -f files
  200. %clean
  201. rm -rf $RPM_BUILD_ROOT