perl-locale.spec 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. ##
  2. ## perl-locale.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 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.8.6
  26. %define V_i18n_langtags 0.35
  27. %define V_encode 2.09
  28. %define V_encode_newlines 0.03
  29. %define V_encode_registry 0.12
  30. %define V_libintl_perl 1.11
  31. %define V_gettext 1.04
  32. %define V_locale_po 0.14
  33. %define V_locale_maketext 1.09
  34. %define V_locale_maketext_fuzzy 0.02
  35. %define V_locale_maketext_lexicon 0.49
  36. %define V_locale_maketext_simple 0.12
  37. %define V_locale_codes 2.07
  38. %define V_locale_subcountry 1.34
  39. %define V_locale_keyedtext 1.03
  40. # package information
  41. Name: perl-locale
  42. Summary: Perl Locale Modules
  43. URL: http://www.cpan.org/
  44. Vendor: Perl Community
  45. Packager: OpenPKG
  46. Distribution: OpenPKG
  47. Class: BASE
  48. Group: Language
  49. License: GPL/Artistic
  50. Version: %{V_perl}
  51. Release: 20050430
  52. # list of sources
  53. Source0: http://www.cpan.org/modules/by-module/I18N/I18N-LangTags-%{V_i18n_langtags}.tar.gz
  54. Source1: http://www.cpan.org/modules/by-module/Encode/Encode-%{V_encode}.tar.gz
  55. Source2: http://www.cpan.org/modules/by-module/Encode/Encode-Newlines-%{V_encode_newlines}.tar.gz
  56. Source3: http://www.cpan.org/modules/by-module/Encode/Encode-Registry-%{V_encode_registry}.tar.gz
  57. Source4: http://www.cpan.org/modules/by-module/Locale/libintl-perl-%{V_libintl_perl}.tar.gz
  58. Source5: http://www.cpan.org/modules/by-module/Locale/gettext-%{V_gettext}.tar.gz
  59. Source6: http://www.cpan.org/modules/by-module/Locale/Locale-PO-%{V_locale_po}.tar.gz
  60. Source7: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-%{V_locale_maketext}.tar.gz
  61. Source8: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Fuzzy-%{V_locale_maketext_fuzzy}.tar.gz
  62. Source9: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Lexicon-%{V_locale_maketext_lexicon}.tar.gz
  63. Source10: http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Simple-%{V_locale_maketext_simple}.tar.gz
  64. Source11: http://www.cpan.org/modules/by-module/Locale/Locale-Codes-%{V_locale_codes}.tar.gz
  65. Source12: http://www.cpan.org/modules/by-module/Locale/Locale-SubCountry-%{V_locale_subcountry}.tar.gz
  66. Source13: http://www.cpan.org/modules/by-module/Locale/Locale-KeyedText-%{V_locale_keyedtext}.tar.gz
  67. Patch0: perl-locale.patch
  68. # build information
  69. Prefix: %{l_prefix}
  70. BuildRoot: %{l_buildroot}
  71. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  72. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  73. BuildPreReq: gettext, libiconv
  74. PreReq: gettext, libiconv
  75. AutoReq: no
  76. AutoReqProv: no
  77. %description
  78. Various Perl modules for locale handling:
  79. - I18N::LangTags (%{V_i18n_langtags})
  80. - Encode (%{V_encode})
  81. - Encode::Newlines (%{V_encode_newlines})
  82. - Encode::Registry (%{V_encode_registry})
  83. - libintl-perl (%{V_libintl_perl})
  84. - Locale::gettext (%{V_gettext})
  85. - Locale::PO (%{V_locale_po})
  86. - Locale::Maketext (%{V_locale_maketext})
  87. - Locale::Maketext::Fuzzy (%{V_locale_maketext_fuzzy})
  88. - Locale::Maketext::Lexicon (%{V_locale_maketext_lexicon})
  89. - Locale::Maketext::Simple (%{V_locale_maketext_simple})
  90. - Locale::Codes (%{V_locale_codes})
  91. - Locale::SubCountry (%{V_locale_subcountry})
  92. - Locale::KeyedText (%{V_locale_keyedtext})
  93. %track
  94. prog perl-locale:I18N-LangTags = {
  95. version = %{V_i18n_langtags}
  96. url = http://www.cpan.org/modules/by-module/I18N/
  97. regex = I18N-LangTags-(__VER__)\.tar\.gz
  98. }
  99. prog perl-locale:Encode = {
  100. version = %{V_encode}
  101. url = http://www.cpan.org/modules/by-module/Encode/
  102. regex = Encode-(__VER__)\.tar\.gz
  103. }
  104. prog perl-locale:Encode-Newlines = {
  105. version = %{V_encode_newlines}
  106. url = http://www.cpan.org/modules/by-module/Encode/
  107. regex = Encode-Newlines-(__VER__)\.tar\.gz
  108. }
  109. prog perl-locale:Encode-Registry = {
  110. version = %{V_encode_registry}
  111. url = http://www.cpan.org/modules/by-module/Encode/
  112. regex = Encode-Registry-(__VER__)\.tar\.gz
  113. }
  114. prog perl-locale:libintl-perl = {
  115. version = %{V_libintl_perl}
  116. url = http://www.cpan.org/modules/by-module/Locale/
  117. regex = libintl-perl-(__VER__)\.tar\.gz
  118. }
  119. prog perl-locale:gettext = {
  120. version = %{V_gettext}
  121. url = http://www.cpan.org/modules/by-module/Locale/
  122. regex = gettext-(__VER__)\.tar\.gz
  123. }
  124. prog perl-locale:Locale-PO = {
  125. version = %{V_locale_po}
  126. url = http://www.cpan.org/modules/by-module/Locale/
  127. regex = Locale-PO-(__VER__)\.tar\.gz
  128. }
  129. prog perl-locale:Locale-Maketext = {
  130. version = %{V_locale_maketext}
  131. url = http://www.cpan.org/modules/by-module/Locale/
  132. regex = Locale-Maketext-(__VER__)\.tar\.gz
  133. }
  134. prog perl-locale:Locale-Maketext-Fuzzy = {
  135. version = %{V_locale_maketext_fuzzy}
  136. url = http://www.cpan.org/modules/by-module/Locale/
  137. regex = Locale-Maketext-Fuzzy-(__VER__)\.tar\.gz
  138. }
  139. prog perl-locale:Locale-Maketext-Lexicon = {
  140. version = %{V_locale_maketext_lexicon}
  141. url = http://www.cpan.org/modules/by-module/Locale/
  142. regex = Locale-Maketext-Lexicon-(__VER__)\.tar\.gz
  143. }
  144. prog perl-locale:Locale-Maketext-Simple = {
  145. version = %{V_locale_maketext_simple}
  146. url = http://www.cpan.org/modules/by-module/Locale/
  147. regex = Locale-Maketext-Simple-(__VER__)\.tar\.gz
  148. }
  149. prog perl-locale:Locale-Codes = {
  150. version = %{V_locale_codes}
  151. url = http://www.cpan.org/modules/by-module/Locale/
  152. regex = Locale-Codes-(__VER__)\.tar\.gz
  153. }
  154. prog perl-locale:Locale-SubCountry = {
  155. version = %{V_locale_subcountry}
  156. url = http://www.cpan.org/modules/by-module/Locale/
  157. regex = Locale-SubCountry-(__VER__)\.tar\.gz
  158. }
  159. prog perl-locale:Locale-KeyedText = {
  160. version = %{V_locale_keyedtext}
  161. url = http://www.cpan.org/modules/by-module/Locale/
  162. regex = Locale-KeyedText-(__VER__)\.tar\.gz
  163. }
  164. %prep
  165. %setup -q -c
  166. %setup -q -T -D -a 1
  167. %setup -q -T -D -a 2
  168. %setup -q -T -D -a 3
  169. %setup -q -T -D -a 4
  170. %setup -q -T -D -a 5
  171. %setup -q -T -D -a 6
  172. %setup -q -T -D -a 7
  173. %setup -q -T -D -a 8
  174. %setup -q -T -D -a 9
  175. %setup -q -T -D -a 10
  176. %setup -q -T -D -a 11
  177. %setup -q -T -D -a 12
  178. %setup -q -T -D -a 13
  179. %patch -p0
  180. %build
  181. %install
  182. rm -rf $RPM_BUILD_ROOT
  183. %{l_prefix}/bin/perl-openpkg prepare
  184. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  185. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  186. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  187. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  188. ( cd libintl-perl-%{V_libintl_perl}
  189. %{l_shtool} subst \
  190. -e 's;\($Config{ccflags}\);\1 . "%{l_cflags} %{l_cppflags}";' \
  191. -e 's;\($Config{libs}\);"%{l_ldflags}" . \1;' \
  192. Makefile.PL
  193. %{l_shtool} subst \
  194. -e 's;\(PL_FILES\);INC => "%{l_cppflags}", \1;' \
  195. -e 's;\(-lintl\);%{l_ldflags} \1;' \
  196. -e 's;\(-liconv\);%{l_ldflags} \1;' \
  197. gettext_xs/Makefile.PL
  198. %{l_prefix}/bin/perl-openpkg configure build install
  199. ) || exit $?
  200. ( cd gettext-%{V_gettext}
  201. %{l_shtool} subst \
  202. -e 's;\(incs = .\)\(.\);\1%{l_cppflags}\2;' \
  203. -e 's;\(libs = .\)\(.\);\1%{l_ldflags} -lintl -liconv\2;' \
  204. Makefile.PL
  205. %{l_prefix}/bin/perl-openpkg configure build install
  206. ) || exit $?
  207. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  208. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  209. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  210. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  211. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  212. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  213. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  214. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  215. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xgettext.pl
  216. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  217. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  218. %files -f files
  219. %clean
  220. rm -rf $RPM_BUILD_ROOT