[[PageOutline]] = tlpdb2rpmspec = texlive-collection-* の spec ファイルを生成するツールを作成しました。 [browser:projects/texlive-vtlpkg/trunk] tlpdb2rpmspec は texlive-vtlpkg パッケージに同梱されています。 {{{ $ sudo apt-get install texlive-vtlpkg }}} == 初期設定 == /usr/share/texlive-vtlpkg/dot.vtlpkg.conf を ${HOME}/.vtlpkg.conf へコピーして、必要な設定をします。 {{{ ## ## texlive-vtlpkg configuration file ## ## This configuration is read at the startup of texlive-vtlpkg. ## set your vendor ## default: RPM_VENDOR="Project Vine" RPM_VENDOR="Project Vine" ## set your distribution ## default: RPM_DISTRIBUTION="Vine Linux" RPM_DISTRIBUTION="Vine Linux" ## set your name and your e-mail address ## default: RPM_GPG_NAME="YOUR NAME " RPM_GPG_NAME="" ## set your packager id ## default: RPM_PACKAGER=your_id RPM_PACKAGER= ## set the top of your rpm directory ## default: RPM_TOPDIR=${HOME}/rpm RPM_TOPDIR=${HOME}/rpm ## set external dependencies (optional) ## default: ASYMPTOTE_PACKAGE= #ASYMPTOTE_PACKAGE=asymptote ## default: DETEX_PACKAGE= #DETEX_PACKAGE=detex ## default: DVIPNG_PACKAGE= #DVIPNG_PACKAGE=dvipng ## default: LATEXMK_PACKAGE= #LATEXMK_PACKAGE=latexmk ## default: LCDF_TYPETOOLS_PACKAGE= #LCDF_TYPETOOLS_PACKAGE=lcdf-typetools ## default: PSUTILS_PACKAGE= #PSUTILS_PACKAGE=psutils ## default: T1UTILS_PACKAGE= #T1UTILS_PACKAGE=t1utils ## customize some commands if you need (optional) #__echo=/bin/echo ## end of file }}} == ヘルプ == {{{ $ tlpdb2rpmspec Usage: tlpdb2rpmspec [option] [pkgname] This script generates a rpm spec file for CTAN and collection-* packages of TeX Live. Options: --name: return [pkgname] --category: return the category of [pkgname] --revision: return the revision of [pkgname] --depend: return dependencies of [pkgname] --shortdesc: return the short description of [pkgname] --longdesc: return the description of [pkgname] --execute: return post processe of [pkgname] --catalogue-ctan: return the locate of [pkgname] --catalogue-date: return the last update of [pkgname] --catalogue-license: return the license of [pkgname] --catalogue-version: return the version of [pkgname] --filelist: return the filelist of [pkgname] --help: show this help Supoort collections-* packages: collection-basic collection-bibtexextra collection-binextra (snip) collection-xetex }}} == 使い方 == 例えば、collection-basic の texlive-collection-basic-vl.spec を生成したい場合は、以下を実行します。 {{{ $ tlpdb2rpmspec collection-basic > texlive-collection-basic-vl.spec }}} {{{rpmbuild -ba texlive-collection-basic-vl.spec}}} を実行すると、 texlive-collection-basic-2011-Xvl6.{noarch,src}.rpm, texlive-collection-basic-doc-2011-Xvl7.src.rpm がビルドされます。 各カテゴリ別に texlive-collection-* を生成したい場合は、以下を実行することにより、rpmbuild まで実行します。 {{{ 最小(main):$ tlpdb2rpmspec --minimal-collections 標準(plus):$ tlpdb2rpmspec --standard-collections 最大(plus):$ tlpdb2rpmspec --full-collections }}} また、大量にパッケージを生成する場合は、tee を利用してログを出しておくことが望ましい。 {{{ $ tlpdb2rpmspec --full-collections 2>&1 | tee 00full-collections.log }}} == 対応している TeX Live のバージョン == === TeX Live 2012 === [browser:projects/texlive-vtlpkg/trunk] 次期 Vine Linux 7 に対応する予定。 === TeX Live 2011 === [browser:projects/texlive-vtlpkg/tags/2011] 次期 Vine Linux 7 に対応する予定。 rpm-4.8.1 を利用するため、 {{{_use_internal_dependency_generator 0}}} を用いれば、簡単に制御できた。 {{{ %global _use_internal_dependency_generator 0 %global __find_provides %{nil} %global __find_requires %{nil} }}} === TeX Live 2009 === [browser:projects/texlive-vtlpkg/branches/2009] Vine Linux 6 および Vine Linux 5 に対応しているため、 spec ファイルがやや煩雑になっている。 {{{ %define __find_provides %{nil} %define __find_requires %{nil} %define __perl_provides %{nil} %define __perl_requires %{nil} Autoreq: 0 }}} == テスト事項 == === パッケージングの検証 === 1. {{{$ tlpdb2rpmspec --full-collections}}} で生成されたすべての rpm パッケージをインストールする。 1. texlive-sources パッケージからインストールされる {{{/usr/share/texlive-sources}}} 以下のファイルたちと差分比較して確認する。 == 開発メモ == texlive.tlpdb のフィールド一覧 {{{ $ sed -e "s/^\([-A-z0-9]*\) .*$/\1/g" texlive.tlpdb | sort | uniq binfiles catalogue catalogue-ctan catalogue-date catalogue-license catalogue-version category containermd5 containersize depend doccontainermd5 doccontainersize docfiles execute longdesc name postaction relocated revision runfiles shortdesc srccontainermd5 srccontainersize srcfiles }}} ライセンスのリスト {{{ $ egrep "^catalogue-license" texlive.tlpdb | sed -e "s,catalogue-license[[:blank:]]*,," | sort | uniq apache2 artistic bsd collection fdl gfl gfsl gpl gpl2 gpl3 knuth lgpl lgpl2.1 lppl lppl1 lppl1.2 lppl1.3 noinfo ofl other-free other-nonfree pd }}}