Changes between Version 5 and Version 6 of OSGeo4W_jp/PackagingInstructions
- Timestamp:
- 02/16/10 23:41:30 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OSGeo4W_jp/PackagingInstructions
v5 v6 3 3 = 概要 = 4 4 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.5 OSGeo4W パッケージは、それぞれ bzip2 圧縮された.tar ファイルで、OSGeo4W ルートディレクトリでunpackするよう意図されています。 依存性とパッケージ説明を記述するようデザインされた setup.hint ファイルと一緒になっています。 6 6 7 7 == パッケージディレクトリのレイアウト == 8 8 9 The installed OSGeo4W directory tree is described in DirectoryLayout. 9 インストールされた OSGeo4W ディレクトリツリーは DirectoryLayout に記述されています。 10 10 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 のパッケージのように構築されています。 12 12 13 Packages prepared for OSGeo4W are currently uploaded to:13 OSGeo4W 用のパッケージは現在次の場所にアップロードされています: 14 14 15 15 upload.osgeo.org:/osgeo/download/osgeo4w/release/<package> 16 16 17 This tree can be reviewed at: http://download.osgeo.org/osgeo4w/release17 このツリーは次でレビューが可能です: http://download.osgeo.org/osgeo4w/release 18 18 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 パッケージファイルを持っていることになります。 20 20 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.22 21 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) 22 1つのプロジェクトがいくつかのパッケージとしてパッケージされている場合があります。このようなケースでは、パッケージは通常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 24 27 25 28 == ウェブアプリケーションパッケージのガイドライン == … … 27 30 重要なガイドライン: 28 31 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' という名前のアプリケーションのエイリアスの例です: 33 36 34 37 {{{ … … 44 47 httpd_*.conf 45 48 }}} 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/ への接続を可能にします。 48 50 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 に従っています: 50 54 {{{ 51 55 packagename.pkg.html 52 56 }}} 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 と名付けられています): 54 58 {{{ 55 59 <pre><h3>Foobar Application</h3> … … 58 62 == setup.hint == 59 63 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 ファイルは次のようになります:: 61 65 {{{ 62 66 sdesc: "The Libgeotiff library, commandline tools and supporting tables." … … 66 70 requires: msvcrt libtiff 67 71 }}} 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. 69 73 70 74 71 75 == インストール後の動作 == 72 76 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 とともに実行されます 74 78 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::79 postinstall actions でよく行われることの1つが、 OSGeo4W ツリーへのインストールされたパスを含むための設定ファイルの挿入/アップグレードです。 これは普通 postintall ファイルと処理され、ここにその例が2つあります:: 76 80 77 81 === !TextReplace Example !#1 === 78 82 79 * hardcoded paths exist in the /httpd.d/httpd_gmap.conf file of the gmap package:83 * gmap パッケージの /httpd.d/httpd_gmap.conf ファイルにあるハードコードされたパス: 80 84 {{{ 81 85 Alias /gmap/ "C:/mypath/apps/gmap/htdocs/" … … 87 91 </Directory> 88 92 }}} 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@'' 変数に置き換えます。 例えば、上記のファイルは次のようになります: 90 94 {{{ 91 95 Alias /gmap/ "@osgeo4w@/apps/gmap/htdocs/" … … 97 101 </Directory> 98 102 }}} 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 スクリプトを作成します: 100 104 {{{ 101 105 textreplace -sf httpd.d/httpd_gmap.conf -df httpd.d/httpd_gmap.conf -map @osgeo4w@ %OSGEO4W_ROOT% … … 109 113 -map @osgeo4w_msys@ "%OSGEO4W_ROOT_MSYS%" 110 114 }}} 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 をサポートしています: 112 116 {{{ 113 117 textreplace -std -t bin/gdal-config 114 118 }}} 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 に結果を挿入します。 116 120 117 121 == ショートカットの作成 == 118 122 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 を入力することによって、このユーティリティがサポートしている全てのオプションを見ることができます。インストール後のファイルにおいての使用例をここにいくつか挙げておきます: 120 124 {{{ 121 125 mkdir "%OSGEO4W_STARTMENU%" … … 134 138 }}} 135 139 136 The postinstall scripts can run any DOS command or installed binary with desired arguments. 140 postinstall スクリプトは いかなる DOS コマンドまたは設定する desired 引数のインストールされたバイナリを実行することが可能です。 137 141 138 142 = シェルの初期化 = 139 143 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 にある初期化ファイルを追加することによって達成されます。 以下は典型的な例です:: 142 145 {{{ 143 146 SET GDAL_DATA=%OSGEO4W_ROOT%\share\gdal 144 147 }}} 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 alwaysbe set on the way in.148 これらのスクリプトは、OSGeo4W シェルの環境構築の際に %OSGEO4W_ROOT%\OSGeo4W.bat によってランダムな順番で実行されます。 OSGEO4W_ROOt 環境変数は常にbe set on the way in. 146 149 147 150 = アプリケーションバッチファイルのテンプレート = 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 を設定します。 149 152 {{{ 150 153 @echo off … … 157 160 == Setup.ini == 158 161 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.162 Cygwin Setup.exe は、実行されるたびに[http://download.osgeo.org/osgeo4w/setup.ini setup.ini] ファイルを全パッケージのリストと共にダウンロードします。 このファイルはパッケージがアップロードされるたびにウェブ上にある`osgeo4w-regen.sh` を呼び出すスクリプトを実行することによってサーバに再作成されるべきです。 これは、passing the -t コマンドラインオプションをパスすることによってセットアッププログラムと一緒に使用可能なファイルのテストバージョンを作成します。 一度テストが行われたら 一般のユーザーが利用できるようリンク`osgeo4w-promote.sh` を用いてこのファイルを setup.ini にコピーします。 160 163 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` 165 168 166 169 == 記録 == 167 170 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. 171 wiki ページがパッケージにある情報にリンクされていないことを確認してください [wiki:PackageListing] 。 端末からサーバへのプロジェクトに戻るポインター、packager の名前 (packager のコンタクト情報が記載されているページへのリンク)、そしてOSGeo4W内のどこに置かれているかの特別なノートを含みます。 169 172 170 173 [wiki:OSGeo4W_jp 戻る]