Sign in Join
Wiki copytemporary

How to setup a FPC and Lazarus Ubuntu repository/ja: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-**日本語版メニュー**
2----
3-[[Main Page/ja|メインページ]] \- [[Lazarus Documentation/ja|Lazarus Documentation日本語版]] \- [[Japanese Localization Notes|翻訳ノート]] \- [[Bug Tracking/ja|日本語障害情報]]
4-
5-## Contents
6-
7- * 1 ダウンローダー達へ!
8- * 2 リポジトリーとは?
9- * 3 誰のために必要なのか?
10- * 4 ディレクトリの構造
11- * 5 deb ファイル
12- * 5.1 自分で deb ファイルを作成する
13- * 5.1.1 開発用パッケージをインストールする
14- * 5.1.2 新しい deb ファイルを構築する
15- * 5.1.3 リポジトリの deb ファイルを置き換える
16- * 6 PGP Key
17- * 6.1 Creating a PGP key
18- * 6.2 Upload the key to a public key server
19- * 6.3 Remember the key ID
20- * 7 Updating repository files
21- * 8 Adding the repository to a client
22- * 8.1 Add the key
23- * 8.2 Add the repository
24- * 9 Install Lazarus
25-
261## ダウンローダー達へ!
272
28-もし Lazarus をダウンロードしたいだけであれば、[[Getting Lazarus|Ubuntu リポジトリ]]を使えばいいだけのことです。
3+もし Lazarus をダウンロードしたいだけであれば、[[Getting Lazarus|Ubuntu リポジトリを]]使えばいいだけのことです。
294
30-このページは、自分専用リポジトリーのセットアップ方法について記述したもので、普通のユーザーにはあまり意味のないものです。(訳者注:ローカルリポジトリまで作成するほどのものではないが、Ubuntu 上で最新の Lazarus を使いたい、という方にとってもかなり有用な情報になると思います)
5+このページは、自分専用リポジトリーのセットアップ方法について記述したもので、普通のユーザーにはあまり意味のないものです。(訳者注:ローカルリポジトリまで作成するほどのものではないが、Ubuntu 上で最新の Lazarus を使いたい、という方にとってもかなり有用な情報になると思います)
316
327## リポジトリーとは?
338
34-ubuntu のリポジトリーはディレクトリーです。ローカルディスク上、ウェブサーバー上、または、FTP サーバー上に構築することができます。 使用するには、そのパスを /etc/apt/sources.list に加え、PGP 鍵をセットアップします。それによりお気に入りのパッケージマネージャ(package gui、例えば synaptic)を使って Lazarus をシンプルにインストールでき、fpc、fpc-src、Lazarus らのダウンロード、インストール、アップデートが自動化されます。
9+ubuntu のリポジトリーはディレクトリーです。ローカルディスク上、ウェブサーバー上、または、FTP サーバー上に構築することができます。 使用するには、そのパスを /etc/apt/sources.list に加え、PGP 鍵をセットアップします。それによりお気に入りのパッケージマネージャ(package gui、例えば synaptic)を使って Lazarus をシンプルにインストールでき、fpc、fpc-src、Lazarus らのダウンロード、インストール、アップデートが自動化されます。
3510
3611## 誰のために必要なのか?
3712
38-FPC+Lazarus をコンピュータのプール上からインストールすることを望む管理者。学校のような。または、即時のテストを望む初心者。
13+FPC+Lazarus をコンピュータのプール上からインストールすることを望む管理者。学校のような。または、即時のテストを望む初心者。
3914
4015## ディレクトリの構造
4116
42-リポジトリを apache ウェブサーバーを利用して作成したいものと仮定します。そうであるなら public に読み出し可能で root だけが書き込み権限を持つ /var/www/lazarus のようなディレクトリを作成する必要があります。
17+リポジトリを apache ウェブサーバーを利用して作成したいものと仮定します。そうであるなら public に読み出し可能で root だけが書き込み権限を持つ /var/www/lazarus のようなディレクトリを作成する必要があります。
4318
44-サポートしたいターゲットOS向けのサブディレクトリを作成してください。:
45-```
46-mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-i386
47- mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-amd64
48-```
19+サポートしたいターゲットOS向けのサブディレクトリを作成してください。:
4920
21+` mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-i386`\
22+` mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-amd64`
23+
5024## deb ファイル
5125
52-fpc、 fpc-src、 lazarus の deb ファイルをそこに置いてください。
26+fpc、 fpc-src、 lazarus の deb ファイルをそこに置いてください。
5327
5428### 自分で deb ファイルを作成する
5529
56-Lazarus に付属の tools/install/ 内のスクリプトを使って deb ファイルを作成できます。
30+Lazarus に付属の tools/install/ 内のスクリプトを使って deb ファイルを作成できます。
5731
5832#### 開発用パッケージをインストールする
5933
60- * 開発用パッケージをインストールする。:
34+- 開発用パッケージをインストールする。:
6135
62-```
63-sudo apt-get install libgtk2.0-dev libgtk1.2-dev libgdk-pixbuf-dev libgpmg1-dev fakeroot libncurses5-dev
64- (訳者注:とりあえず
65- sudo apt-get install fakeroot
66- だけやっておけば、次の
67- sudo apt-get install fpc
68- で他の依存関係は自動調整してくれるようです)
69-```
36+` sudo apt-get install libgtk2.0-dev libgtk1.2-dev libgdk-pixbuf-dev libgpmg1-dev fakeroot libncurses5-dev`\
37+` (訳者注:とりあえず`\
38+`   sudo apt-get install fakeroot`\
39+`   だけやっておけば、次の`\
40+`   sudo apt-get install fpc`\
41+`   で他の依存関係は自動調整してくれるようです)`
7042
71- * FPC の最終安定版をインストールする。新しい FPC や Lazarus をビルドするために必要です。:
43+- FPC の最終安定版をインストールする。新しい FPC や Lazarus をビルドするために必要です。:
7244
73-```
74-deb ファイルか tar.gz ファイルをオフィシャルサイトから入手してください。
75- 例:
76- sudo apt-get install fpc
77-```
45+` deb ファイルか tar.gz ファイルをオフィシャルサイトから入手してください。`\
46+` 例:`\
47+`   sudo apt-get install fpc`
7848
79- * FPC のソースをダウンロードします。現在開発中のバージョンを使うなら下記のコマンドが使えます。より安定したバージョンを取得するなら [[Installing Lazarus|Installing_Lazarus#FPC Sources]] を参照してください(訳者注:多くの方は FPC の安定版を使うと思いますので、通常は「sudo apt-get install fpc-source」でインストールできます。仮に公式リポジトリの FPC のバージョンが FPC サイトで配布されている安定版より古い場合は、 <ftp://ftp.freepascal.org/pub/fpc/dist/> から入手した deb ファイル郡を「sudo dpkg -i fp-*.deb」、「sudo dpkg -i fpc-*.deb」としてインストールし使えばよいだけです。通常は FPC 関係の deb を自分で作成する必要はなさそうです)。:
49+- FPC のソースをダウンロードします。現在開発中のバージョンを使うなら下記のコマンドが使えます。より安定したバージョンを取得するなら [[Installing Lazarus|Installing_Lazarus#FPC Sources]] を参照してください(訳者注:多くの方は FPC の安定版を使うと思いますので、通常は「sudo apt-get install fpc-source」でインストールできます。仮に公式リポジトリの FPC のバージョンが FPC サイトで配布されている安定版より古い場合は、 <ftp://ftp.freepascal.org/pub/fpc/dist/> から入手した deb ファイル郡を「sudo dpkg -i fp-*.deb」、「sudo dpkg -i fpc-*.deb」としてインストールし使えばよいだけです。通常は FPC 関係の deb を自分で作成する必要はなさそうです)。:
8050
81-```
82-svn co <http://svn.freepascal.org/svn/fpc/trunk> fpc
83-```
51+` svn co `[`http://svn.freepascal.org/svn/fpc/trunk`](http://svn.freepascal.org/svn/fpc/trunk)` fpc`
8452
85- * Lazarus のソースをダウンロードします(訳者注: svn は sudo apt-get install subversion とすることでインストールできます)。:
53+- Lazarus のソースをダウンロードします(訳者注: svn は sudo apt-get install subversion とすることでインストールできます)。:
8654
87-```
88-svn co <http://svn.freepascal.org/svn/lazarus/trunk> lazarus
89-```
55+` svn co `[`http://svn.freepascal.org/svn/lazarus/trunk`](http://svn.freepascal.org/svn/lazarus/trunk)` lazarus`
9056
9157#### 新しい deb ファイルを構築する
9258
93- * Lazarus インストールスクリプトディレクトリに移動する。:
59+- Lazarus インストールスクリプトディレクトリに移動する。:
9460
95-```
96-cd lazarus/tools/install
97-```
61+` cd lazarus/tools/install`
9862
99- * FPC の deb ファイルを構築する(訳者注:安定版を使う場合は <ftp://ftp.freepascal.org/pub/fpc/dist/> から入手すればよいので不要です)。The following script will build a single fpc deb using the date as version. As parameter you must specify the path of the FPC sources you downloaded above:
63+- FPC の deb ファイルを構築する(訳者注:安定版を使う場合は <ftp://ftp.freepascal.org/pub/fpc/dist/> から入手すればよいので不要です)。The following script will build a single fpc deb using the date as version. As parameter you must specify the path of the FPC sources you downloaded above:
10064
101-```
102-sudo ./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/
103-```
65+` sudo ./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/`
10466
105- * 新しい fpc の deb ファイルをインストールします(訳者注:安定版を使う場合は不要です)。これは Lazarus の deb ファイルを構築するために必要となります。最初に古い FPC をアンインストールすることを忘れないでください。
67+- 新しい fpc の deb ファイルをインストールします(訳者注:安定版を使う場合は不要です)。これは Lazarus の deb ファイルを構築するために必要となります。最初に古い FPC をアンインストールすることを忘れないでください。
10668
107-```
108-sudo dpkg -i fpc_2.3.1-070726_i386.deb
109-```
69+` sudo dpkg -i fpc_2.3.1-070726_i386.deb`
11070
111- * fpc-src の deb ファイルを構築します(訳者注:安定版を使う場合は不要です)。この作業は上の作業とほぼ同じです。:
71+- fpc-src の deb ファイルを構築します(訳者注:安定版を使う場合は不要です)。この作業は上の作業とほぼ同じです。:
11272
113-```
114-./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/
115-```
73+` ./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/`
11674
117- * Lazarus の deb ファイルを構築する。 gtk2 版の通常の Lazarus を構築する場合:
75+- Lazarus の deb ファイルを構築する。 gtk2 版の通常の Lazarus を構築する場合:
11876
119-```
120-./create_lazarus_deb.sh append-revision
121-```
77+` ./create_lazarus_deb.sh append-revision`
12278
123-gtk1 版の場合:
124-```
125-./create_lazarus_deb.sh gtk1 append-revision
126-```
79+gtk1 版の場合:
12780
128-(訳者注:以上の手順で完成した Lazarus の deb ファイルを「sudo dpkg -i lazarus*.deb」としてインストールすれば最新の Lazarus を Ubuntu 上で使うことができます。ローカルリポジトリまでは必要ない方は、以下の作業は不要ということになります)
81+` ./create_lazarus_deb.sh gtk1 append-revision`
12982
83+(訳者注:以上の手順で完成した Lazarus の deb ファイルを「sudo dpkg -i lazarus*.deb」としてインストールすれば最新の Lazarus を Ubuntu 上で使うことができます。ローカルリポジトリまでは必要ない方は、以下の作業は不要ということになります)
84+
13085#### リポジトリの deb ファイルを置き換える
13186
132-Now you have 3 deb files.
87+Now you have 3 deb files.
13388
134-You can install them directly, but first un-install the build version
89+You can install them directly, but first un-install the build version
13590
136- * If you installed fp-compiler you will need to:
91+- If you installed fp-compiler you will need to:
13792
138-```
139-dpkg -r fp-compiler fp-units-rtl fp-compiler
140-```
93+`dpkg -r fp-compiler fp-units-rtl fp-compiler `
14194
142- * Copy them to your repository:
95+- Copy them to your repository:
14396
144-```
145-cp fpc_2.3.1-070726_i386.deb fpc-src_2.3.1-070726_i386.deb lazarus_0.9.23.11636-0_i386.deb \
146- /var/www/lazarus/dists/lazarus-testing/universe/binary-i386/
147-```
97+` cp fpc_2.3.1-070726_i386.deb fpc-src_2.3.1-070726_i386.deb lazarus_0.9.23.11636-0_i386.deb \`\
98+`   /var/www/lazarus/dists/lazarus-testing/universe/binary-i386/`
14899
149- * Don't forget to remove the old ones.
100+- Don't forget to remove the old ones.
150101
151102## PGP Key
152103
153-You need to sign the debs with a PGP key, so that the target systems can be sure, that no evil-doer replaced the files.
104+You need to sign the debs with a PGP key, so that the target systems can be sure, that no evil-doer replaced the files.
154105
155106### Creating a PGP key
156107
157-You can use tools like seahorse or thunderbird to create the PGP key.
108+You can use tools like seahorse or thunderbird to create the PGP key.
158109
159- * Install seahorse
160- * start seahorse
161- * Key > Create new key
162- * A window popup up asking for the type. Choose _PGP Key_.
163- * Give a full name and an email adress and click _Create_.
164- * The passphrase is needed to encrypt the created files. This way no one can use the keys but you, even if they manage to steal your files. If you think, your files will never stolen or read by others you can leave them empty.
165- * Creating the keys will take some minutes
110+- Install seahorse
111+- start seahorse
112+- Key \> Create new key
113+- A window popup up asking for the type. Choose *PGP Key*.
114+- Give a full name and an email adress and click *Create*.
115+- The passphrase is needed to encrypt the created files. This way no one can use the keys but you, even if they manage to steal your files. If you think, your files will never stolen or read by others you can leave them empty.
116+- Creating the keys will take some minutes
166117
167118### Upload the key to a public key server
168119
169-In order to share the key you can upload the key to a public key server.
120+In order to share the key you can upload the key to a public key server.
170121
171- * start seahorse
172- * Edit > Preferences > Key servers > Publish key to: choose a key server. For example: hkp://pgp.mit.edu:11371. Close the dialog.
173- * Remote > Sync and publish key > Sync.
122+- start seahorse
123+- Edit \> Preferences \> Key servers \> Publish key to: choose a key server. For example: hkp://pgp.mit.edu:11371. Close the dialog.
124+- Remote \> Sync and publish key \> Sync.
174125
175126### Remember the key ID
176127
177-You need the key ID later. The key ID is shown in seahorse. But you can see it also via:
178-```
179-gpg --list-keys
180-```
128+You need the key ID later. The key ID is shown in seahorse. But you can see it also via:
181129
130+` gpg --list-keys`
131+
182132## Updating repository files
183133
184-Put the following script into /var/www/lazarus, edit it for your needs and run it:
185-```
186-#!/usr/bin/env bash
187-
134+Put the following script into /var/www/lazarus, edit it for your needs and run it:
135+
136+ #!/usr/bin/env bash
137+
188138 set -x
189-
139+
190140 GPGHome=/home/gaertner/.gnupg/
191141 MainDir=dists/lazarus-testing
192-
142+
193143 for Arch in i386 amd64; do
194144 Dir=$MainDir/universe/binary-$Arch
195-
145+
196146 # create index
197147 apt-ftparchive packages $Dir > $Dir/Packages
198148 cat $Dir/Packages | gzip -9c > $Dir/Packages.gz
199149 cat $Dir/Packages | bzip2 > $Dir/Packages.bz2
200150 done
201-
151+
202152 # create Release file
203153 rm -f $MainDir/Release*
204154 Date=`date`
205155 echo "Origin: Lazarus" >> $MainDir/Release
206156 echo "Label: Lazarus" >> $MainDir/Release
207157 echo "Suite: unstable" >> $MainDir/Release
208158 echo "Codename: lazarus-testing" >> $MainDir/Release
209159 echo "Version: 1.0" >> $MainDir/Release
210160 echo "Date: $Date" >> $MainDir/Release
211161 echo "Architectures: amd64 i386" >> $MainDir/Release
212162 echo "Components: universe" >> $MainDir/Release
213163 echo "Description: Lazarus testing 1.0" >> $MainDir/Release
214-
164+
215165 apt-ftparchive release $MainDir >> $MainDir/Release
216-
166+
217167 # sign Release file
218168 gpg --sign --homedir=$GPGHome -ba -o $MainDir/Release.gpg $MainDir/Release
219-
169+
220170 # end.
221-```
222171
223-This will create index files _Packages_ , _Packages.bz2_ and _Packages.gz_. And it will create the _Release_ file containing the checksums of the deb packages and sign it (_Release.gpg_).
172+This will create index files *Packages*, *Packages.bz2* and *Packages.gz*. And it will create the *Release* file containing the checksums of the deb packages and sign it (*Release.gpg*).
224173
225174## Adding the repository to a client
226175
227-_IMPORTANT_ : If you only came here to download lazarus for ubuntu/debian then use the stable repository [[Getting Lazarus|Ubuntu repository]]. The repository below is an unstable, testing repository.
176+*IMPORTANT*: If you only came here to download lazarus for ubuntu/debian then use the stable repository [[Getting Lazarus|Ubuntu repository]]. The repository below is an unstable, testing repository.
228177
229-The following steps must be done on each computer, you want to use your repository.
178+The following steps must be done on each computer, you want to use your repository.
230179
231180### Add the key
232181
233-Download the key from the public key server:
234-```
235-gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 3A5B1204
236-```
182+Download the key from the public key server:
237183
238-The 3A5B1204 should be replaced with your key id. Check the output, that you got the right key.
184+` gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 3A5B1204`
239185
240-Add it to the apt system:
241-```
242-gpg --export 3A5B1204 | sudo apt-key add -
243-```
186+The 3A5B1204 should be replaced with your key id. Check the output, that you got the right key.
244187
245-You can see the list of apt keys with:
246-```
247-sudo apt-key list
248-```
188+Add it to the apt system:
249189
190+` gpg --export 3A5B1204 | sudo apt-key add -`
191+
192+You can see the list of apt keys with:
193+
194+` sudo apt-key list`
195+
250196### Add the repository
251197
252-You can use synaptic for this or edit the /etc/apt/sources.list directly. Add the line:
253-```
254-deb <http://progprak.scale.uni-koeln.de/lazarus/> lazarus-testing universe
255-```
198+You can use synaptic for this or edit the /etc/apt/sources.list directly. Add the line:
256199
257-Replace the http path with your own.
200+` deb `[`http://progprak.scale.uni-koeln.de/lazarus/`](http://progprak.scale.uni-koeln.de/lazarus/)` lazarus-testing universe`
258201
202+Replace the http path with your own.
203+
259204## Install Lazarus
260205
261-For example:
262-```
263-sudo apt-get update
264- sudo apt-get install lazarus
265-```
206+For example:
266207
208+` sudo apt-get update`\
209+` sudo apt-get install lazarus`
210+
267211---
268-*From the Free Pascal wiki, page "How to setup a FPC and Lazarus Ubuntu repository/ja", as the Internet Archive kept it on 2023-01-31. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
212+*From the Free Pascal wiki, page "How to setup a FPC and Lazarus Ubuntu repository/ja", as it stood on 2009-05-03 after a change by Malcome, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history