[5080] | 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 | ## end of file |
---|
| 44 | }}} |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | == ヘルプ == |
---|
| 48 | |
---|
| 49 | {{{ |
---|
| 50 | $ tlpdb2rpmspec |
---|
| 51 | Usage: tlpdb2rpmspec [option] [pkgname] |
---|
| 52 | |
---|
| 53 | This script generates a rpm spec file for CTAN and collection-* packages of TeX Live. |
---|
| 54 | |
---|
| 55 | Options: |
---|
| 56 | --name: return [pkgname] |
---|
| 57 | --category: return the category of [pkgname] |
---|
| 58 | --revision: return the revision of [pkgname] |
---|
| 59 | --depend: return dependencies of [pkgname] |
---|
| 60 | --shortdesc: return the short description of [pkgname] |
---|
| 61 | --longdesc: return the description of [pkgname] |
---|
| 62 | --execute: return post processe of [pkgname] |
---|
| 63 | --catalogue-ctan: return the locate of [pkgname] |
---|
| 64 | --catalogue-date: return the last update of [pkgname] |
---|
| 65 | --catalogue-license: return the license of [pkgname] |
---|
| 66 | --catalogue-version: return the version of [pkgname] |
---|
| 67 | --filelist: return the filelist of [pkgname] |
---|
| 68 | --help: show this help |
---|
| 69 | |
---|
| 70 | Supoort collections-* packages: |
---|
| 71 | collection-basic |
---|
| 72 | collection-bibtexextra |
---|
| 73 | collection-binextra |
---|
| 74 | (snip) |
---|
| 75 | collection-xetex |
---|
| 76 | }}} |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | == 使い方 == |
---|
| 80 | |
---|
| 81 | 例えば、collection-basic の texlive-collection-basic-vl.spec を生成したい場合は、以下を実行します。 |
---|
| 82 | |
---|
| 83 | {{{ |
---|
| 84 | $ tlpdb2rpmspec collection-basic > texlive-collection-basic-vl.spec |
---|
| 85 | }}} |
---|
| 86 | |
---|
| 87 | {{{rpmbuild -ba texlive-collection-basic-vl.spec}}} を実行すると、 |
---|
| 88 | texlive-collection-basic-2009-Xvl6.{noarch,src}.rpm, |
---|
| 89 | texlive-collection-basic-doc-2009-Xvl6.src.rpm |
---|
| 90 | がビルドされます。 |
---|
| 91 | |
---|
| 92 | 各カテゴリ別に texlive-collection-* を生成したい場合は、以下を実行することにより、rpmbuild まで実行します。 |
---|
| 93 | {{{ |
---|
| 94 | 最小(main):$ tlpdb2rpmspec --minimal-collections |
---|
| 95 | 標準(plus):$ tlpdb2rpmspec --standard-collections |
---|
| 96 | 最大(plus):$ tlpdb2rpmspec --full-collections |
---|
| 97 | }}} |
---|
| 98 | |
---|
| 99 | また、大量にパッケージを生成する場合は、tee を利用してログを出しておくことが望ましい。 |
---|
| 100 | {{{ |
---|
| 101 | $ tlpdb2rpmspec --full-collections 2>&1 | tee 00full-collections.log |
---|
| 102 | }}} |
---|
| 103 | |
---|
| 104 | == 対応している TeX Live のバージョン == |
---|
| 105 | |
---|
| 106 | === TeX Live 2011 === |
---|
| 107 | [browser:projects/texlive-vtlpkg/trunk] |
---|
| 108 | |
---|
| 109 | 次期 Vine Linux 7 および Vine Linux 6 に対応する予定。 |
---|
| 110 | |
---|
| 111 | rpm-4.8.1 を利用するため、 |
---|
| 112 | {{{_use_internal_dependency_generator 0}}} を用いれば、簡単に制御できた。 |
---|
| 113 | {{{ |
---|
| 114 | %global _use_internal_dependency_generator 0 |
---|
| 115 | %global __find_provides %{nil} |
---|
| 116 | %global __find_requires %{nil} |
---|
| 117 | }}} |
---|
| 118 | |
---|
| 119 | === TeX Live 2009 === |
---|
| 120 | [browser:projects/texlive-vtlpkg/branches/2009] |
---|
| 121 | |
---|
| 122 | Vine Linux 6 および Vine Linux 5 に対応しているため、 |
---|
| 123 | spec ファイルがやや煩雑になっている。 |
---|
| 124 | {{{ |
---|
| 125 | %define __find_provides %{nil} |
---|
| 126 | %define __find_requires %{nil} |
---|
| 127 | %define __perl_provides %{nil} |
---|
| 128 | %define __perl_requires %{nil} |
---|
| 129 | |
---|
| 130 | Autoreq: 0 |
---|
| 131 | }}} |
---|
| 132 | |
---|
| 133 | == テスト事項 == |
---|
| 134 | |
---|
| 135 | === パッケージングの検証 === |
---|
| 136 | 1. {{{$ tlpdb2rpmspec --full-collections}}} で生成されたすべての rpm パッケージをインストールする。 |
---|
| 137 | 1. texlive-sources パッケージからインストールされる {{{/usr/share/texlive-sources}}} 以下のファイルたちと差分比較して確認する。 |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | == 開発メモ == |
---|
| 141 | |
---|
| 142 | texlive.tlpdb のフィールド一覧 |
---|
| 143 | {{{ |
---|
| 144 | $ sed -e "s/^\([-A-z0-9]*\) .*$/\1/g" texlive.tlpdb | sort | uniq |
---|
| 145 | |
---|
| 146 | binfiles |
---|
| 147 | catalogue |
---|
| 148 | catalogue-ctan |
---|
| 149 | catalogue-date |
---|
| 150 | catalogue-license |
---|
| 151 | catalogue-version |
---|
| 152 | category |
---|
| 153 | containermd5 |
---|
| 154 | containersize |
---|
| 155 | depend |
---|
| 156 | doccontainermd5 |
---|
| 157 | doccontainersize |
---|
| 158 | docfiles |
---|
| 159 | execute |
---|
| 160 | longdesc |
---|
| 161 | name |
---|
| 162 | postaction |
---|
| 163 | relocated |
---|
| 164 | revision |
---|
| 165 | runfiles |
---|
| 166 | shortdesc |
---|
| 167 | srccontainermd5 |
---|
| 168 | srccontainersize |
---|
| 169 | srcfiles |
---|
| 170 | }}} |
---|
| 171 | |
---|
| 172 | ライセンスのリスト |
---|
| 173 | {{{ |
---|
| 174 | $ egrep "^catalogue-license" texlive.tlpdb | sed -e "s,catalogue-license[[:blank:]]*,," | sort | uniq |
---|
| 175 | apache2 |
---|
| 176 | artistic |
---|
| 177 | bsd |
---|
| 178 | collection |
---|
| 179 | fdl |
---|
| 180 | gfl |
---|
| 181 | gfsl |
---|
| 182 | gpl |
---|
| 183 | gpl2 |
---|
| 184 | gpl3 |
---|
| 185 | knuth |
---|
| 186 | lgpl |
---|
| 187 | lgpl2.1 |
---|
| 188 | lppl |
---|
| 189 | lppl1 |
---|
| 190 | lppl1.2 |
---|
| 191 | lppl1.3 |
---|
| 192 | noinfo |
---|
| 193 | ofl |
---|
| 194 | other-free |
---|
| 195 | other-nonfree |
---|
| 196 | pd |
---|
| 197 | }}} |
---|