jvf-vl.spec 6.3 KB

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