pango.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## pango.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. # package version
  26. %define V_pango 1.8.1
  27. %define V_glib_major 2.6
  28. %define V_gtk_major 2.6
  29. # package information
  30. Name: pango
  31. Summary: The GTK Accessability Toolkit
  32. URL: http://www.pango.org/
  33. Vendor: The Gtk Project
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG
  36. Class: PLUS
  37. Group: XWindow
  38. License: GPL
  39. Version: %{V_pango}
  40. Release: 20050305
  41. # list of sources
  42. Source0: ftp://ftp.gtk.org/pub/gtk/v%{V_gtk_major}/pango-%{V_pango}.tar.bz2
  43. Patch0: pango.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, make, gcc
  48. PreReq: OpenPKG, openpkg >= 20040130, X11
  49. BuildPreReq: glib2 >= %{V_glib_major}, libiconv, freetype, fontconfig, xft
  50. PreReq: glib2 >= %{V_glib_major}, libiconv, freetype, fontconfig, xft
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Pango is a library for layout and rendering of text, with an
  55. emphasis on internationalization. Pango can be used anywhere that
  56. text layout is needed; however, most of the work on Pango was done
  57. using the Gtk+ widget toolkit as a test platform. Pango forms the
  58. core of text and font handling for Gtk+.
  59. %track
  60. prog pango = {
  61. version = %{version}
  62. url = ftp://ftp.gtk.org/pub/gtk/
  63. regex = (v2\.[2468])
  64. url = ftp://ftp.gtk.org/pub/gtk/__NEWVER__/
  65. regex = pango-(__VER__)\.tar\.(gz|bz2)
  66. }
  67. %prep
  68. %setup -q
  69. %patch -p0
  70. %{l_shtool} subst \
  71. -e 's;/pango-1\.0;/pango;g' \
  72. -e 's;lib\(p[a-zA-Z0-9]*\)-1.0;lib\1;g' \
  73. -e 's;lib\(p[a-zA-Z0-9]*\)-\$(PANGO_API_VERSION);lib\1;g' \
  74. -e 's;-@PANGO_API_VERSION@;;g' \
  75. -e '/moduledir =/s;/\$(PANGO_MODULE_VERSION);;g' \
  76. -e 's;\(pango_querymodules_LDFLAGS *=\);\1 -static;' \
  77. Makefile.in */Makefile.in */*/Makefile.in \
  78. pango\*.pc.in
  79. %build
  80. CC="%{l_cc}" \
  81. CFLAGS="%{l_cflags -O}" \
  82. CPPFLAGS="%{l_cppflags} -I`%{l_rc} --query x11_incdir`" \
  83. LDFLAGS="%{l_ldflags} -L`%{l_rc} --query x11_libdir`" \
  84. ./configure \
  85. --prefix=%{l_prefix} \
  86. --with-x \
  87. --x-includes=`%{l_rc} --query x11_incdir` \
  88. --x-libraries=`%{l_rc} --query x11_libdir` \
  89. --with-html-dir="%{l_prefix}/share" \
  90. --with-xml-catalog="%{l_prefix}/share/sgml/catalog.xml" \
  91. --disable-nls \
  92. --with-native-locale=no \
  93. --with-included-modules=yes \
  94. --enable-shm \
  95. --disable-debug \
  96. --disable-rebuilds \
  97. --enable-static
  98. %{l_make} %{l_mflags -O}
  99. %install
  100. rm -rf $RPM_BUILD_ROOT
  101. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  102. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  103. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
  104. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol]
  105. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol].*
  106. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/pango/modules/*.la
  107. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/pango/modules/*.a
  108. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc
  109. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/pango
  110. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  111. %{l_files_std} \
  112. '%config %{l_prefix}/etc/pango/pangox.aliases' \
  113. '%not %dir %{l_prefix}/lib/pkgconfig'
  114. %files -f files
  115. %clean
  116. rm -rf $RPM_BUILD_ROOT