OpenType-mikachan-vl.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. %define _fontdir %{_datadir}/fonts/%{name}
  2. Summary: Free Japanese Handwriting OpenType Font (mikachan_o)
  3. Summary(ja): フリーの手書き風日本語 OpenType フォント (みかちゃん_o)
  4. Name: OpenType-mikachan
  5. Version: 9.1
  6. Release: 3%{?_dist_release}
  7. URL: http://mikachan-font.com/
  8. License: distributable
  9. Group: User Interface/X
  10. BuildArch: noarch
  11. Buildroot: %{_tmppath}/%{name}-%{version}-root
  12. BuildRequires: lha
  13. Requires(post): xorg-x11-font-utils
  14. Requires(postun): xorg-x11-font-utils
  15. ## Ver9.1 2005.02.12
  16. ## see chksrc() in %%prep
  17. Source0: http://mikachan.sourceforge.jp/mikachan_o.lzh
  18. Source1: http://mikachan.sourceforge.jp/mikachanP_o.lzh
  19. Source2: http://mikachan.sourceforge.jp/mikachanPB_o.lzh
  20. Source3: http://mikachan.sourceforge.jp/mikachanPS_o.lzh
  21. ## vine
  22. Source10: README.vine
  23. Distribution: Vine Linux
  24. Vendor: Project Vine
  25. %description
  26. Free Japanese Handwriting OpenType Font (mikachan_o)
  27. mikachan_o : fixed-width fonts
  28. mikachan_o-P : proportional fonts (regular)
  29. mikachan_o-PB : proportional fonts (bold style)
  30. mikachan_o-PS : proportional fonts with somewhat smaller hiragana,
  31. katakana, alphabets, and numbers
  32. It is possible to display following characters.
  33. - Hiragana
  34. - Katakana
  35. - Numbers
  36. - Alphabets
  37. - Symbols
  38. - Kanji (for education, usual, person's name, JIS Level 1/2, IBM extended)
  39. # '
  40. %description -l ja
  41. フリーの手書き風日本語 OpenType フォント (みかちゃん_o) です。
  42. mikachan_o : 等幅フォント
  43. mikachan_o-P : プロポーショナルフォント
  44. mikachan_o-PB : 太字のプロポーショナルフォント
  45. mikachan_o-PS : ひらがな・カタカナ・数字・英字が少し小さめのプロポーショ
  46. ナルフォント
  47. 次の文字を表示することができます。
  48. - ひらがな
  49. - カタカナ
  50. - 数字
  51. - 英字
  52. - 記号
  53. - 漢字 (教育/常用/人名/JIS第1水準/JIS第2水準/IBM拡張)
  54. %prep
  55. ## check sha1sum of sources
  56. ## For any mikachan*.lzh archives,
  57. ## its filename has no versioning informations.
  58. chksrc(){
  59. cd %_sourcedir
  60. #ad1b8d96e20f398661a18e4ba7704881705e1e21 mikachanPB_o.lzh
  61. sha1sum -c --quiet - <<EOT
  62. ad1b8d96e20f398661a18e4ba7704881705e1e21 mikachanPB_o.lzh
  63. cca9a25cbff69fbdd1f03c7c07dae17f9bc183f0 mikachanPS_o.lzh
  64. da5f64708e108fe97f989587abe7153a488651d0 mikachanP_o.lzh
  65. 3896763b947fd4f5510fb3348435efce15879db6 mikachan_o.lzh
  66. EOT
  67. [ $? -eq 1 ] && return 1
  68. cd -
  69. return 0
  70. }
  71. chksrc || exit 1
  72. %setup -n %{name}-%{version} -c -T
  73. if `%{_bindir}/lha l --archive-kanji-code=sjis %{SOURCE0} > /dev/null 2>&1`
  74. then
  75. srccode=euc-jp
  76. else
  77. srccode=cp932
  78. fi
  79. %{_bindir}/lha xq %{SOURCE0}
  80. %{_bindir}/lha xq %{SOURCE1}
  81. %{_bindir}/lha xq %{SOURCE2}
  82. %{_bindir}/lha xq %{SOURCE3}
  83. # FIXME: convert file name (cp932 -> utf-8)
  84. for i in *.otf ; do
  85. %__mv $i `echo $i \
  86. | %{_bindir}/iconv -f $srccode -t utf-8 \
  87. | %__sed -e 's/みかちゃん/mikachan/'`
  88. done
  89. ## copy README.vine
  90. %__cp %{SOURCE10} .
  91. %build
  92. %install
  93. %__rm -rf %{buildroot}
  94. %__mkdir -p %{buildroot}%{_fontdir}
  95. %__install -m644 -p *.otf %{buildroot}%{_fontdir}
  96. %post
  97. %__font_install_post %{_fontdir}
  98. %postun
  99. %__font_install_postun %{_fontdir}
  100. %clean
  101. %__rm -rf %{buildroot}
  102. %files
  103. %defattr(-,root,root)
  104. %doc README.vine
  105. %{_fontdir}/*
  106. %changelog
  107. * Wed Jun 2 2011 Munehiro Yamamoto <munepi@vinelinux.org> 9.1-3
  108. - added README.vine
  109. - drooped Provides: mikachanfont
  110. - checked sha1sum of sources
  111. - defined chksrc() in %%prep
  112. - use %%__font_install_post, %%__font_install_postun
  113. * Sat Jun 20 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 9.1-2vl5
  114. - changed font path
  115. * Sun Oct 05 2008 Shu KONNO <owa@bg.wakwak.com> 9.1-1vl5
  116. - applied new versioning policy, spec in utf-8
  117. - updated scripts to convert file name's encode
  118. - changed font path
  119. * Fri Oct 20 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 9.1-0vl2
  120. - fix install script to support autoconfiscated lha
  121. * Sat May 07 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 9.1-0vl1
  122. - upstream release
  123. - fix scripts
  124. * Sun Feb 15 2004 KAZUKI SHIMURA <rito@pos.to> 9.0-0vl1
  125. - initial release