1 | [[PageOutline]] |
---|
2 | = tlpdb2rpmspec = |
---|
3 | |
---|
4 | texlive-collection-* の spec ファイルを生成するツールを作成しました。 |
---|
5 | |
---|
6 | [browser:projects/texlive-vtlpkg/trunk] |
---|
7 | |
---|
8 | tlpdb2rpmspec は texlive-vtlpkg パッケージに同梱されています。 |
---|
9 | |
---|
10 | {{{ |
---|
11 | $ sudo apt-get install texlive-vtlpkg |
---|
12 | }}} |
---|
13 | |
---|
14 | == 初期設定 == |
---|
15 | |
---|
16 | /usr/share/texlive-vtlpkg/dot.vtlpkg.conf を ${HOME}/.vtlpkg.conf へコピーして、必要な設定をします。 |
---|
17 | {{{ |
---|
18 | ## |
---|
19 | ## texlive-vtlpkg configuration file |
---|
20 | ## |
---|
21 | ## This configuration is read at the startup of texlive-vtlpkg. |
---|
22 | |
---|
23 | ## set your vendor |
---|
24 | ## default: RPM_VENDOR="Project Vine" |
---|
25 | RPM_VENDOR="Project Vine" |
---|
26 | |
---|
27 | ## set your distribution |
---|
28 | ## default: RPM_DISTRIBUTION="Vine Linux" |
---|
29 | RPM_DISTRIBUTION="Vine Linux" |
---|
30 | |
---|
31 | ## set your name and your e-mail address |
---|
32 | ## default: RPM_GPG_NAME="YOUR NAME <your@email.address>" |
---|
33 | RPM_GPG_NAME="" |
---|
34 | |
---|
35 | ## set your packager id |
---|
36 | ## default: RPM_PACKAGER=your_id |
---|
37 | RPM_PACKAGER= |
---|
38 | |
---|
39 | ## set the top of your rpm directory |
---|
40 | ## default: RPM_TOPDIR=${HOME}/rpm |
---|
41 | RPM_TOPDIR=${HOME}/rpm |
---|
42 | |
---|
43 | ## set external dependencies (optional) |
---|
44 | ## default: ASYMPTOTE_PACKAGE= |
---|
45 | #ASYMPTOTE_PACKAGE=asymptote |
---|
46 | ## default: DETEX_PACKAGE= |
---|
47 | #DETEX_PACKAGE=detex |
---|
48 | ## default: DVIPNG_PACKAGE= |
---|
49 | #DVIPNG_PACKAGE=dvipng |
---|
50 | ## default: LATEXMK_PACKAGE= |
---|
51 | #LATEXMK_PACKAGE=latexmk |
---|
52 | ## default: LCDF_TYPETOOLS_PACKAGE= |
---|
53 | #LCDF_TYPETOOLS_PACKAGE=lcdf-typetools |
---|
54 | ## default: PSUTILS_PACKAGE= |
---|
55 | #PSUTILS_PACKAGE=psutils |
---|
56 | ## default: T1UTILS_PACKAGE= |
---|
57 | #T1UTILS_PACKAGE=t1utils |
---|
58 | |
---|
59 | ## customize some commands if you need (optional) |
---|
60 | #__echo=/bin/echo |
---|
61 | |
---|
62 | ## end of file |
---|
63 | }}} |
---|
64 | |
---|
65 | |
---|
66 | == ヘルプ == |
---|
67 | |
---|
68 | {{{ |
---|
69 | $ tlpdb2rpmspec |
---|
70 | Usage: tlpdb2rpmspec [option] [pkgname] |
---|
71 | |
---|
72 | This script generates a rpm spec file for CTAN and collection-* packages of TeX Live. |
---|
73 | |
---|
74 | Options: |
---|
75 | --name: return [pkgname] |
---|
76 | --category: return the category of [pkgname] |
---|
77 | --revision: return the revision of [pkgname] |
---|
78 | --depend: return dependencies of [pkgname] |
---|
79 | --shortdesc: return the short description of [pkgname] |
---|
80 | --longdesc: return the description of [pkgname] |
---|
81 | --execute: return post processe of [pkgname] |
---|
82 | --catalogue-ctan: return the locate of [pkgname] |
---|
83 | --catalogue-date: return the last update of [pkgname] |
---|
84 | --catalogue-license: return the license of [pkgname] |
---|
85 | --catalogue-version: return the version of [pkgname] |
---|
86 | --filelist: return the filelist of [pkgname] |
---|
87 | --help: show this help |
---|
88 | |
---|
89 | Supoort collections-* packages: |
---|
90 | collection-basic |
---|
91 | collection-bibtexextra |
---|
92 | collection-binextra |
---|
93 | (snip) |
---|
94 | collection-xetex |
---|
95 | }}} |
---|
96 | |
---|
97 | |
---|
98 | == 使い方 == |
---|
99 | |
---|
100 | 例えば、collection-basic の texlive-collection-basic-vl.spec を生成したい場合は、以下を実行します。 |
---|
101 | |
---|
102 | {{{ |
---|
103 | $ tlpdb2rpmspec collection-basic > texlive-collection-basic-vl.spec |
---|
104 | }}} |
---|
105 | |
---|
106 | {{{rpmbuild -ba texlive-collection-basic-vl.spec}}} を実行すると、 |
---|
107 | texlive-collection-basic-2011-Xvl6.{noarch,src}.rpm, |
---|
108 | texlive-collection-basic-doc-2011-Xvl7.src.rpm |
---|
109 | がビルドされます。 |
---|
110 | |
---|
111 | 各カテゴリ別に texlive-collection-* を生成したい場合は、以下を実行することにより、rpmbuild まで実行します。 |
---|
112 | {{{ |
---|
113 | 最小(main):$ tlpdb2rpmspec --minimal-collections |
---|
114 | 標準(plus):$ tlpdb2rpmspec --standard-collections |
---|
115 | 最大(plus):$ tlpdb2rpmspec --full-collections |
---|
116 | }}} |
---|
117 | |
---|
118 | また、大量にパッケージを生成する場合は、tee を利用してログを出しておくことが望ましい。 |
---|
119 | {{{ |
---|
120 | $ tlpdb2rpmspec --full-collections 2>&1 | tee 00full-collections.log |
---|
121 | }}} |
---|
122 | |
---|
123 | == 対応している TeX Live のバージョン == |
---|
124 | |
---|
125 | === TeX Live 2012 === |
---|
126 | [browser:projects/texlive-vtlpkg/trunk] |
---|
127 | |
---|
128 | 次期 Vine Linux 7 に対応する予定。 |
---|
129 | |
---|
130 | === TeX Live 2011 === |
---|
131 | [browser:projects/texlive-vtlpkg/tags/2011] |
---|
132 | |
---|
133 | 次期 Vine Linux 7 に対応する予定。 |
---|
134 | |
---|
135 | rpm-4.8.1 を利用するため、 |
---|
136 | {{{_use_internal_dependency_generator 0}}} を用いれば、簡単に制御できた。 |
---|
137 | {{{ |
---|
138 | %global _use_internal_dependency_generator 0 |
---|
139 | %global __find_provides %{nil} |
---|
140 | %global __find_requires %{nil} |
---|
141 | }}} |
---|
142 | |
---|
143 | === TeX Live 2009 === |
---|
144 | [browser:projects/texlive-vtlpkg/branches/2009] |
---|
145 | |
---|
146 | Vine Linux 6 および Vine Linux 5 に対応しているため、 |
---|
147 | spec ファイルがやや煩雑になっている。 |
---|
148 | {{{ |
---|
149 | %define __find_provides %{nil} |
---|
150 | %define __find_requires %{nil} |
---|
151 | %define __perl_provides %{nil} |
---|
152 | %define __perl_requires %{nil} |
---|
153 | |
---|
154 | Autoreq: 0 |
---|
155 | }}} |
---|
156 | |
---|
157 | == テスト事項 == |
---|
158 | |
---|
159 | === パッケージングの検証 === |
---|
160 | 1. {{{$ tlpdb2rpmspec --full-collections}}} で生成されたすべての rpm パッケージをインストールする。 |
---|
161 | 1. texlive-sources パッケージからインストールされる {{{/usr/share/texlive-sources}}} 以下のファイルたちと差分比較して確認する。 |
---|
162 | |
---|
163 | |
---|
164 | == 開発メモ == |
---|
165 | |
---|
166 | texlive.tlpdb のフィールド一覧 |
---|
167 | {{{ |
---|
168 | $ sed -e "s/^\([-A-z0-9]*\) .*$/\1/g" texlive.tlpdb | sort | uniq |
---|
169 | |
---|
170 | binfiles |
---|
171 | catalogue |
---|
172 | catalogue-ctan |
---|
173 | catalogue-date |
---|
174 | catalogue-license |
---|
175 | catalogue-version |
---|
176 | category |
---|
177 | containermd5 |
---|
178 | containersize |
---|
179 | depend |
---|
180 | doccontainermd5 |
---|
181 | doccontainersize |
---|
182 | docfiles |
---|
183 | execute |
---|
184 | longdesc |
---|
185 | name |
---|
186 | postaction |
---|
187 | relocated |
---|
188 | revision |
---|
189 | runfiles |
---|
190 | shortdesc |
---|
191 | srccontainermd5 |
---|
192 | srccontainersize |
---|
193 | srcfiles |
---|
194 | }}} |
---|
195 | |
---|
196 | ライセンスのリスト |
---|
197 | {{{ |
---|
198 | $ egrep "^catalogue-license" texlive.tlpdb | sed -e "s,catalogue-license[[:blank:]]*,," | sort | uniq |
---|
199 | apache2 |
---|
200 | artistic |
---|
201 | bsd |
---|
202 | collection |
---|
203 | fdl |
---|
204 | gfl |
---|
205 | gfsl |
---|
206 | gpl |
---|
207 | gpl2 |
---|
208 | gpl3 |
---|
209 | knuth |
---|
210 | lgpl |
---|
211 | lgpl2.1 |
---|
212 | lppl |
---|
213 | lppl1 |
---|
214 | lppl1.2 |
---|
215 | lppl1.3 |
---|
216 | noinfo |
---|
217 | ofl |
---|
218 | other-free |
---|
219 | other-nonfree |
---|
220 | pd |
---|
221 | }}} |
---|