texlive-jvf-vl.spec 6.4 KB

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