jvf-vl.spec 7.5 KB

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