fontconfig.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## fontconfig.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2016 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: fontconfig
  25. Summary: Font Access Configuration And Customizing
  26. URL: http://fontconfig.org/
  27. Vendor: Keith Packard
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: BASE
  31. Group: XWindow
  32. License: GPL
  33. Version: 2.12.1
  34. Release: 20160805
  35. # list of sources
  36. Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
  37. Patch0: fontconfig.patch
  38. # build information
  39. BuildPreReq: OpenPKG, openpkg >= 20160101, make, gcc, grep, pkgconfig
  40. PreReq: OpenPKG, openpkg >= 20160101
  41. BuildPreReq: libiconv, freetype, expat, libxml
  42. PreReq: libiconv, freetype, expat, libxml
  43. %description
  44. Fontconfig is a library for configuring and customizing font access.
  45. It contains two essential modules, the configuration module which
  46. builds an internal configuration from XML files and the matching
  47. module which accepts font patterns and returns the nearest matching
  48. font.
  49. %track
  50. prog fontconfig = {
  51. version = %{version}
  52. url = http://fontconfig.org/release/
  53. regex = fontconfig-(\d+\.\d+\.\d+)\.tar\.gz
  54. }
  55. %prep
  56. %setup -q
  57. %patch -p0
  58. %build
  59. ( echo 'ac_cv_prog_HASDOCBOOK=${ac_cv_prog_HASDOCBOOK=no}'
  60. ) >config.cache
  61. CC="%{l_cc}" \
  62. CFLAGS="%{l_cflags -O}" \
  63. CPPFLAGS="%{l_cppflags}" \
  64. LDFLAGS="%{l_ldflags}" \
  65. LIBS="-liconv" \
  66. GREP="grep" \
  67. ./configure \
  68. --cache-file=./config.cache \
  69. --prefix=%{l_prefix} \
  70. --mandir=%{l_prefix}/man \
  71. --with-expat=%{l_prefix} \
  72. --with-baseconfigdir=%{l_prefix}/etc/fontconfig \
  73. --with-cache-dir=%{l_prefix}/var/fontconfig \
  74. --disable-shared
  75. %{l_make} %{l_mflags -O}
  76. %install
  77. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  78. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc >/dev/null 2>&1 || true
  79. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  81. %{l_files_std} \
  82. '%config %{l_prefix}/etc/fontconfig/*.conf' \
  83. '%config %{l_prefix}/etc/fontconfig/conf.d/*.conf'
  84. %files -f files
  85. %clean
  86. %post
  87. # update fontconfig cache
  88. $RPM_INSTALL_PREFIX/bin/fc-cache -f 2>/dev/null || true
  89. exit 0