OpenType-kozuka-vl.spec 11 KB

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