fontconfig-vl.spec 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define _unpackaged_files_terminate_build 1
  3. %define freetype_version 2.10.1
  4. Summary: Font configuration and customization library
  5. Summary(ja): フォント設定/カスタマイズライブラリ
  6. Name: fontconfig
  7. Version: 2.13.1
  8. Release: 1%{?_dist_release}
  9. Group: System Environment/Libraries
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: MIT
  13. URL: https://fontconfig.org/
  14. Source: https://fontconfig.org/release/fontconfig-%{version}.tar.bz2
  15. Source10: 70-prefer-ja-font.conf
  16. Source11: 59-morisawa-font-alias.conf
  17. Source100: ChangeLog.fedora
  18. # from fedora
  19. # https://bugzilla.redhat.com/show_bug.cgi?id=140335
  20. Patch0: fontconfig-2.8.0-sleep-less.patch
  21. # vine
  22. Patch4: fontconfig-2.3.2-subst-ja-font.patch
  23. Patch10: fontconfig-2.13.1-vine.patch
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  25. BuildRequires: gawk
  26. BuildRequires: expat-devel
  27. BuildRequires: freetype2-devel >= %{freetype_version}
  28. BuildRequires: perl
  29. #BuildRequires: itstool
  30. BuildRequires: libuuid-devel
  31. BuildRequires: gperf
  32. Requires(pre): freetype2 >= %{freetype_version}, coreutils
  33. Conflicts: XOrg-libs <= 6.9.0
  34. Obsoletes: XOrg-libs <= 6.9.0
  35. Conflicts: XOrg-font-utils <= 6.9.0
  36. Obsoletes: XOrg-font-utils <= 6.9.0
  37. %description
  38. Fontconfig is designed to locate fonts within the
  39. system and select them according to requirements specified by
  40. applications.
  41. %description -l ja
  42. Fontconfig は、システム内のフォントを把握し、アプリケーション
  43. が指定した要求に応じてそれらを選択するためのライブラリです。
  44. %package devel
  45. Summary: Development files for %{name}
  46. Summary(ja): Fontconfig の開発ファイル
  47. Group: Development/Libraries
  48. Requires: fontconfig = %{version}-%{release}
  49. Requires: freetype2-devel >= %{freetype_version}
  50. Requires: expat-devel
  51. Requires: pkgconfig
  52. Conflicts: XOrg-devel <= 6.9.0
  53. Obsoletes: XOrg-devel <= 6.9.0
  54. %description devel
  55. The fontconfig-devel package includes the header files,
  56. and developer docs for the fontconfig package.
  57. %description -l ja devel
  58. fontconfig-devel パッケージには fontconfig を使ったソフトウエア
  59. を開発するために必要なヘッダファイルやライブラリ、開発用ドキュメ
  60. ントが含まれています。
  61. # compat32
  62. %package -n compat32-%{name}
  63. Summary: Font configuration and customization library
  64. Summary(ja): フォント設定/カスタマイズライブラリ
  65. Group: System Environment/Libraries
  66. %description -n compat32-%{name}
  67. Fontconfig is designed to locate fonts within the
  68. system and select them according to requirements specified by
  69. applications.
  70. %description -l ja -n compat32-%{name}
  71. Fontconfig は、システム内のフォントを把握し、アプリケーション
  72. が指定した要求に応じてそれらを選択するためのライブラリです。
  73. %package -n compat32-%{name}-devel
  74. Summary: Font configuration and customization library
  75. Group: Development/Libraries
  76. Requires: compat32-%{name} = %{version}-%{release}
  77. Requires: %{name}-devel = %{version}-%{release}
  78. Requires: compat32-freetype2-devel >= %{freetype_version}
  79. Requires: compat32-expat-devel
  80. %description -n compat32-%{name}-devel
  81. The fontconfig-devel package includes the header files,
  82. and developer docs for the fontconfig package.
  83. %description -l ja -n compat32-%{name}-devel
  84. fontconfig-devel パッケージには fontconfig を使ったソフトウエア
  85. を開発するために必要なヘッダファイルやライブラリ、開発用ドキュメ
  86. ントが含まれています。
  87. %prep
  88. %setup -q
  89. %patch0 -p1 -b .sleep-less
  90. #patch4 -p1 -b .subst-ja-font
  91. %patch10 -p1 -b .vine
  92. %build
  93. # We don't want to rebuild the docs, but we want to install the included ones.
  94. export HASDOCBOOK=no
  95. %configure \
  96. --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts
  97. %__make %{?_smp_mflags}
  98. %install
  99. rm -rf $RPM_BUILD_ROOT
  100. %__make install DESTDIR=$RPM_BUILD_ROOT
  101. ln -s %{_datadir}/fontconfig/conf.avail/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
  102. install -m664 %{SOURCE10} %{SOURCE11} $RPM_BUILD_ROOT/%{_datadir}/fontconfig/conf.avail/
  103. for i in 70-prefer-ja-font.conf 59-morisawa-font-alias.conf
  104. do
  105. ln -sf %{_datadir}/fontconfig/conf.avail/$i $RPM_BUILD_ROOT/%{_sysconfdir}/fonts/conf.d/
  106. done
  107. # move installed doc files back to build directory to package themm
  108. # in the right place
  109. mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* .
  110. rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/
  111. # All font packages depend on this package, so we create
  112. # and own /usr/share/fonts
  113. mkdir -p $RPM_BUILD_ROOT%{_datadir}/fonts
  114. # Remove unpackaged files
  115. find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;
  116. find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
  117. # remove locales (zh only)
  118. rm -rf %{buildroot}%{_datadir}/locale
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT
  121. %post
  122. /sbin/ldconfig
  123. umask 0022
  124. # Remove stale caches
  125. rm -f %{_localstatedir}/cache/fontconfig/????????????????????????????????-*.cache-2
  126. HOME=/root /usr/bin/fc-cache -f -s >& /dev/null
  127. %postun -p /sbin/ldconfig
  128. %post -n compat32-%{name} -p /sbin/ldconfig
  129. %postun -n compat32-%{name} -p /sbin/ldconfig
  130. %files
  131. %defattr(-, root, root)
  132. %license COPYING
  133. %doc README AUTHORS
  134. %doc fontconfig-user.txt fontconfig-user.html
  135. %doc %{_sysconfdir}/fonts/conf.d/README
  136. %{_libdir}/libfontconfig.so.*
  137. %{_bindir}/fc-cache
  138. %{_bindir}/fc-conflist
  139. %{_bindir}/fc-list
  140. %{_bindir}/fc-match
  141. %{_bindir}/fc-cat
  142. %{_bindir}/fc-query
  143. %{_bindir}/fc-scan
  144. %{_bindir}/fc-pattern
  145. %{_bindir}/fc-validate
  146. %dir %{_datadir}/fonts
  147. %{_datadir}/%{name}
  148. %{_datadir}/xml/%{name}/fonts.dtd
  149. %config %{_sysconfdir}/fonts/fonts.conf
  150. %config(noreplace) %{_sysconfdir}/fonts/conf.d/*.conf
  151. %dir %{_localstatedir}/cache/fontconfig
  152. %{_mandir}/man1/*
  153. %{_mandir}/man5/*
  154. %files devel
  155. %defattr(-, root, root)
  156. %doc fontconfig-devel.txt fontconfig-devel
  157. %{_libdir}/libfontconfig.so
  158. %dir %{_datadir}/gettext
  159. %dir %{_datadir}/gettext/its
  160. %{_datadir}/gettext/its/*
  161. %{_libdir}/pkgconfig/*
  162. %{_includedir}/fontconfig
  163. %{_mandir}/man3/*
  164. # compat32
  165. %if %{build_compat32}
  166. %files -n compat32-%{name}
  167. %defattr(-, root, root)
  168. %{_libdir}/libfontconfig.so.*
  169. %files -n compat32-%{name}-devel
  170. %defattr(-, root, root)
  171. %{_libdir}/libfontconfig.so
  172. %endif
  173. %changelog
  174. * Fri Apr 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13.1-1
  175. - new upstream release.
  176. - disabled Patch4.
  177. - updated Patch10.
  178. - truncated %%changelog: old logs are ChangeLog.fedora.
  179. * Fri Jan 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.12.6-1
  180. - new upstream release.
  181. - added BR:gperf.
  182. * Fri Mar 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.11.1-1
  183. - new upstream release
  184. * Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.11.0-1
  185. - new upstream release
  186. - remove Patch1,2
  187. * Tue May 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.92-2
  188. - install/enable 70-prefer-ja-font.conf and 59-morisawa-font-alias.conf (again)
  189. - enable 25-unhint-nonlatin.conf (again)
  190. - add patch0-2 from fedora package
  191. - patch0: less sleep in fc-cache
  192. - patch1: fix font matching issue
  193. - patch2: fix web font issue in firefox
  194. * Wed Apr 17 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.10.92-1
  195. - new upstream release
  196. - remove Patch1 (fontconfig-2.2.1-AppleRoman-DynaFont.patch)
  197. * Fri Dec 24 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.8.0-3
  198. - rebuild with freetype2-2.4.8
  199. - add Requires: expat-devel (-devel package)
  200. * Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 2.8.0-2
  201. - build with rpm-4.8.1-1 for pkg-config file
  202. * Fri Jan 08 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.0-1
  203. - new upstream release
  204. - remove static libs
  205. * Sun Aug 16 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.1-3
  206. - update %%post
  207. * Thu Aug 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.1-2
  208. - add translated summary and description
  209. * Wed Aug 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.1-1
  210. - new upstream release
  211. * Mon Jul 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.0-2
  212. - add fc-query and fc-scan to %%files
  213. * Mon Jul 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.0-1
  214. - new upstream release
  215. - update 59-morisawa-font-alias.conf
  216. * Sun May 03 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.6.0-3
  217. - added compat32 package for x86_64 arch support
  218. * Tue Jan 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.0-2
  219. - update 59-morisawa-font-alias.conf
  220. - add FutoMin, FutoGo, Jun alias
  221. * Thu Jun 12 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.0-1
  222. - new upstream release
  223. - rename 10-prefer-ja-font.conf to 70-prefer-ja-font.conf
  224. * Thu May 29 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-3
  225. - add 10-prefer-ja-font.conf to prefer Japanese fonts.
  226. - add 59-morisawa-font-alias.conf
  227. - bind Ryumin to serif and GothicBBB to sans-serif
  228. * Mon May 12 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-2
  229. - add legacy font path for compatibility
  230. * Thu Apr 17 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-1
  231. - add Conflits/Obsoletes: XOrg-font-utils <= 6.9.0
  232. * Mon Dec 10 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-0vl1
  233. - initial build for Vine Linux
  234. - splitted from XOrg package.