% 表題: latex2html の jp + dennou パッチ 作成の手引 % % 履歴: 2004-10-02 杉山耕一朗 % 履歴: 2004-10-05 杉山耕一朗 % : 2005-04-07 小高正嗣 ■ もくじ - ソースの取得 - jp パッチと dennou スタイルへの対応 - Debian パッケージの作成: 環境変数の設定 - Debian パッケージの作成: 事前インストールパッケージ - Debian パッケージの作成: 初めての場合 - Debian パッケージの作成: 再パッケージ化する場合 ■ ソースの取得 ・latex2html 本体, 日本語化パッチ http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/ltx2html.html#pa_dist - latex2html-2002-2-1.tar.gz - l2h-2002-2-1+jp1.8.patch.gz - amsmath-bug2.patch ・latex2html の dennou パッチ http://www.gfd-dennou.org/arch/cc-env/latex2html/latex2html+dennou.tar.gz ■ jp パッチと dennou スタイルへの対応 ソースと jp パッチを展開する. $ tar zxvf tar zxvf latex2html-2002-2-1.tar.gz $ gunzip l2h-2002-2-1+jp1.8.patch.gz jp パッチをあてる. ここでディレクトリ名を latex2html-2002-2-1+jp+dennou に変更する. $ mv latex2html-2002-2-1 latex2html-2002-2-1+jp+dennou $ cd latex2html-2002-2-1+jp+dennou $ patch -p1 < ../l2h-2002-2-1+jp1.8.patch.gz $ cd styles/ $ patch < ../../amsmath-bug2.patch $ cd ../ dennou スタイルへの対応 $ tar xvzf latex2html+dennou.tar.gz $ cp ../latex2html+dennou/styles/D6* ./style ■ Debian パッケージの作成: 環境変数の設定 パッケージ情報に引用される環境変数 EMAIL と DEBFULLNAE を設定する. $ export EMAIL=odakker(at)gfd-dennou.org $ export DEBFULLNAE="Masatsugu Odaka" ■ Debian パッケージの作成: 事前インストールパッケージ 事前に以下のパッケージが実行環境にインストールされているか確認する. dh-make dpkg-dev fakeroot ■ Debian パッケージの作成: 初めての場合 1) ソースをダウンロードして展開後, ソースのディレクトリ名を <パッケージ名> - <バージョン名> に変更する. 名前に使える文字列は "a-z0-9","+","-" である. 大文字は 使えないことに注意. 2) パッケージ情報の作成 $ deb-make とする. これにより debian ディレクトリと必要なファイルが作成される. 3) debian ディレクトリファイルの修正 詳細は実ファイルを参照. 末尾にも付録として添付した. - conffiles /etc/latex2html.conf - control パッケージ名などのパッケージ情報を記載する. - README.Debian - changelog パッケージの更新履歴を記述する. - copyright ライセンス規定を記述する. 元々の LICENSE を張り付ける - rules パッケージ化を行うための Makefile. debian オリジナルの deb パッ ケージに含まれている rules ファイルをコピーする. 4) パッケージ作成 ソース直下のディレクトリにて $ dpkg-buildpackage -rfakeroot を実行する. その結果, 一つ上のディレクトリに latex2html_2002-2-1+jp+dennou-1.dsc latex2html_2002-2-1+jp+dennou-1.tar.gz latex2html_2002-2-1+jp+dennou-1_all.deb latex2html_2002-2-1+jp+dennou-1_i386.changes が作成される. ■ Debian パッケージの作成: 再パッケージ化する場合 既に作成したパッケージに不具合があり, 再パッケージ化する場合, latex2html_2002-2-1+jp+dennou-1.dsc latex2html_2002-2-1+jp+dennou-1.tar.gz latex2html_2002-2-1+jp+dennou-1_all.deb latex2html_2002-2-1+jp+dennou-1_i386.changes をダウンロードして $ dpkg-source -x latex2html_2002-2-1+jp+dennou-1.dsc を実行する. これにより, debian ディレクトリを含むソースツリーが復元 できる. ソース直下に移動後, $ dch -i を行う. これによりエディタが changelog ファイルを時動的に読み込んで 起動する. 記載されるパッケージ番号も時動的に 1 つ繰り上がる. バージョンを明示したい場合は $ dch -v とする. ここで指定するバージョンは <ソースバージョン>- のようにする. あとは新規パッケージと同様の手順でパッケージ化する. ■ deb パッケージ化: ソースが更新された場合. ソースが更新された場合(ここでは latex2html_2002-2-2 がリリースされたとする), 古いソースディレクトリにて $ uupdate -u latex2html-2002-2-2.tar.gz を実行する. これにより, 時動的にソースが更新される. 1 つ上のディレ クトリに新しいソースツリーが展開されているのでそちらへ移動し, あと は新規パッケージと同様の手順でパッケージ化する. うまくいかないときは, 古いソースツリー内の debian ディレクトリを新 しいソースツリーの debian ディレクトリへコピーし, 新しいソースツリー 直下で, $ dch -i などとする. あとは新規パッケージと同様の手順でパッケージ化する. ■ 参考文献 Josip Rodin 著, 八田真行, 佐野武俊 訳, 2002: debian 新メンテナガイド ver 1.2, http://www.jp.debian.org/doc/manuals/maint-guide/index.ja.html 竹野茂治, 2005: Latex2html について http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/ltx2html.html ========================================================================== 付録 debian ディレクトリのファイル conffiles ---------------------------------------------------------------- /etc/latex2html.conf control ------------------------------------------------------------------ Source: latex2html Section: tex Priority: optional Maintainer: SUGIYAMA Ko-ichiro Standards-Version: 2002-2-1 Build-Depends: debmake Package: latex2html Architecture: all Depends: perl, netpbm (>= 2:9.20), gs, tetex-bin (>= 1.0.7+20001218), tetex-extra Description:LaTeX to HTML translator (with JP patch). This package is a LATEX2HTML with some extensions for Japanese, Dennou.sty and Dennou6.sty. README.Debian ----------------------------------------------------------- latex2html for Debian ---------------------- LaTeX to HTML translator (with JP patch). This package is a LATEX2HTML with some extensions for Japanese, Dennou.sty and Dennou6.sty. Original Japanese patch set, l2h-2002-2-1+jp1.8.patch.gz, amsmath-bug2.patch, can be downloaded from http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/ltx2html.html#pa_dist. Followings are the orignal description of LATEX2HTML debian package. Original patch for Dennou.sty, Dennou6.sty is made by TAKEHIRO Shin-Ichi, and can be downloaded from http://www.gfd-dennou.org/arch/cc-env/latex2html/OLD/. LaTeX2HTML is a conversion tool that that converts documents written in LaTeX to HTML format. In addition, it offers an easy migration path towards authoring complex hypermedia documents using familiar word-processing concepts. SUGIYAMA Ko-ichiro , Mon, 4 Oct 2004 11:56:09 +0900 changelog --------------------------------------------------------------- latex2html (2002-2-1+jp+dennou-1) unstable; urgency=low * Japanese patch l2h-2002-2-1+jp1.8.patch.gz is applied. * Style files for Dennou.sty, Dennou6.sty are added. -- SUGIYAMA Ko-ichiro Mon, 4 Oct 2004 11:56:09 +0900 copyright --------------------------------------------------------------- This package was debianized by sugiyama sugiyama(at)gfd-dennou.org on Mon, 4 Oct 2004 11:56:09 +0900. It was downloaded from http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/ltx2html.html#pa_dist http://www.gfd-dennou.org/arch/cc-env/latex2html/OLD/ Copyright: JP patch for LaTeX2HTML ================== See http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/ltx2html.html#pa_license Dennou patch for LaTeX2HTML ================== See README.patch-dennou LaTeX2HTML License ================== Original Copyright notice: LaTeX2HTML by Nikos Drakos Some portions of this package are published under the GNU public license. These are clearly marked in the header. **************************************************************** General License Agreement and Lack of Warranty ***************** **************************************************************** This software is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY. The author(s) do not accept responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all. No warranty is made about the software or its performance. Use and copying of this software and the preparation of derivative works based on this software are permitted, so long as the following conditions are met: o The copyright notice and this entire notice are included intact and prominently carried on all copies and supporting documentation. o No fees or compensation are charged for use, copies, or access to this software. You may charge a nominal distribution fee for the physical act of transferring a copy, but you may not charge for the program itself. o If you modify this software, you must cause the modified file(s) to carry prominent notices (a Change Log) describing the changes, who made the changes, and the date of those changes. o Any work distributed or published that in whole or in part contains or is a derivative of this software or any part thereof is subject to the terms of this agreement. The aggregation of another unrelated program with this software or its derivative on a volume of storage or distribution medium does not bring the other program under the scope of these terms. This software is made available AS IS, and is distributed without warranty of any kind, either expressed or implied. In no event will the author(s) or their institutions be liable to you for damages, including lost profits, lost monies, or other special, incidental or consequential damages arising out of or in connection with the use or inability to use (including but not limited to loss of data or data being rendered inaccurate or losses sustained by third parties or a failure of the program to operate as documented) the program, even if you have been advised of the possibility of such damages, or for any claim by any other party, whether in an action of contract, negligence, or other tortious action.