Changes between Version 5 and Version 6 of OSGeo4W_jp/PackagingInstructions


Ignore:
Timestamp:
Feb 16, 2010, 11:41:30 PM (14 years ago)
Author:
hfujii
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OSGeo4W_jp/PackagingInstructions

    v5 v6  
    33= 概要 =
    44
    5 OSGeo4W packages are each bzip2 compressed .tar files intended to be unpacked in the OSGeo4W root directory.  They come with setup.hint files designed to describe dependencies and a package description.
     5OSGeo4W パッケージは、それぞれ bzip2 圧縮された.tar ファイルで、OSGeo4W ルートディレクトリでunpackするよう意図されています。 依存性とパッケージ説明を記述するようデザインされた setup.hint ファイルと一緒になっています。
    66
    77== パッケージディレクトリのレイアウト ==
    88
    9 The installed OSGeo4W directory tree is described in DirectoryLayout.
     9インストールされた OSGeo4W ディレクトリツリーは DirectoryLayout に記述されています。
    1010
    11 OSGeo4W packages are generally structured like packages for Cygwin as described at http://cygwin.com/setup.html .
     11通常 OSGeo4W パッケージは http://cygwin.com/setup.html で説明されている Cygwin のパッケージのように構築されています。
    1212
    13 Packages prepared for OSGeo4W are currently uploaded to:
     13OSGeo4W 用のパッケージは現在次の場所にアップロードされています:
    1414
    1515 upload.osgeo.org:/osgeo/download/osgeo4w/release/<package>
    1616
    17 This tree can be reviewed at: http://download.osgeo.org/osgeo4w/release
     17このツリーは次でレビューが可能です: http://download.osgeo.org/osgeo4w/release
    1818
    19 Each package directory should have a single setup.hint file, and one or more versions of that package as a .tar.bz2 file.  These should normally have names like gdal-1.5.0-1.tar.bz2 where "1.5.0" is the version of GDAL that was packaged, and "-1" indicates the version of the packaging attempt.  The directory can also contain corresponding source snapshots named like gdal-1.5.0-1-src.tar.bz2.   Note that the basename should exactly match the directory in which the package is found.  So the "gdal" directory has gdal-<version>-<revision>.tar.bz2 package files. 
     19各パッケージディレクトリは1つの setup.hint ファイルを所有しており、.tar.bz2 ファイルとしてそのパッケージの1つまたはそれ以上のバージョンを所有しています。これらは通常、 "1.5.0" がパッケージされていたGDALのバージョンで "-1" がパッケージを試みるバージョンを指す場所では gdal-1.5.0-1.tar.bz2 のような名前を持っています。 ディレクトリはまた、gdal-1.5.0-1-src.tar.bz2 のように名付けられた対応するソーススナップショットを含むことが可能です。ベースネームはパッケージが見つかったディレクトリと完全に一致していなければなりません。ですから "gdal" ディレクトリは gdal-<version>-<revision>.tar.bz2 パッケージファイルを持っていることになります。
    2020
    21 Sometimes a single project is packaged as several packages. In this case component packages are normally created as subdirectories of the primary directory. So, for instance the Oracle 10g driver for GDAL is kept in the release/gdal/gdal-oracle10g directory and packaged as gdal-oracle10g-1.5.0-1.tar.bz2.
    2221
    23 '''Note:''' Please use `tar` & `bzip2` from osgeo4w's msys (%OSGEO4W_ROOT%\apps\msys\bin). Don't use 7zip as setup.exe can't understand the archives it creates, and there is mixed success with gnuwin32 bzip2 and cygwin bzip2. Linux tar/bzip2 has no reported problems. (see ticket #101)
     221つのプロジェクトがいくつかのパッケージとしてパッケージされている場合があります。このようなケースでは、パッケージは通常primaryディレクトリのサブディレクトリとして作成されています。例えば、GDAL の Oracle 10g ドライバーは release/gdal/gdal-oracle10g ディレクトリに保管され gdal-oracle10g-1.5.0-1.tar.bz2 としてパッケージされています。
     23
     24
     25'''Note:''' osgeo4w の msys (%OSGEO4W_ROOT%\apps\msys\bin) から `tar` と `bzip2` を使用してください。setup.exe は作成されるアーカイブをunderstandできないため、7zip は使用しないでください。Linux tar/bzip2 によって報告されている問題はありません。(チケット #101 を参照)
     26
    2427
    2528== ウェブアプリケーションパッケージのガイドライン ==
     
    2730重要なガイドライン:
    2831
    29  * the /osgeo4w/apps/ directory exists to hold applications.  Your application must be installed in a subdirectory of the /osgeo4w/apps/ directory, preferably with a meaningful name (in lowercase).
    30  * the Apache alias "/ms_tmp/" exists to access temporary web-accessible files, which points to the directory /osgeo4w/tmp/ms_tmp/
    31  * the Apache alias "/cgi-bin/" points to the /osgeo4w/bin/ folder.  e.g. mapserv.exe lives in the /bin folder.
    32  * the /osgeo4w/httpd.d/ directory exists to hold Apache Alias Files.  This directory is automatically scanned by Apache when it starts.  The following is an alias example for an application named 'foobar':
     32 * /osgeo4w/apps/ ディレクトリはアプリケーションをの保管します。 なるべく意味のある名前(小文字で)を用いて /osgeo4w/apps/ ディレクトリのサブディレクトリにアプリケーションをインストールしてください。
     33 * アパッチエイリアス "/ms_tmp/" は、/osgeo4w/tmp/ms_tmp/ ディレクトリを指す一時的な web-accessible ファイルにアクセスします。
     34 * アパッチエイリアス "/cgi-bin/" は /osgeo4w/bin/ フォルダーを指しています。 例 mapserv.exe は /bin フォルダにあります。
     35 * /osgeo4w/httpd.d/ ディレクトリは アパッチエイリアスファイルを所有しています。このディレクトリは開始すると自動的にアパッチによってスキャンされます。 以下は 'foobar' という名前のアプリケーションのエイリアスの例です:
    3336
    3437{{{
     
    4447           httpd_*.conf
    4548}}}
    46 Normally, you would replace * with your application name.  In the above example, the application would use httpd_foobar.conf in the /OSGEO4W/httpd.d/ directory.  This would allow the user to connect to http://localhost/foobar/
    47 to access the application.
     49通常、* をアプリケーションの名前に置き換えます。  上記の例では、アプリケーションは /OSGEO4W/httpd.d/ ディレクトリにおいて httpd_foobar.conf を使用しています。これはアプリケーションにアクセスするためユーザーの http://localhost/foobar/ への接続を可能にします。
    4850
    49  * All web applications should include a small .pkg file in the /osgeo4w/apache/htdocs/ folder so that a link to the application is displayed on the OSGeo4W index page (localhost).  This 'Index Package File' provides a small HTML snippet that is automatically included in the OSGeo4W index page.  This HTML snippet should provide a brief description of your application and provide links to access the aliases you have provided via the Apache Alias File.  The Index Package File follows a strict naming convention:
     51 * アプリケーションへのリンクが OSGeo4W インデックスページ (ローカルホスト) に表示されるよう、全てのウェブアプリケーションは小さい .pkg ファイルを /osgeo4w/apache/htdocs/ フォルダに含むべきです。  
     52
     53この 'Index Package File' は 自動的に OSGeo4W インデックスページに含まれる小さい HTML スニペット を提供します。 この HTML スニペット はアプリケーションの短い説明とアパッチエイリアスファイルを通じて提供しているエイリアスにアクセスするリンクを提供します。 インデックスパッケージファイルは厳密な命名規約 naming convention に従っています:
    5054{{{
    5155   packagename.pkg.html
    5256}}}
    53 Only files that end in .pkg.html will be included in the index page.  Here is an example of a .pkg file (named 'foobar.pkg.html):
     57.pkg.html で終わるファイルのみがインデックスページに含まれます。  ここに .pkg ファイルの例があります ('foobar.pkg.html と名付けられています):
    5458{{{
    5559   <pre><h3>Foobar Application</h3>
     
    5862== setup.hint ==
    5963
    60 Each package directory has a setup.hint file which normally contains the short and long description for the package, and the list of other packages on which it depends.  Note that there is normally only one setup.hint file for a package even if several versions of the package exist.  A normal setup.hint file might look like::
     64各パッケージディレクトリは通常、パッケージの長短の記述そして依存する他のパッケージのリストを含む setup.hint ファイルを所有しています。 パッケージにいくつかのバージョンがある場合でも、パッケージには setup.hint ファイルは通常1つのみです。 通常の setup.hint ファイルは次のようになります::
    6165{{{
    6266 sdesc: "The Libgeotiff library, commandline tools and supporting tables."
     
    6670 requires: msvcrt libtiff
    6771}}}
    68 This indicates the short and long description for the package, the list of categories it will appear in for the installer user interface, and the package it requires.
     72これはパッケージの長短の記述、インストーラーユーザーインターフェイスのためそれが現れるカテゴリーのリスト、そして要求するパッケージを指しています。This indicates the short and long description for the package, the list of categories it will appear in for the installer user interface, and the package it requires.
    6973
    7074
    7175== インストール後の動作 ==
    7276
    73 Packages may take post-install actions by including a .bat file in the /etc/postinstall directory as part of the package.  The filename should be named etc/postinstall/<package>.bat.  The bat file will be run with the environment variables OSGEO4W_STARTMENU, OSGEO4W_HOME and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path.
     77パッケージは、/etc/postinstall ディレクトリにある .bat ファイルをパッケージの一部として含むことによってpost-install actions をとることがあります。ファイル名は etc/postinstall/<package>.bat. と名付けられます。この bat ファイルは the environment variables OSGEO4W_STARTMENU, OSGEO4W_HOME and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path とともに実行されます
    7478
    75 One very common thing to do in postinstall actions is to insert/update configuration files to include the installed path to the OSGeo4W tree.  This is normally done with a postinstall file, and here are 2 examples::
     79postinstall actions でよく行われることの1つが、 OSGeo4W ツリーへのインストールされたパスを含むための設定ファイルの挿入/アップグレードです。 これは普通 postintall ファイルと処理され、ここにその例が2つあります::
    7680
    7781=== !TextReplace Example !#1 ===
    7882
    79  * hardcoded paths exist in the /httpd.d/httpd_gmap.conf file of the gmap package:
     83 * gmap パッケージの /httpd.d/httpd_gmap.conf ファイルにあるハードコードされたパス:
    8084{{{
    8185  Alias /gmap/ "C:/mypath/apps/gmap/htdocs/"
     
    8791  </Directory>
    8892}}}
    89  * the first step is to replace the hardcoded path in the file with the ''@osgeo4w@'' variable, in your favourite text editor.  For example the above file would then look like:
     93 * まず始めに、ファイルにあるハードコードされたパスを好みのテキスト編集で ''@osgeo4w@'' 変数に置き換えます。  例えば、上記のファイルは次のようになります:
    9094{{{
    9195  Alias /gmap/ "@osgeo4w@/apps/gmap/htdocs/"
     
    97101  </Directory>
    98102}}}
    99  * the second step is to create a postinstall script named gmap.bat (that lives at /etc/postinstall/ of the gmap package) to replace that variable with the actual user's install path:
     103 * 次に、その変数を実際のユーザーのインストールパスと置き換えるため、gmap.bat (gmap package の /etc/postinstall/ にあります) という名前の postinstall スクリプトを作成します:
    100104{{{
    101105  textreplace -sf httpd.d/httpd_gmap.conf -df httpd.d/httpd_gmap.conf -map @osgeo4w@ %OSGEO4W_ROOT%
     
    109113    -map @osgeo4w_msys@ "%OSGEO4W_ROOT_MSYS%"
    110114}}}
    111 Both examples use the bin/textreplace program (part of the msvcrt package).  The second example uses it with source file bin/gdal-config.tmpl and destination file bin/gdal-config and replaces occurances of @osgeo4w@ with the value of the OSGEO4W_ROOT environment variable, and @osgeo4w_msys@ with the value of the OSGEO4W_ROOT_MSYS environment variable.  The pattern of processing a file from a .tmpl version is sufficiently common that textreplace supports this short form for the same action:
     115どちらの例も bin/textreplace プログラム (msvcrt パッケージの一部)を使用しています.  2つ目の例はソースファイル bin/gdal-config.tmpl と 目的ファイル bin/gdal-config と一緒に使用し、@osgeo4w@ の occurances を OSGEO4W_ROOT 環境変数の値で置き換え、 @osgeo4w_msys@ を OSGEO4W_ROOT_MSYS 環境変数の値で置き換えます。 .tmpl バージョンからファイルをプロセスするパターンは十分に共通しているため、テキスト置換は同じ動作に対してこの short form をサポートしています:
    112116{{{
    113117 textreplace -std -t bin/gdal-config
    114118}}}
    115 This applies the "standard" conversions to file bin/gdal-config.tmpl and puts the results in bin/gdal-config
     119これは、"standard" 変換をファイル bin/gdal-config.tmpl に適用し bin/gdal-config に結果を挿入します。
    116120
    117121== ショートカットの作成 ==
    118122
    119 Another postinstall task that packages might do is to create shortcuts that will be available to launch a certain command. As its is the case for the textreplace executable, there is an utility binary xxmklink.exe that is available in the installer (part of the msvcrt package). By typing xxmklink, you can see all the options supported by this utility. Here are some examples on how it can be used in a post install file:
     123パッケージが行うもう1つの postinstall タスクは、特定のコマンドを起動するショートカットの作成です。 テキスト置換実行ファイルの場合のように、インストーラにあるユーティリティバイナリ xxmklink.exe (msvcrt パッケージの一部package) があります. xxmklink を入力することによって、このユーティリティがサポートしている全てのオプションを見ることができます。インストール後のファイルにおいての使用例をここにいくつか挙げておきます:
    120124{{{
    121125  mkdir "%OSGEO4W_STARTMENU%"
     
    134138}}}
    135139
    136 The postinstall scripts can run any DOS command or installed binary with desired arguments.
     140postinstall スクリプトは いかなる DOS コマンドまたは設定する desired 引数のインストールされたバイナリを実行することが可能です。
    137141
    138142= シェルの初期化 =
    139143
    140 Some packages need to set particular environment variables.  For the OSGeo4W command shell this can be
    141 accomplished by adding an initialization file in etc/ini.  A typical example looks like::
     144特定の環境変数を設定する必要のあるパッケージもあります。 OSGeo4W コマンドシェルにとって、これは etc/ini にある初期化ファイルを追加することによって達成されます。 以下は典型的な例です::
    142145{{{
    143146 SET GDAL_DATA=%OSGEO4W_ROOT%\share\gdal
    144147}}}
    145 These scripts are run in random order by %OSGEO4W_ROOT%\OSGeo4W.bat when establishing the environment for the OSGeo4W shell.  The OSGEO4W_ROOt environment variable will always be set on the way in.
     148これらのスクリプトは、OSGeo4W シェルの環境構築の際に %OSGEO4W_ROOT%\OSGeo4W.bat によってランダムな順番で実行されます。 OSGEO4W_ROOt 環境変数は常にbe set on the way in.
    146149
    147150= アプリケーションバッチファイルのテンプレート =
    148 Sample of how to start an application with standard environment set. Replace `foo.exe` with your application executable and save as `foobar.bz2:bin/foo.bat.tmpl`. [#Post-InstallActions Post-Install] will set the proper OSGEO4W_ROOT.
     151標準環境設定でのアプリケーション開始方法のサンプル。`foo.exe` をアプリケーション実行可能ファイルで置き換え、 `foobar.bz2:bin/foo.bat.tmpl` として保存します。 [#Post-InstallActions Post-Install] は適切な OSGEO4W_ROOT を設定します。
    149152{{{
    150153@echo off
     
    157160== Setup.ini ==
    158161
    159 The Cygwin Setup.exe actually downloads the [http://download.osgeo.org/osgeo4w/setup.ini setup.ini] file with a list of all packages each time it is run.  This file should be recreated on the server by running the script invoking `osgeo4w-regen.sh` on the web each time packages are uploaded.  This produces a test version of the file (http://download.osgeo.org/osgeo4w/setup_test.ini), which can be used with the setup program by passing the -t commandline option.  Once this has been tested, using the link `osgeo4w-promote.sh` to copy this file to setup.ini, making it live for regular users.
     162Cygwin Setup.exe は、実行されるたびに[http://download.osgeo.org/osgeo4w/setup.ini setup.ini] ファイルを全パッケージのリストと共にダウンロードします。  このファイルはパッケージがアップロードされるたびにウェブ上にある`osgeo4w-regen.sh` を呼び出すスクリプトを実行することによってサーバに再作成されるべきです。 これは、passing the -t コマンドラインオプションをパスすることによってセットアッププログラムと一緒に使用可能なファイルのテストバージョンを作成します。 一度テストが行われたら 一般のユーザーが利用できるようリンク`osgeo4w-promote.sh` を用いてこのファイルを setup.ini にコピーします。
    160163
    161  * Generate test setup: `http://upload.osgeo.org/cgi-bin/osgeo4w-regen.sh`
    162  * Verify package version numbers (top of PackageListing)
    163  * Test by passing -t to setup program ([http://download.osgeo.org/osgeo4w/osgeo-setup_test-ini.bat osgeo-setup_test-ini.bat])
    164  * Promote test setup to live: `http://upload.osgeo.org/cgi-bin/osgeo4w-promote.sh`
     164 * テストセットアップの生成: `http://upload.osgeo.org/cgi-bin/osgeo4w-regen.sh`
     165 * パッケージバージョンナンバーの立証(PackageListing トップ)
     166 * -t を セットアッププログラムにパスすることによるテスト ([http://download.osgeo.org/osgeo4w/osgeo-setup_test-ini.bat osgeo-setup_test-ini.bat])
     167 * テストセットアップ実行の促進: `http://upload.osgeo.org/cgi-bin/osgeo4w-promote.sh`
    165168
    166169== 記録 ==
    167170
    168 Please ensure that you prepare a wiki page linked off [wiki:PackageListing] with info on your package.  It should include a pointer back to the upstream project, the name of the packager (a link to a page with contact info on the packager), and special notes on where things are placed within OSGeo4W.
     171wiki ページがパッケージにある情報にリンクされていないことを確認してください [wiki:PackageListing] 。 端末からサーバへのプロジェクトに戻るポインター、packager の名前 (packager のコンタクト情報が記載されているページへのリンク)、そしてOSGeo4W内のどこに置かれているかの特別なノートを含みます。
    169172
    170173[wiki:OSGeo4W_jp 戻る]