fontconfig.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ##
  2. ## fontconfig.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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 information
  26. Name: fontconfig
  27. Summary: A library for configuring and customizing font access
  28. URL: http://fontconfig.org/
  29. Vendor: Keith Packard
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: X11
  33. License: GPL
  34. Version: 2.2.1
  35. Release: 20030610
  36. # list of sources
  37. Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20030103, X11, freetype, expat
  42. PreReq: OpenPKG, openpkg >= 20030103, X11, freetype, expat
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Fontconfig is a library for configuring and customizing font access.
  47. It contains two essential modules, the configuration module which
  48. builds an internal configuration from XML files and the matching
  49. module which accepts font patterns and returns the nearest matching
  50. font.
  51. %prep
  52. %setup -q
  53. %build
  54. x11inc=`%{l_prefix}/etc/rc --query x11_incdir`
  55. x11lib=`%{l_prefix}/etc/rc --query x11_libdir`
  56. # make configure look only in our path
  57. %{l_shtool} subst \
  58. -e "s;/usr/X11R6/lib/X11;$x11lib/X11;"g \
  59. -e 's;/usr/X11/lib/X11;;g' \
  60. -e 's;/usr/lib/X11;;g' \
  61. configure
  62. # add freetype and expat dependencies
  63. %{l_shtool} subst \
  64. -e '/^Libs:/s;$; -lfreetype -lexpat;' \
  65. fontconfig.pc.in
  66. CC="%{l_cc}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. CPPFLAGS="%{l_cppflags}" \
  69. LDFLAGS="%{l_ldflags}" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --with-x \
  73. --x-includes=$x11inc \
  74. --x-libraries=$x11lib \
  75. --with-glib-prefix=%{l_prefix} \
  76. --with-freetype-config=%{l_prefix}/bin/freetype-config \
  77. --with-expat=%{l_prefix} \
  78. --with-confdir=%{l_prefix}/etc/fontconfig \
  79. --with-docdir=%{l_prefix}/share/fontconfig \
  80. --with-default-fonts=$x11lib/X11/fonts/TTF \
  81. --disable-nls \
  82. --disable-shared
  83. %{l_make} %{l_mflags -O}
  84. %install
  85. rm -rf $RPM_BUILD_ROOT
  86. %{l_shtool} mkdir -f -p -m 755 \
  87. $RPM_BUILD_ROOT%{l_prefix}/etc/fontconfig \
  88. $RPM_BUILD_ROOT%{l_prefix}/share/fontconfig
  89. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  90. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  91. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT