Changes between Version 11 and Version 12 of TeXEnvironment/tlpdb2rpmspec


Ignore:
Timestamp:
2013/08/27 20:05:22 (11 years ago)
Author:
munepi
Comment:

TeX Live 2013 向けに改訂

Legend:

Unmodified
Added
Removed
Modified
  • TeXEnvironment/tlpdb2rpmspec

    v11 v12  
    2121## This configuration is read at the startup of texlive-vtlpkg.  
    2222 
     23## set spec suffix 
     24## default: RPM_SPEC_SUFFIX=vl 
     25RPM_SPEC_SUFFIX=vl 
     26 
    2327## set your vendor 
    2428## default: RPM_VENDOR="Project Vine" 
     
    4044## default: RPM_TOPDIR=${HOME}/rpm 
    4145RPM_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 
    4252 
    4353## set external dependencies (optional) 
     
    98108== 使い方 == 
    99109 
     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 
    100123例えば、collection-basic の texlive-collection-basic-vl.spec を生成したい場合は、以下を実行します。 
    101124 
     
    105128 
    106129{{{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  
     130texlive-collection-basic-YYYY-NNvlVV.{noarch,src}.rpm,  
     131texlive-collection-basic-doc-YYYY-NNvlVV.src.rpm  
    109132がビルドされます。 
     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}}} 
    110140 
    111141各カテゴリ別に texlive-collection-* を生成したい場合は、以下を実行することにより、rpmbuild まで実行します。 
     
    116146}}} 
    117147 
    118 また、大量にパッケージを生成する場合は、tee を利用してログを出しておくことが望ましい 
     148また、大量にパッケージを生成する場合は、tee を利用してログを出しておくことが望ましいです 
    119149{{{ 
    120150$ tlpdb2rpmspec --full-collections 2>&1 | tee 00full-collections.log 
    121151}}} 
    122152 
    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 }}} 
     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 
    156226 
    157227== テスト事項 == 
    158228 
    159229=== パッケージングの検証 === 
     230 
    1602311. {{{$ 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 
     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 
    169241 
    170242binfiles 
     
    194266}}} 
    195267 
    196 ライセンスのリスト 
    197 {{{ 
    198 $ egrep "^catalogue-license" texlive.tlpdb | sed -e "s,catalogue-license[[:blank:]]*,," | sort | uniq 
     268=== ライセンスのリスト === 
     269{{{ 
     270$ egrep "^catalogue-license" /var/local/tlnet/tlpkg/texlive.tlpdb | sed -e "s,catalogue-license[[:blank:]]*,," | sort | uniq 
    199271apache2 
    200272artistic 
     
    215287lppl1.3 
    216288noinfo 
     289nosource 
    217290ofl 
     291opl 
    218292other-free 
    219293other-nonfree 
    220294pd 
    221295}}} 
     296 
     297 
     298 
     299 
     300== texlive-vtlpkg の主な更新履歴 == 
     301 
     302=== TeX Live 2013 === 
     303[browser:projects/texlive-vtlpkg/trunk] 
     304 
     305次期 Vine Linux 7 に対応する予定。 
     306 
     307TeX Live 2012 以前の texlive-vtlpkg では、 
     308リリースされたバージョンのソースアーカイブスをまとめた texlive-sources パッケージから texlive-collection-* を生成していた。 
     309 
     310TeX Live 2013 以降の texlive-vtlpkg は、TLNET のパッケージから texlive-collection-* を生成するようにした。 
     311この変更により、TeX Live の current へ追従しやすくなった。 
     312 
     313=== TeX Live 2012 === 
     314[browser:projects/texlive-vtlpkg/2012] 
     315 
     316=== TeX Live 2011 === 
     317[browser:projects/texlive-vtlpkg/tags/2011] 
     318 
     319rpm-4.8.1 を利用するため、 
     320{{{_use_internal_dependency_generator 0}}} を用いれば、簡単に制御できた。 
     321{{{ 
     322%global _use_internal_dependency_generator 0 
     323%global __find_provides %{nil} 
     324%global __find_requires %{nil} 
     325}}} 
     326 
     327=== TeX Live 2009 === 
     328[browser:projects/texlive-vtlpkg/branches/2009] 
     329 
     330Vine Linux 6 および Vine Linux 5 に対応しているため、 
     331spec ファイルがやや煩雑になっている。 
     332{{{ 
     333%define __find_provides %{nil} 
     334%define __find_requires %{nil} 
     335%define __perl_provides %{nil} 
     336%define __perl_requires %{nil} 
     337 
     338Autoreq: 0 
     339}}}