source: projects/texlive-vtlpkg/trunk/README @ 8479

Revision 8479, 9.7 KB checked in by munepi, 10 years ago (diff)

updated README

Line 
1[[PageOutline]]
2= tlpdb2rpmspec =
3
4texlive-collection-* の spec ファイルを生成するツールを作成しました。
5
6[browser:projects/texlive-vtlpkg/trunk]
7
8tlpdb2rpmspec は 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 spec suffix
24## default: RPM_SPEC_SUFFIX=vl
25RPM_SPEC_SUFFIX=vl
26
27## set your vendor
28## default: RPM_VENDOR="Project Vine"
29RPM_VENDOR="Project Vine"
30
31## set your distribution
32## default: RPM_DISTRIBUTION="Vine Linux"
33RPM_DISTRIBUTION="Vine Linux"
34
35## set your name and your e-mail address
36## default: RPM_GPG_NAME="YOUR NAME <your@email.address>"
37RPM_GPG_NAME=""
38
39## set your packager id
40## default: RPM_PACKAGER=your_id
41RPM_PACKAGER=
42
43## set the top of your rpm directory
44## default: RPM_TOPDIR=${HOME}/rpm
45RPM_TOPDIR=${HOME}/rpm
46
47## set local tlnet
48## default: TLNETROOT=/var/local/tlnet
49TLNETROOT=/var/local/tlnet
50## default: TLPDB=/var/local/tlnet/tlpkg/texlive.tlpdb
51TLPDB=/var/local/tlnet/tlpkg/texlive.tlpdb
52
53## set external dependencies (optional)
54## default: ASYMPTOTE_PACKAGE=
55#ASYMPTOTE_PACKAGE=asymptote
56## default: DETEX_PACKAGE=
57#DETEX_PACKAGE=detex
58## default: DVIPNG_PACKAGE=
59#DVIPNG_PACKAGE=dvipng
60## default: LATEXMK_PACKAGE=
61#LATEXMK_PACKAGE=latexmk
62## default: LCDF_TYPETOOLS_PACKAGE=
63#LCDF_TYPETOOLS_PACKAGE=lcdf-typetools
64## default: PSUTILS_PACKAGE=
65#PSUTILS_PACKAGE=psutils
66## default: T1UTILS_PACKAGE=
67#T1UTILS_PACKAGE=t1utils
68
69## customize some commands if you need (optional)
70#__echo=/bin/echo
71
72## end of file
73}}}
74
75
76== ヘルプ ==
77
78{{{
79$ tlpdb2rpmspec
80Usage:  tlpdb2rpmspec [option] [pkgname]
81
82This script generates a rpm spec file for CTAN and collection-* packages of TeX Live.
83
84Options:
85        --name:                 return [pkgname]
86        --category:             return the category of [pkgname]
87        --revision:             return the revision of [pkgname]
88        --depend:               return dependencies of [pkgname]
89        --shortdesc:            return the short description of [pkgname]
90        --longdesc:             return the description of [pkgname]
91        --execute:              return post processe of [pkgname]
92        --catalogue-ctan:       return the locate of [pkgname]
93        --catalogue-date:       return the last update of [pkgname]
94        --catalogue-license:    return the license of [pkgname]
95        --catalogue-version:    return the version of [pkgname]
96        --filelist:             return the filelist of [pkgname]
97        --help:                 show this help
98
99Supoort collections-* packages:
100collection-basic
101collection-bibtexextra
102collection-binextra
103(snip)
104collection-xetex
105}}}
106
107
108== 使い方 ==
109
110=== 1. TLNET を構築 ===
111
112ローカルに [http://www.ctan.org/tex-archive/systems/texlive/tlnet TLNET] を構築するための一例を、
113{{{ /usr/share/texlive-vtlpkg/_sync-tlnet.sh }}} に作っておきました。
114この {{{ _sync-tlnet.sh }}} を実行すると、
115TLNET の国内ミラーサーバの一つである JAIST の TLNET ftp://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet/ と {{{ rsync }}} コマンドにより同期をとって、
116ローカルに TLNET を構築できます。
117{{{
118  $ bash /usr/share/texlive-vtlpkg/_sync-tlnet.sh
119}}}
120
121=== 2. spec ファイルを生成 ===
122
123例えば、collection-basic の texlive-collection-basic-vl.spec を生成したい場合は、以下を実行します。
124
125{{{
126$ tlpdb2rpmspec collection-basic > texlive-collection-basic-vl.spec
127}}}
128
129{{{rpmbuild -ba texlive-collection-basic-vl.spec}}} を実行すると、
130texlive-collection-basic-YYYY-NNvlVV.{noarch,src}.rpm,
131texlive-collection-basic-doc-YYYY-NNvlVV.src.rpm
132がビルドされます。
133
134=== 3. rpm を作成 ===
135
1361 で構築した TLNET 内の {{{ archive }}} ディレクトリを {{{ %_sourcedir }}} として、{{{ rpmbuild }}} コマンドを実行します。
137{{{
138$ rpmbuild -ba --define="%_sourcedir /var/local/tlnet/archive" texlive-collection-basic-vl.spec
139}}}
140
141各カテゴリ別に texlive-collection-* を生成したい場合は、以下を実行することにより、rpmbuild まで実行します。
142{{{
143最小(main):$ tlpdb2rpmspec --minimal-collections
144標準(plus):$ tlpdb2rpmspec --standard-collections
145最大(plus):$ tlpdb2rpmspec --full-collections
146}}}
147
148また、大量にパッケージを生成する場合は、tee を利用してログを出しておくことが望ましいです。
149{{{
150$ tlpdb2rpmspec --full-collections 2>&1 | tee 00full-collections.log
151}}}
152
153
154== macros.texlive ==
155
156TeX Live 関連の RPM パッケージを作成する上でよく使われるものを {{{ /etc/rpm/macros.texlive }}} にまとめました。
157
158{{{
159#
160# RPM macros for our TeX Live
161#
162
163# default TeX Live directories
164%_tl_texmfroot          %{_datadir}
165
166%_tl_texmfconfig        ~/.texmf-config
167%_tl_texmfvar           ~/.texmf-var
168%_tl_texmfhome          ~/texmf
169%_tl_texmfsysconfig     %{_sysconfdir}/texmf
170%_tl_texmfsysvar        %{_var}/lib/texmf
171%_tl_texmflocal         %{_prefix}/local/share/texmf
172%_tl_texmfvine          %{_tl_texmfroot}/texmf
173%_tl_texmfdist          %{_tl_texmfroot}/texmf-dist
174%_tl_vartexfonts        %{_tl_texmfsysvar}/fonts
175
176%_tl_aliasttfdir        %{_tl_texmfsysvar}/fonts/truetype/vine
177%_tl_varrundir          %{_var}/run/texlive
178
179# some useful functions/macros
180%_tl_touch_run()        %{expand:( %__mkdir_p %{_tl_varrundir}; touch %{_tl_varrundir}/run-%1; )
181}
182
183%_tl_exec_upddeffont    [ -x %{_sbindir}/update-defaultfont ] && \\\
184    %{_sbindir}/update-defaultfont 2> /dev/null
185
186%_tl_exec_texhash       [ -e %{_tl_varrundir}/run-texhash ] && ( \\\
187    [ -x %{_bindir}/texhash ] && \\\
188    echo -n "    "; echo -n "Running texhash... "; \\\
189    %{_bindir}/texhash 2> /dev/null; \\\
190    echo "done." ) && %__rm -f %{_tl_varrundir}/run-texhash;
191
192%_tl_exec_mtxrun        [ -e %{_tl_varrundir}/run-mtxrun ] && ( \\\
193    [ -x %{_bindir}/mtxrun ] && \\\
194    echo -n "    "; echo -n "Running mtxrun... "; \\\
195    export TEXMF=%{_tl_texmfdist} TEXMFCNF=%{_tl_texmfdist}/web2c TEXMFCACHE=%{_tl_texmfsysvar}; \\\
196    %{_bindir}/mtxrun --generate &> /dev/null; \\\
197    echo "done." ) && %__rm -f %{_tl_varrundir}/run-mtxrun;
198
199%_tl_exec_fmtutil       [ -e %{_tl_varrundir}/run-fmtutil ] && ( \\\
200    [ -x %{_bindir}/fmtutil-sys ] && \\\
201    echo -n "    "; echo -n "Running fmtutil-sys... "; \\\
202    %{_bindir}/fmtutil-sys --all &> /dev/null; \\\
203    echo "done." ) && %__rm -f %{_tl_varrundir}/run-fmtutil;
204
205%_tl_exec_updmap        [ -e %{_tl_varrundir}/run-updmap ] && ( \\\
206    [ -x %{_bindir}/updmap-sys ] && \\\
207    echo -n "    "; echo -n "Running updmap-sys... "; \\\
208    yes | %{_bindir}/updmap-sys --syncwithtrees --nohash --quiet &>/dev/null; \\\
209    %{_bindir}/updmap-sys --nohash --quiet &> /dev/null; \\\
210    echo "done." ) && %__rm -f %{_tl_varrundir}/run-updmap;
211
212
213# %_tl_enable_map [maptype] [map]
214%_tl_enable_map()       %{expand: %{_bindir}/updmap-sys --nomkmap --nohash --quiet --enable %1 %2 >/dev/null 2>&1 && %_tl_touch_run updmap
215}
216
217# %_tl_disable_map [map]
218%_tl_disable_map()      %{expand: %{_bindir}/updmap-sys --nomkmap --nohash --quiet --disable %1 >/dev/null 2>&1 && %_tl_touch_run updmap
219}
220
221# end of file
222}}}
223
224
225
226
227== テスト事項 ==
228
229=== パッケージングの検証 ===
230
2311. {{{$ tlpdb2rpmspec --full-collections}}} で生成されたすべての rpm パッケージをインストールする。
2321. TeX Live の scheme-full からインストールされる {{{ $TEXLIVE/texmf-dist }}} と {{{ /usr/share/texmf-dist }}} との差分比較して確認する。
233
234
235== 資料 ==
236
237=== texlive.tlpdb のフィールド一覧 ===
238
239{{{
240$ sed -e "s/^\([-A-z0-9]*\) .*$/\1/g" /var/local/tlnet/tlpkg/texlive.tlpdb | sort | uniq
241
242binfiles
243catalogue
244catalogue-ctan
245catalogue-date
246catalogue-license
247catalogue-version
248category
249containermd5
250containersize
251depend
252doccontainermd5
253doccontainersize
254docfiles
255execute
256longdesc
257name
258postaction
259relocated
260revision
261runfiles
262shortdesc
263srccontainermd5
264srccontainersize
265srcfiles
266}}}
267
268=== ライセンスのリスト ===
269{{{
270$ egrep "^catalogue-license" /var/local/tlnet/tlpkg/texlive.tlpdb | sed -e "s,catalogue-license[[:blank:]]*,," | sort | uniq
271apache2
272artistic
273bsd
274collection
275fdl
276gfl
277gfsl
278gpl
279gpl2
280gpl3
281knuth
282lgpl
283lgpl2.1
284lppl
285lppl1
286lppl1.2
287lppl1.3
288noinfo
289nosource
290ofl
291opl
292other-free
293other-nonfree
294pd
295}}}
296
297
298
299
300== texlive-vtlpkg の主な更新履歴 ==
301
302=== TeX Live 2014 ===
303[browser:projects/texlive-vtlpkg/trunk]
304
305次期 Vine Linux 7 に対応する予定。
306
307=== TeX Live 2013 ===
308[browser:projects/texlive-vtlpkg/2013]
309
310TeX Live 2012 以前の texlive-vtlpkg では、
311リリースされたバージョンのソースアーカイブスをまとめた texlive-sources パッケージから texlive-collection-* を生成していた。
312
313TeX Live 2013 以降の texlive-vtlpkg は、TLNET のパッケージから texlive-collection-* を生成するようにした。
314この変更により、TeX Live の current へ追従しやすくなった。
315
316=== TeX Live 2012 ===
317[browser:projects/texlive-vtlpkg/2012]
318
319=== TeX Live 2011 ===
320[browser:projects/texlive-vtlpkg/tags/2011]
321
322rpm-4.8.1 を利用するため、
323{{{_use_internal_dependency_generator 0}}} を用いれば、簡単に制御できた。
324{{{
325%global _use_internal_dependency_generator 0
326%global __find_provides %{nil}
327%global __find_requires %{nil}
328}}}
329
330=== TeX Live 2009 ===
331[browser:projects/texlive-vtlpkg/branches/2009]
332
333Vine Linux 6 および Vine Linux 5 に対応しているため、
334spec ファイルがやや煩雑になっている。
335{{{
336%define __find_provides %{nil}
337%define __find_requires %{nil}
338%define __perl_provides %{nil}
339%define __perl_requires %{nil}
340
341Autoreq: 0
342}}}
Note: See TracBrowser for help on using the repository browser.