perl-locale.spec 11 KB

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