jvf-vl.spec 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. %define tlversion 2009
  2. %define texmf %{_datadir}/texmf
  3. %define build_texmf %{buildroot}%{texmf}
  4. %define vinepl vine.pls-1.2
  5. %define tfmdir %{texmf}/fonts/tfm/ptex
  6. %define exec_texhash [ -x %{_bindir}/texhash ] && /usr/bin/env - %{_bindir}/texhash 2> /dev/null
  7. #% define pltotf %{_bindir}/pltotf
  8. %define pltotf %{_bindir}/ppltotf
  9. Summary: Japanese Virtual Fonts
  10. Summary(ja): 日本語仮想フォントです.
  11. Name: jvf
  12. Version: 2.0
  13. Release: 5%{?_dist_release}
  14. License: distributable
  15. Group: Applications/Publishing
  16. Source0: %{vinepl}.tar.gz
  17. Source1: http://www.matsusaka-u.ac.jp/~okumura/jsclasses/jis-pl.zip
  18. Requires(post): sh-utils
  19. Requires: texlive = %{tlversion}
  20. BuildRequires: nkf
  21. BuildRequires: unzip
  22. BuildRequires: texlive = %{tlversion}
  23. ##!! %{_bindir}/pltotf %{tfmdir}/min5.tfm are provided by tetex
  24. ##BuildRequires: %{_bindir}/pltotf %{tfmdir}/min5.tfm
  25. ## /usr/bin/makejvf is provided from tetex, which is with ptexenc.
  26. ##BuildRequires: makejvf
  27. BuildArch: noarch
  28. Buildroot: %{_tmppath}/%{name}-%{version}-root
  29. Vendor: Project Vine
  30. Distribution: Vine Linux
  31. %description
  32. Japanese Virtual Fonts required by dvipsk built by makejvf.
  33. %description -l ja
  34. dvipsk の実行に必要な, 日本語仮想フォント(virtual fonts)、
  35. 多書体用フォントメトリックです。
  36. %prep
  37. [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
  38. %setup -q -n %{vinepl}
  39. %__unzip -oqq %{SOURCE1}
  40. %build
  41. ## Macro definition
  42. mkvf(){ # <$1: jfm name> <$2: jfm name of PS font>
  43. for size in 5 6 7 8 9 10 ; do
  44. %{_bindir}/makejvf %{tfmdir}/$1${size}.tfm $2 || exit 1
  45. done
  46. }
  47. ## now, build basic vf fonts
  48. mkvf min rml
  49. mkvf tmin rmlv
  50. mkvf goth gbm
  51. mkvf tgoth gbmv
  52. # jis font metric and vf fonts
  53. for pl in jis jisi tjis tjisi \
  54. min mini tmin tmini; do
  55. nkf --jis --overwrite $pl.pl
  56. %{pltotf} $pl.pl
  57. done
  58. %__ln_s -f jis.tfm jisg.tfm
  59. %__ln_s -f jisi.tfm jisgi.tfm
  60. %__ln_s -f tjis.tfm tjisg.tfm
  61. %__ln_s -f tjisi.tfm tjisgi.tfm
  62. %{_bindir}/makejvf jis.tfm rml
  63. %{_bindir}/makejvf tjis.tfm rmlv # 縦
  64. %{_bindir}/makejvf jisi.tfm rmli # italic
  65. %{_bindir}/makejvf tjisi.tfm rmlvi
  66. %{_bindir}/makejvf jisg.tfm gbm
  67. %{_bindir}/makejvf tjisg.tfm gbmv
  68. %{_bindir}/makejvf jisgi.tfm gbmi
  69. %{_bindir}/makejvf tjisgi.tfm gbmvi
  70. ## new JIS font metric
  71. # make *.tfm
  72. for pl in jis jisn jis-v jisn-v; do
  73. %{pltotf} $pl.pl
  74. done
  75. %__ln_s -f jis.tfm jisg.tfm
  76. %__ln_s -f jis-v.tfm jisg-v.tfm
  77. %__ln_s -f jisn.tfm jisgn.tfm
  78. %__ln_s -f jisn-v.tfm jisgn-v.tfm
  79. # make *.vf
  80. %{_bindir}/makejvf jis.tfm rml
  81. %{_bindir}/makejvf jisn.tfm rmln # 中点修正
  82. %{_bindir}/makejvf jis-v.tfm rmlv # 縦
  83. %{_bindir}/makejvf jisn-v.tfm rmlnv
  84. %{_bindir}/makejvf jisg.tfm gbm
  85. %{_bindir}/makejvf jisgn.tfm gbmn
  86. %{_bindir}/makejvf jisg-v.tfm gbmv
  87. %{_bindir}/makejvf jisgn-v.tfm gbmnv
  88. # extrafonts metric and vf fonts
  89. for i in goth gyo pop lei dfmin dfgt dfgyo dfpop dflei lxmin lxgt lxpop lxmgt lxgtb dfminb dfkaib dfpostb dffry dfbrrb ; do
  90. %__ln_s -f min.tfm ${i}.tfm
  91. %__ln_s -f mini.tfm ${i}i.tfm
  92. %__ln_s -f tmin.tfm t${i}.tfm
  93. %__ln_s -f tmini.tfm t${i}i.tfm
  94. done
  95. for i in min goth gyo pop lei dfmin dfgt dfgyo dfpop dflei lxmin lxgt lxpop lxmgt lxgtb dfminb dfkaib dfpostb dffry dfbrrb; do
  96. %{_bindir}/makejvf ${i}.tfm ${i}
  97. %{_bindir}/makejvf ${i}i.tfm ${i}i
  98. %{_bindir}/makejvf t${i}.tfm t${i}
  99. %{_bindir}/makejvf t${i}i.tfm t${i}i
  100. # %__ln_s -f ${i}.vf df${i}.vf
  101. # %__ln_s -f ${i}i.vf df${i}i.vf
  102. # %__ln_s -f t${i}.vf dft${i}.vf
  103. # %__ln_s -f t${i}i.vf dft${i}i.vf
  104. done
  105. # change same file to symbolic link
  106. for f in *.vf; do
  107. if [ ! -L $f ]; then
  108. for g in *.vf; do
  109. if [ ! -L $g -a $f != $g ]; then
  110. cmp $f $g > /dev/null && (%__rm -f $g; %__ln_s $f $g)
  111. fi
  112. done
  113. fi
  114. done
  115. %install
  116. %__rm -rf $RPM_BUILD_ROOT
  117. %__mkdir_p %{build_texmf}/fonts/{tfm,source,vf}/ptex
  118. %__cp -dfp *.tfm %{build_texmf}/fonts/tfm/ptex/
  119. %__cp -dfp *.pl %{build_texmf}/fonts/source/ptex/
  120. %__cp -dfp *.vf %{build_texmf}/fonts/vf/ptex/
  121. %clean
  122. %__rm -rf $RPM_BUILD_ROOT
  123. %post
  124. %{exec_texhash}
  125. exit 0
  126. %postun
  127. if [ "$1" = 0 ]; then
  128. %{exec_texhash}
  129. fi
  130. exit 0
  131. %files
  132. %defattr(-,root,root)
  133. %doc README
  134. %{texmf}/fonts/tfm/ptex/
  135. %{texmf}/fonts/source/ptex/
  136. %{texmf}/fonts/vf/ptex/
  137. %changelog
  138. * Sun May 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2.0-5
  139. - use texlive-2009 + ptexlive-20100322
  140. - dropped Requires: tetex, BuildRequires: tetex
  141. - addeded Requires: texlive, BuildRequires: texlive
  142. - use some rpm macros
  143. * Wed Oct 07 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2.0-4
  144. - added BuildRequires: unzip
  145. - dropped BuildRequires: %%{_prefix}/bin/pltotf %%{tfmdir}/min5.tfm
  146. - %%{_prefix}/bin/pltotf %%{tfmdir}/min5.tfm are provided by tetex
  147. * Sun Sep 27 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2.0-3
  148. - added BuildRequires: nkf
  149. - dropped BuildRequires: makejvf
  150. - /usr/bin/makejvf is provided from tetex, which is with ptexenc
  151. - converted euc-encode to jis-encode for *.pl in vine.pls-1.2
  152. * Sun Jan 11 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0-2
  153. - spec in utf8 (again)
  154. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 2.0-1vl5
  155. - applied new versioning policy, spec in utf-8
  156. * Fri Jan 14 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0-0vl1
  157. - add new dynafont for Vine Linux 3.1CR
  158. * Fri Apr 18 2003 Nobuyuki Tsuchimura <tutimura@nn.iij4u.or.jp> 1.1a-0vl3
  159. - change tetex-ptex -> tetex
  160. * Mon Mar 25 2002 Jun Nishii <jun@vinelinux.org> 1.1a-0vl2
  161. - added symlinks for lxricoh fonts
  162. * Sat Mar 24 2001 Nobuyuki Tsuchimura <tutimura@nn.iij4u.or.jp>
  163. - 1.1a-0vl1
  164. - use symbolic link for same *.vf
  165. * Sat Jan 20 2001 Jun Nishii <jun@vinelinux.org>
  166. - 1.0-6
  167. - cp jis.pl min.pl and fix glue for "「,(,..." in min.pl to use DynaFonts
  168. Should I rename min.* as dyna.*?
  169. * Fri Jan 21 2000 Jun Nishii <jun@vinelinux.org>
  170. - 1.0-5
  171. - make vfs for dynafonts
  172. - tjis, tjisi, tmin, tmini,...
  173. - correct installation of tfm
  174. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  175. - install makejvf
  176. * Fri Oct 29 1999 Norihito Ohmori <ohmori@flatout.org>
  177. - change group
  178. - add defattr(-,root.root)
  179. * Thu Jul 13 1999 Jun Nishii <jun@flatout.org>
  180. - include jis fonts
  181. * Mon Feb 8 1999 Jun Nishii <jun@flatout.org>
  182. - build vfs by makejvf
  183. - obsoletes vfkanji