OpenType-kozuka-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. %define gsversion %(ghostscript --version)
  2. %define xfontdir %{_datadir}/fonts/%{name}
  3. ## for 7.07
  4. #% define gsfontdir %{_datadir}/ghostscript/Resource/CIDFont
  5. ## for 8.xx
  6. %define gsfontdir %{_datadir}/ghostscript/%{gsversion}/Resource/CIDFont
  7. %define gsfontspecdir %{_datadir}/ghostscript/%{gsversion}/Resource/Font
  8. %define texfontdir %{_datadir}/texmf/fonts/opentype/adobe/kozuka
  9. ## use some macros for %post, %posttrans
  10. %define touch_run(%1) %{expand:( %__mkdir_p /var/run/texlive; touch /var/run/texlive/run-%1; )
  11. }
  12. %define exec_upddeffont [ -x %{_sbindir}/update-defaultfont ] && \\\
  13. %{_sbindir}/update-defaultfont 2> /dev/null
  14. %define exec_texhash [ -e /var/run/texlive/run-texhash ] && ( \\\
  15. [ -x %{_bindir}/texhash ] && \\\
  16. echo -n " "; echo -n "Running texhash... "; \\\
  17. %{_bindir}/texhash 2> /dev/null; \\\
  18. echo "done." ) && %__rm -f /var/run/texlive/run-texhash;
  19. %define exec_mtxrun [ -e /var/run/texlive/run-mtxrun ] && ( \\\
  20. [ -x %{_bindir}/mtxrun ] && \\\
  21. echo -n " "; echo -n "Running mtxrun... "; \\\
  22. export TEXMF=%{texmf}-dist TEXMFCNF=%{texmf}/web2c TEXMFCACHE=%{texmfsysvar}; \\\
  23. %{_bindir}/mtxrun --generate &> /dev/null; \\\
  24. echo "done." ) && %__rm -f /var/run/texlive/run-mtxrun;
  25. %define exec_fmtutil [ -e /var/run/texlive/run-fmtutil ] && ( \\\
  26. [ -x %{_bindir}/fmtutil-sys ] && \\\
  27. echo -n " "; echo -n "Running fmtutil-sys... "; \\\
  28. %{_bindir}/fmtutil-sys --all &> /dev/null; \\\
  29. echo "done." ) && %__rm -f /var/run/texlive/run-fmtutil;
  30. %define exec_updmap [ -e /var/run/texlive/run-updmap ] && ( \\\
  31. [ -x %{_bindir}/updmap-sys ] && \\\
  32. echo -n " "; echo -n "Running updmap-sys... "; \\\
  33. %{_bindir}/updmap-sys --nohash --quiet &> /dev/null; \\\
  34. echo "done." ) && %__rm -f /var/run/texlive/run-updmap;
  35. %define FontList \\\
  36. KozGoPr6N-Bold,Japan \\\
  37. KozGoPr6N-ExtraLight,Japan \\\
  38. KozGoPr6N-Heavy,Japan \\\
  39. KozGoPr6N-Light,Japan \\\
  40. KozGoPr6N-Medium,Japan \\\
  41. KozGoPr6N-Regular,Japan \\\
  42. KozGoPro-Bold,Japan \\\
  43. KozGoPro-ExtraLight,Japan \\\
  44. KozGoPro-Heavy,Japan \\\
  45. KozGoPro-Light,Japan \\\
  46. KozGoPro-Medium,Japan \\\
  47. KozGoPro-Regular,Japan \\\
  48. KozGoStd-Bold,Japan \\\
  49. KozGoStd-ExtraLight,Japan \\\
  50. KozGoStd-Heavy,Japan \\\
  51. KozGoStd-Light,Japan \\\
  52. KozGoStd-Medium,Japan \\\
  53. KozGoStd-Regular,Japan \\\
  54. KozMinPr6N-Bold,Japan \\\
  55. KozMinPr6N-ExtraLight,Japan \\\
  56. KozMinPr6N-Heavy,Japan \\\
  57. KozMinPr6N-Light,Japan \\\
  58. KozMinPr6N-Medium,Japan \\\
  59. KozMinPr6N-Regular,Japan \\\
  60. KozMinPro-Bold,Japan \\\
  61. KozMinPro-ExtraLight,Japan \\\
  62. KozMinPro-Heavy,Japan \\\
  63. KozMinPro-Light,Japan \\\
  64. KozMinPro-Medium,Japan \\\
  65. KozMinPro-Regular,Japan \\\
  66. KozMinStd-Bold,Japan \\\
  67. KozMinStd-ExtraLight,Japan \\\
  68. KozMinStd-Heavy,Japan \\\
  69. KozMinStd-Light,Japan \\\
  70. KozMinStd-Medium,Japan \\\
  71. KozMinStd-Regular,Japan
  72. %define EncodeList_Japan \\\
  73. 78-EUC-H \\\
  74. 78-EUC-V \\\
  75. 78-H \\\
  76. 78-RKSJ-H \\\
  77. 78-RKSJ-V \\\
  78. 78-V \\\
  79. 78ms-RKSJ-H \\\
  80. 78ms-RKSJ-V \\\
  81. 83pv-RKSJ-H \\\
  82. 90ms-RKSJ-H \\\
  83. 90ms-RKSJ-V \\\
  84. 90msp-RKSJ-H \\\
  85. 90msp-RKSJ-V \\\
  86. 90pv-RKSJ-H \\\
  87. 90pv-RKSJ-V \\\
  88. Add-H \\\
  89. Add-RKSJ-H \\\
  90. Add-RKSJ-V \\\
  91. Add-V \\\
  92. Adobe-Japan1-0 \\\
  93. Adobe-Japan1-1 \\\
  94. Adobe-Japan1-2 \\\
  95. Adobe-Japan1-3 \\\
  96. Adobe-Japan1-4 \\\
  97. Adobe-Japan1-5 \\\
  98. Adobe-Japan1-6 \\\
  99. EUC-H \\\
  100. EUC-V \\\
  101. Ext-H \\\
  102. Ext-RKSJ-H \\\
  103. Ext-RKSJ-V \\\
  104. Ext-V \\\
  105. H \\\
  106. Hankaku \\\
  107. Hiragana \\\
  108. Identity-H \\\
  109. Identity-V \\\
  110. Katakana \\\
  111. NWP-H \\\
  112. NWP-V \\\
  113. RKSJ-H \\\
  114. RKSJ-V \\\
  115. Roman \\\
  116. UniJIS-UCS2-H \\\
  117. UniJIS-UCS2-HW-H \\\
  118. UniJIS-UCS2-HW-V \\\
  119. UniJIS-UCS2-V \\\
  120. UniJIS-UTF16-H \\\
  121. UniJIS-UTF16-V \\\
  122. UniJIS-UTF32-H \\\
  123. UniJIS-UTF32-V \\\
  124. UniJIS-UTF8-H \\\
  125. UniJIS-UTF8-V \\\
  126. UniJIS2004-UTF16-H \\\
  127. UniJIS2004-UTF16-V \\\
  128. UniJIS2004-UTF32-H \\\
  129. UniJIS2004-UTF32-V \\\
  130. UniJIS2004-UTF8-H \\\
  131. UniJIS2004-UTF8-V \\\
  132. UniJISPro-UCS2-HW-V \\\
  133. UniJISPro-UCS2-V \\\
  134. UniJISPro-UTF8-V \\\
  135. UniJISX0213-UTF32-H \\\
  136. UniJISX0213-UTF32-V \\\
  137. UniJISX02132004-UTF32-H \\\
  138. UniJISX02132004-UTF32-V \\\
  139. V \\\
  140. WP-Symbol
  141. %define EncodeList_GB \\\
  142. Adobe-GB1-0 \\\
  143. Adobe-GB1-1 \\\
  144. Adobe-GB1-2 \\\
  145. Adobe-GB1-3 \\\
  146. Adobe-GB1-4 \\\
  147. Adobe-GB1-5 \\\
  148. GB-EUC-H \\\
  149. GB-EUC-V \\\
  150. GB-H \\\
  151. GB-RKSJ-H \\\
  152. GB-V \\\
  153. GBK-EUC-H \\\
  154. GBK-EUC-V \\\
  155. GBK2K-H \\\
  156. GBK2K-V \\\
  157. GBKp-EUC-H \\\
  158. GBKp-EUC-V \\\
  159. GBT-EUC-H \\\
  160. GBT-EUC-V \\\
  161. GBT-H \\\
  162. GBT-RKSJ-H \\\
  163. GBT-V \\\
  164. GBTpc-EUC-H \\\
  165. GBTpc-EUC-V \\\
  166. GBpc-EUC-H \\\
  167. GBpc-EUC-V \\\
  168. Identity-H \\\
  169. Identity-V \\\
  170. UniGB-UCS2-H \\\
  171. UniGB-UCS2-V \\\
  172. UniGB-UTF16-H \\\
  173. UniGB-UTF16-V \\\
  174. UniGB-UTF32-H \\\
  175. UniGB-UTF32-V \\\
  176. UniGB-UTF8-H \\\
  177. UniGB-UTF8-V
  178. %define EncodeList_CNS \\\
  179. Adobe-CNS1-0 \\\
  180. Adobe-CNS1-1 \\\
  181. Adobe-CNS1-2 \\\
  182. Adobe-CNS1-3 \\\
  183. Adobe-CNS1-4 \\\
  184. Adobe-CNS1-5 \\\
  185. Adobe-CNS1-6 \\\
  186. B5-H \\\
  187. B5-V \\\
  188. B5pc-H \\\
  189. B5pc-V \\\
  190. CNS-EUC-H \\\
  191. CNS-EUC-V \\\
  192. CNS1-H \\\
  193. CNS1-V \\\
  194. CNS2-H \\\
  195. CNS2-V \\\
  196. ETHK-B5-H \\\
  197. ETHK-B5-V \\\
  198. ETen-B5-H \\\
  199. ETen-B5-V \\\
  200. ETenms-B5-H \\\
  201. ETenms-B5-V \\\
  202. HKdla-B5-H \\\
  203. HKdla-B5-V \\\
  204. HKdlb-B5-H \\\
  205. HKdlb-B5-V \\\
  206. HKgccs-B5-H \\\
  207. HKgccs-B5-V \\\
  208. HKm314-B5-H \\\
  209. HKm314-B5-V \\\
  210. HKm471-B5-H \\\
  211. HKm471-B5-V \\\
  212. HKscs-B5-H \\\
  213. HKscs-B5-V \\\
  214. Identity-H \\\
  215. Identity-V \\\
  216. UniCNS-UCS2-H \\\
  217. UniCNS-UCS2-V \\\
  218. UniCNS-UTF16-H \\\
  219. UniCNS-UTF16-V \\\
  220. UniCNS-UTF32-H \\\
  221. UniCNS-UTF32-V \\\
  222. UniCNS-UTF8-H \\\
  223. UniCNS-UTF8-V
  224. %define EncodeList_Korea \\\
  225. Adobe-Korea1-0 \\\
  226. Adobe-Korea1-1 \\\
  227. Adobe-Korea1-2 \\\
  228. Identity-H \\\
  229. Identity-V \\\
  230. KSC-EUC-H \\\
  231. KSC-EUC-V \\\
  232. KSC-H \\\
  233. KSC-Johab-H \\\
  234. KSC-Johab-V \\\
  235. KSC-RKSJ-H \\\
  236. KSC-V \\\
  237. KSCms-UHC-H \\\
  238. KSCms-UHC-HW-H \\\
  239. KSCms-UHC-HW-V \\\
  240. KSCms-UHC-V \\\
  241. KSCpc-EUC-H \\\
  242. KSCpc-EUC-V \\\
  243. UniKS-UCS2-H \\\
  244. UniKS-UCS2-V \\\
  245. UniKS-UTF16-H \\\
  246. UniKS-UTF16-V \\\
  247. UniKS-UTF32-H \\\
  248. UniKS-UTF32-V \\\
  249. UniKS-UTF8-H \\\
  250. UniKS-UTF8-V
  251. Summary: Kozuka Japanese/English OpenType Font
  252. Summary(ja): 小塚 OpenType フォント
  253. Name: OpenType-kozuka
  254. Version: 1.0
  255. Release: 5%{?_dist_release}
  256. BuildArch: noarch
  257. Source0: DUMMY
  258. # Source0: KozGoPr6N-Bold.otf
  259. # Source1: KozGoPr6N-ExtraLight.otf
  260. # Source2: KozGoPr6N-Heavy.otf
  261. # Source3: KozGoPr6N-Light.otf
  262. # Source4: KozGoPr6N-Medium.otf
  263. # Source5: KozGoPr6N-Regular.otf
  264. # Source6: KozGoPro-Bold.otf
  265. # Source7: KozGoPro-ExtraLight.otf
  266. # Source8: KozGoPro-Heavy.otf
  267. # Source9: KozGoPro-Light.otf
  268. # Source10: KozGoPro-Medium.otf
  269. # Source11: KozGoPro-Regular.otf
  270. # Source12: KozGoStd-Bold.otf
  271. # Source13: KozGoStd-ExtraLight.otf
  272. # Source14: KozGoStd-Heavy.otf
  273. # Source15: KozGoStd-Light.otf
  274. # Source16: KozGoStd-Medium.otf
  275. # Source17: KozGoStd-Regular.otf
  276. # Source18: KozMinPr6N-Bold.otf
  277. # Source19: KozMinPr6N-ExtraLight.otf
  278. # Source20: KozMinPr6N-Heavy.otf
  279. # Source21: KozMinPr6N-Light.otf
  280. # Source22: KozMinPr6N-Medium.otf
  281. # Source23: KozMinPr6N-Regular.otf
  282. # Source24: KozMinPro-Bold.otf
  283. # Source25: KozMinPro-ExtraLight.otf
  284. # Source26: KozMinPro-Heavy.otf
  285. # Source27: KozMinPro-Light.otf
  286. # Source28: KozMinPro-Medium.otf
  287. # Source29: KozMinPro-Regular.otf
  288. # Source30: KozMinStd-Bold.otf
  289. # Source31: KozMinStd-ExtraLight.otf
  290. # Source32: KozMinStd-Heavy.otf
  291. # Source33: KozMinStd-Light.otf
  292. # Source34: KozMinStd-Medium.otf
  293. # Source35: KozMinStd-Regular.otf
  294. %if %{?nosrc:1} %{!?nosrc:0}
  295. NoSource: 0
  296. # NoSource: 1
  297. # NoSource: 2
  298. # NoSource: 3
  299. # NoSource: 4
  300. # NoSource: 5
  301. # NoSource: 6
  302. # NoSource: 7
  303. # NoSource: 8
  304. # NoSource: 9
  305. # NoSource: 10
  306. # NoSource: 11
  307. # NoSource: 12
  308. # NoSource: 13
  309. # NoSource: 14
  310. # NoSource: 15
  311. # NoSource: 16
  312. # NoSource: 17
  313. # NoSource: 18
  314. # NoSource: 19
  315. # NoSource: 20
  316. # NoSource: 21
  317. # NoSource: 22
  318. # NoSource: 23
  319. # NoSource: 24
  320. # NoSource: 25
  321. # NoSource: 26
  322. # NoSource: 27
  323. # NoSource: 28
  324. # NoSource: 29
  325. # NoSource: 30
  326. # NoSource: 31
  327. # NoSource: 32
  328. # NoSource: 33
  329. # NoSource: 34
  330. # NoSource: 35
  331. %endif
  332. License: Adobe Systems Incorporated.
  333. URL: http://www.adobe.co.jp
  334. Group: User Interface/X
  335. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
  336. Obsoletes: OTF-Kozuka < 1.0-3
  337. Requires(post): fontconfig ghostscript
  338. Requires(postun): fontconfig ghostscript
  339. Distribution: Vine Linux
  340. Vendor: Project Vine
  341. %description
  342. Kozuka Japanese OpenType Font
  343. If you want to use Kozuka OpneType Font on X and teTeX
  344. (xdvi, dvips, dvipdfmx), Ghostscript,
  345. you build and install this package.
  346. To build this package, you copy Kozuka Fonts from package
  347. which you bought to ~/rpm/SOURCES
  348. Then you type
  349. $ rpm -bb ~/rpm/SPEC/%{name}-vl.spec
  350. $ sudo apt-get install ~/rpm/RPMS/noarch/%{name}-%{version}-%{release}.noarch.rpm
  351. %description -l ja
  352. Adobe の日本語 OpenType フォント
  353. 購入したパッケージの小塚ファミリー日本語 OpenType フォントを
  354. X や TeX Live ((p)xdvi, (p)dvips, dvipdfmx)、Ghostscript で使用したい場合は
  355. このパッケージを構築してインストールして下さい。
  356. このパッケージを構築するには購入したパッケージからフォントを
  357. ~/rpm/SOURCES にコピーします。
  358. 次に、
  359. $ rpm -bb ~/rpm/SPEC/%{name}-vl.spec
  360. $ sudo apt-get install ~/rpm/RPMS/noarch/%{name}-%{version}-%{release}.noarch.rpm
  361. とタイプして下さい。
  362. %prep
  363. %build
  364. %install
  365. %__rm -rf %{buildroot}
  366. %__mkdir -p %{buildroot}%{xfontdir}
  367. %__mkdir -p %{buildroot}%{gsfontdir}
  368. %__mkdir -p %{buildroot}%{gsfontspecdir}
  369. %__mkdir -p %{buildroot}%{texfontdir}
  370. %__install -p -m 644 \
  371. %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26} %{SOURCE27} %{SOURCE28} %{SOURCE29} %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} %{SOURCE34} %{SOURCE35} \
  372. %{buildroot}%{xfontdir}
  373. ## mkgsfontspec [fontname] [encode] > [fontspec]
  374. mkgsfontspec(){
  375. local fontname=$1
  376. local encode=$2
  377. cat <<EOT
  378. %%!PS-Adobe-3.0 Resource-Font
  379. %%%%DocumentNeededResources: ${encode} (CMap)
  380. %%%%IncludeResource: ${encode} (CMap)
  381. %%%%BeginResource: Font (${fontname}-${encode})
  382. (${fontname}-${encode})
  383. (${encode}) /CMap findresource
  384. [(${fontname}) /CIDFont findresource]
  385. composefont
  386. pop
  387. %%%%EndResource
  388. %%%%EOF
  389. EOT
  390. }
  391. for i in %{FontList}; do
  392. fnt=$(echo $i | %__sed -e "s/,.*$//")
  393. enc=$(echo $i | %__sed -e "s/^.*,//")
  394. case $enc in
  395. Japan) enclist="%{EncodeList_Japan}";;
  396. GB) enclist="%{EncodeList_GB}";;
  397. CNS) enclist="%{EncodeList_CNS}";;
  398. Korea) enclist="%{EncodeList_Korea}";;
  399. *) exit 1;;
  400. esac
  401. %__ln_s -f %{xfontdir}/${fnt}.otf %{buildroot}%{texfontdir}/${fnt}.otf
  402. %__ln_s -f %{xfontdir}/${fnt}.otf %{buildroot}%{gsfontdir}/${fnt}
  403. for j in $enclist; do
  404. mkgsfontspec ${fnt} ${j} > %{buildroot}%{gsfontspecdir}/${fnt}-${j}
  405. done
  406. done
  407. %post
  408. %__font_install_post %{xfontdir}
  409. %touch_run texhash
  410. exit 0
  411. %postun
  412. %__font_install_postun %{xfontdir}
  413. if [ "$1" = "0" ]; then
  414. %touch_run texhash
  415. fi
  416. exit 0
  417. %posttrans
  418. %{exec_texhash}
  419. exit 0
  420. %clean
  421. %__rm -rf %{buildroot}
  422. %files
  423. %defattr(-,root,root)
  424. #%doc README*
  425. %{xfontdir}/*
  426. %{gsfontdir}/*
  427. %{gsfontspecdir}/*
  428. %{texfontdir}/*
  429. %changelog
  430. * Sat Nov 24 2012 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-5
  431. - TeX Live 2012
  432. - change %%texfontdir
  433. * Sun Mar 4 2012 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-4
  434. - dropped Requires(post): chkfontpath
  435. * Sat Jun 11 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-3
  436. - supported Vine Linux 6 + TeX Live 2009
  437. - added Obsoletes: OTF-Kozuka < 1.0-3
  438. * Sat Jun 20 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-2
  439. - changed xfontdir
  440. * Sun Jun 07 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.0-1
  441. - spec in utf8
  442. - applied new versioning policy
  443. - s/Copyright/License/
  444. - corrected %%description
  445. - setup for Ghostscript 8.64
  446. - created many font spec files
  447. * Sat Jun 18 2005 KOBAYASHI Taizo <tkoba@ike-dyn.ritsumei.ac.jp> 1.0-0vl3
  448. - modified for teTeX3
  449. * Thu Apr 02 2004 KOBAYASHI R. Taizo <tkoba@ike-dyn.ritsumei.ac.jp> 1-0vl2
  450. - fix postun
  451. * Fri Apr 02 2004 KOBAYASHI R. Taizo <tkoba@ike-dyn.ritsumei.ac.jp> 1-0vl1
  452. - initial release