gettext.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ##
  2. ## gettext.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. # package information
  25. Name: gettext
  26. Summary: GNU National Language Support (NLS) Toolkit
  27. URL: http://www.gnu.org/software/gettext/
  28. Vendor: Free Software Foundation
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: BASE
  32. Group: Charset
  33. License: GPL
  34. Version: 0.16.1
  35. Release: 20070720
  36. # list of sources
  37. Source0: ftp://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.gz
  38. Patch0: gettext.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, libiconv, gcc, make, automake
  43. PreReq: OpenPKG, openpkg >= 20040130, libiconv
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Gettext is the GNU toolkit for National Language Support (NLS).
  48. %track
  49. prog gettext = {
  50. version = %{version}
  51. url = ftp://ftp.gnu.org/gnu/gettext/
  52. regex = gettext-(__VER__)\.tar\.gz
  53. }
  54. %prep
  55. %setup -q
  56. %patch -p0
  57. # strip Automake version numbers from binaries
  58. %{l_shtool} subst \
  59. -e 's;-${am__api_version};;g' \
  60. `find . -name configure`
  61. # remove part that conflicts with libiconv
  62. %{l_shtool} subst \
  63. -e '/localcharset.\$lo/d' \
  64. gettext-runtime/intl/Makefile.in
  65. %{l_shtool} subst \
  66. -e 's;\(SUBDIRS.*=.*\)intl-java ;\1;' \
  67. -e 's;\(SUBDIRS.*=.*\)intl-csharp ;\1;' \
  68. gettext-runtime/Makefile.in
  69. %{l_shtool} subst \
  70. -e 's;^.*intl-java/Makefile.*$;;' \
  71. -e 's;^.*intl-csharp/Makefile.*$;;' \
  72. gettext-runtime/configure
  73. %{l_shtool} subst \
  74. -e 's;@BUILDJAVA@;no;g' \
  75. -e 's;@BUILDJAVAEXE@;no;g' \
  76. -e 's;@BUILDCSHARP@;no;g' \
  77. gettext-tools/src/Makefile.in
  78. %{l_shtool} subst \
  79. -e 's;^\(SUBDIRS =.*\)tests examples;\1;' \
  80. gettext-tools/Makefile.in
  81. %{l_shtool} subst \
  82. -e 's;\#if USEJEXE;#ifdef USEJEXE;' \
  83. gettext-tools/src/read-java.c \
  84. gettext-tools/src/urlget.c
  85. %build
  86. CC="%{l_cc}" \
  87. CFLAGS="%{l_cflags -O}" \
  88. CPPFLAGS="%{l_cppflags}" \
  89. LDFLAGS="%{l_ldflags}" \
  90. GREP="grep" \
  91. ./configure \
  92. --prefix=%{l_prefix} \
  93. --datarootdir=%{l_prefix}/share \
  94. --mandir=%{l_prefix}/man \
  95. --infodir=%{l_prefix}/info \
  96. --with-libiconv-prefix=%{l_prefix} \
  97. --with-included-gettext \
  98. --without-libexpat-prefix \
  99. --disable-libasprintf \
  100. --disable-csharp \
  101. --disable-java \
  102. --disable-shared
  103. %{l_make} %{l_mflags}
  104. %install
  105. rm -rf $RPM_BUILD_ROOT
  106. %{l_make} %{l_mflags} install \
  107. AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
  108. DESTDIR=$RPM_BUILD_ROOT
  109. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  110. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
  111. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gettext/projects
  112. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  113. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  114. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
  115. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgettext*.la
  116. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT