TrueType-ipafont-vl.spec 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. %define _fontdir %{_datadir}/fonts/TrueType-ipafont
  2. Name: TrueType-ipafont
  3. Version: 3.03
  4. Release: 4%{?_dist_release}
  5. Summary: IPA TrueType Fonts
  6. Summary(ja): IPA の日本語 TrueType フォント
  7. Group: User Interface/X
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: IPA Font License Agreement v1.0
  11. URL: https://ipafont.ipa.go.jp/
  12. Source: https://ipafont.ipa.go.jp/IPAfont/IPAfont00303.zip
  13. Source10: ipafont-mincho.ttfconf
  14. Source11: ipafont-gothic.ttfconf
  15. Source20: cidfmap.ja.ipafont-mincho
  16. Source21: cidfmap.ja.ipafont-gothic
  17. Source30: 59-ipa-mincho.conf
  18. Source31: 60-ipa-gothic.conf
  19. BuildArch: noarch
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. Obsoletes: TrueType-ipafont
  22. Requires: TrueType-ipafont-mincho = %{version}
  23. Requires: TrueType-ipafont-gothic = %{version}
  24. Requires: TrueType-ipafont-doc = %{version}
  25. %description
  26. This package is meta package to install both IPAMincho and IPAGothic
  27. fonts.
  28. %description -l ja
  29. このパッケージは独立行政法人情報処理推進機構のIPAフォントの明朝、ゴシック
  30. 両書体をインストールするためのメタパッケージです。このパッケージで
  31. 以下の4書体がインストールされます。
  32. (IPA明朝、IPAP明朝、IPAゴシック、IPAPゴシック)
  33. %package mincho
  34. Summary: IPAMincho TrueType Fonts
  35. Summary(ja): IPA明朝 True Type フォント
  36. Group: User Interface/X
  37. Requires: TrueType-ipafont-doc
  38. Requires: alternatives
  39. Requires(preun): alternatives
  40. %description mincho
  41. This package includes IPA Mincho TrueType fonts.
  42. %description -l ja mincho
  43. このパッケージには独立行政法人情報処理推進機構のIPA明朝フォントが含まれています。
  44. (IPA明朝、IPAP明朝)
  45. %package gothic
  46. Summary: IPA Gothic TrueType Fonts
  47. Summary(ja): IPA Gothic 日本語 True Type フォント
  48. Group: User Interface/X
  49. Requires: TrueType-ipafont-doc
  50. Requires: alternatives
  51. Requires(preun): alternatives
  52. %description gothic
  53. This package includes IPA Gothic TrueType fonts.
  54. This font is distributable without modification.
  55. (see /usr/share/doc/TrueType-ipafont/enduser_license.txt for details)
  56. %description -l ja gothic
  57. このパッケージには独立行政法人情報処理推進機構のIPAゴシックフォントが含まれて
  58. います。(IPAゴシック、IPAPゴシック)
  59. %package doc
  60. Summary: IPA Font Documents
  61. Summary(ja): IPA フォントドキュメント
  62. Group: User Interface/X
  63. %description doc
  64. This package includes important documents for IPA fonts includes enduser
  65. license.
  66. %description -l ja doc
  67. このパッケージには独立行政法人情報処理推進機構のIPAフォントのライセンス
  68. を含むドキュメント類が含まれています。
  69. %prep
  70. %setup -q -n IPAfont00303
  71. %build
  72. %install
  73. mkdir -p $RPM_BUILD_ROOT%{_fontdir}
  74. cp -a *.ttf $RPM_BUILD_ROOT%{_fontdir}
  75. cp -f %{SOURCE10} %{SOURCE11} $RPM_BUILD_ROOT%{_fontdir}
  76. mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/fonts/conf.{avail,d}
  77. install -m664 %{SOURCE30} %{SOURCE31} $RPM_BUILD_ROOT/%{_sysconfdir}/fonts/conf.avail/
  78. for i in $RPM_BUILD_ROOT/%{_sysconfdir}/fonts/conf.avail/*.conf
  79. do
  80. ln -sf ../conf.avail/$(basename $i) $RPM_BUILD_ROOT/%{_sysconfdir}/fonts/conf.d/
  81. done
  82. # install ghostscript8 cidfmap
  83. #mkdir -p $RPM_BUILD_ROOT%{_datadir}/ghostscript/conf.d
  84. #install -m644 %{SOURCE20} %{SOURCE21} $RPM_BUILD_ROOT%{_datadir}/ghostscript/conf.d
  85. # add fontpath.d symlinks
  86. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/fontpath.d
  87. ln -sf /usr/share/fonts/%{name} $RPM_BUILD_ROOT%{_sysconfdir}/X11/fontpath.d/
  88. %clean
  89. if test -n "${RPM_BUILD_ROOT}" && test "/" != "${RPM_BUILD_ROOT}"; then
  90. rm -rf ${RPM_BUILD_ROOT}
  91. fi
  92. %post mincho
  93. %__font_install_post %{_fontdir}
  94. %post gothic
  95. %__font_install_post %{_fontdir}
  96. %posttrans mincho
  97. update-alternatives --install \
  98. /usr/share/fonts/alias/TrueType/fonts-japanese-mincho.ttf \
  99. fonts-japanese-mincho.ttf \
  100. %{_fontdir}/ipam.ttf \
  101. 100
  102. if [ ! -f /usr/share/fonts/alias/TrueType/fonts-japanese-mincho.ttf ] ; then
  103. /sbin/update-alternatives --auto fonts-japanese-mincho.ttf
  104. fi
  105. %posttrans gothic
  106. update-alternatives --install \
  107. /usr/share/fonts/alias/TrueType/fonts-japanese-gothic.ttf \
  108. fonts-japanese-gothic.ttf \
  109. %{_fontdir}/ipag.ttf \
  110. 100
  111. if [ ! -f /usr/share/fonts/alias/TrueType/fonts-japanese-gothic.ttf ] ; then
  112. /sbin/update-alternatives --auto fonts-japanese-gothic.ttf
  113. fi
  114. %preun mincho
  115. if [ $1 -eq 0 ]; then
  116. update-alternatives --remove \
  117. fonts-japanese-mincho.ttf \
  118. %{_fontdir}/ipam.ttf
  119. /sbin/update-alternatives --auto fonts-japanese-mincho.ttf ||:
  120. fi
  121. %preun gothic
  122. if [ $1 -eq 0 ]; then
  123. update-alternatives --remove \
  124. fonts-japanese-gothic.ttf \
  125. %{_fontdir}/ipag.ttf
  126. /sbin/update-alternatives --auto fonts-japanese-gothic.ttf ||:
  127. fi
  128. %postun mincho
  129. %__font_install_postun %{_fontdir}
  130. %postun gothic
  131. %__font_install_postun %{_fontdir}
  132. %files
  133. %files doc
  134. %doc *.txt
  135. %files mincho
  136. %license IPA_Font_License_Agreement_v1.0.txt
  137. %{_fontdir}/ipam*.ttf
  138. %{_fontdir}/ipafont-mincho.ttfconf
  139. #%config %{_datadir}/ghostscript/conf.d/cidfmap.ja.ipafont-mincho
  140. %{_sysconfdir}/fonts/conf.avail/*-ipa-mincho.conf
  141. %{_sysconfdir}/X11/fontpath.d/%{name}
  142. %config(missingok,noreplace) %{_sysconfdir}/fonts/conf.d/*-ipa-mincho.conf
  143. %files gothic
  144. %license IPA_Font_License_Agreement_v1.0.txt
  145. %{_fontdir}/ipag*.ttf
  146. %{_fontdir}/ipafont-gothic.ttfconf
  147. #%config %{_datadir}/ghostscript/conf.d/cidfmap.ja.ipafont-gothic
  148. %{_sysconfdir}/fonts/conf.avail/*-ipa-gothic.conf
  149. %config(missingok,noreplace) %{_sysconfdir}/fonts/conf.d/*-ipa-gothic.conf
  150. %changelog
  151. * Sun May 03 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.03-4
  152. - made to use alternatives for new ghostscript structure.
  153. * Wed Jul 13 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 3.03-3
  154. - fix fontconfig files (Source30, 31) for fontconfig 2.10
  155. - sync Vine Linux Git repository
  156. * Mon Jan 13 2014 TANAKA hiroaki <mosaicist@jcom.home.ne.jp>
  157. - built with gcc-4.8
  158. * Sun Nov 20 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.03-1
  159. - update to IPAfont 00303
  160. * Fri Sep 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 3.02-1
  161. - update to IPAfont 00302
  162. - update ttfconf/cidfmap
  163. * Mon Aug 24 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.01-3
  164. - add fontpath.d symlink
  165. * Wed Jun 03 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.01-2
  166. - use fixed width font for ghostscript.
  167. * Wed Apr 22 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.01-1
  168. - update to IPAfont 00301
  169. - drop IPAUIGothic
  170. - update License tag
  171. - OSI approved license 'IPA Font License Agreement v1.0'
  172. - add fontconfig file
  173. * Thu Jan 08 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01-2
  174. - fix typo in cidfmap.ja.ipafont
  175. - update vine.map and exec updmap-sys on %%post/%%postun
  176. * Wed Oct 29 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01-1
  177. - add gs8 cidfmap
  178. - move font files to new location
  179. - new versioning policy, spec in utf-8
  180. * Fri Jan 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01-0vl2
  181. - remove Provides: TrueTypeFonts_jp
  182. - ipa*font is not free and should not be default font.
  183. * Mon Oct 01 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01-0vl1
  184. - initial build with new ipafont license
  185. - sprit mincho and gothic as an independent package
  186. - sprit readme and license to doc package
  187. - drop M+IPA font which is not allowed by new enduser license.