Sign in Join
Wiki copytemporary

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

Revision 1 to 2. 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+
126## ダウンローダー達へ!
227
3-もし Lazarus をダウンロードしたいだけであれば、[[Getting Lazarus|Ubuntu リポジトリを]]使えばいいだけのことです。
28+もし Lazarus をダウンロードしたいだけであれば、[[Getting Lazarus|Ubuntu リポジトリ]]を使えばいいだけのことです。
429
5-このページは、自分専用リポジトリーのセットアップ方法について記述したもので、普通のユーザーにはあまり意味のないものです。(訳者注:ローカルリポジトリまで作成するほどのものではないが、Ubuntu 上で最新の Lazarus を使いたい、という方にとってもかなり有用な情報になると思います)
30+このページは、自分専用リポジトリーのセットアップ方法について記述したもので、普通のユーザーにはあまり意味のないものです。(訳者注:ローカルリポジトリまで作成するほどのものではないが、Ubuntu 上で最新の Lazarus を使いたい、という方にとってもかなり有用な情報になると思います)
631
732## リポジトリーとは?
833
9-ubuntu のリポジトリーはディレクトリーです。ローカルディスク上、ウェブサーバー上、または、FTP サーバー上に構築することができます。 使用するには、そのパスを /etc/apt/sources.list に加え、PGP 鍵をセットアップします。それによりお気に入りのパッケージマネージャ(package gui、例えば synaptic)を使って Lazarus をシンプルにインストールでき、fpc、fpc-src、Lazarus らのダウンロード、インストール、アップデートが自動化されます。
34+ubuntu のリポジトリーはディレクトリーです。ローカルディスク上、ウェブサーバー上、または、FTP サーバー上に構築することができます。 使用するには、そのパスを /etc/apt/sources.list に加え、PGP 鍵をセットアップします。それによりお気に入りのパッケージマネージャ(package gui、例えば synaptic)を使って Lazarus をシンプルにインストールでき、fpc、fpc-src、Lazarus らのダウンロード、インストール、アップデートが自動化されます。
1035
1136## 誰のために必要なのか?
1237
13-FPC+Lazarus をコンピュータのプール上からインストールすることを望む管理者。学校のような。または、即時のテストを望む初心者。
38+FPC+Lazarus をコンピュータのプール上からインストールすることを望む管理者。学校のような。または、即時のテストを望む初心者。
1439
1540## ディレクトリの構造
1641
17-リポジトリを apache ウェブサーバーを利用して作成したいものと仮定します。そうであるなら public に読み出し可能で root だけが書き込み権限を持つ /var/www/lazarus のようなディレクトリを作成する必要があります。
18-
19-サポートしたいターゲットOS向けのサブディレクトリを作成してください。:
42+リポジトリを apache ウェブサーバーを利用して作成したいものと仮定します。そうであるなら public に読み出し可能で root だけが書き込み権限を持つ /var/www/lazarus のようなディレクトリを作成する必要があります。
2043
21-` mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-i386`\
22-` mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-amd64`
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+```
2349
2450## deb ファイル
2551
26-fpc、 fpc-src、 lazarus の deb ファイルをそこに置いてください。
52+fpc、 fpc-src、 lazarus の deb ファイルをそこに置いてください。
2753
2854### 自分で deb ファイルを作成する
2955
30-Lazarus に付属の tools/install/ 内のスクリプトを使って deb ファイルを作成できます。
56+Lazarus に付属の tools/install/ 内のスクリプトを使って deb ファイルを作成できます。
3157
3258#### 開発用パッケージをインストールする
3359
34-- 開発用パッケージをインストールする。:
60+ * 開発用パッケージをインストールする。:
3561
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-`   で他の依存関係は自動調整してくれるようです)`
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+```
4270
43-- FPC の最終安定版をインストールする。新しい FPC や Lazarus をビルドするために必要です。:
71+ * FPC の最終安定版をインストールする。新しい FPC や Lazarus をビルドするために必要です。:
4472
45-` deb ファイルか tar.gz ファイルをオフィシャルサイトから入手してください。`\
46-` 例:`\
47-`   sudo apt-get install fpc`
73+```
74+deb ファイルか tar.gz ファイルをオフィシャルサイトから入手してください。
75+ 例:
76+ sudo apt-get install fpc
77+```
4878
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 を自分で作成する必要はなさそうです)。:
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 を自分で作成する必要はなさそうです)。:
5080
51-` svn co `[`http://svn.freepascal.org/svn/fpc/trunk`](http://svn.freepascal.org/svn/fpc/trunk)` fpc`
81+```
82+svn co <http://svn.freepascal.org/svn/fpc/trunk> fpc
83+```
5284
53-- Lazarus のソースをダウンロードします(訳者注: svn は sudo apt-get install subversion とすることでインストールできます)。:
85+ * Lazarus のソースをダウンロードします(訳者注: svn は sudo apt-get install subversion とすることでインストールできます)。:
5486
55-` svn co `[`http://svn.freepascal.org/svn/lazarus/trunk`](http://svn.freepascal.org/svn/lazarus/trunk)` lazarus`
87+```
88+svn co <http://svn.freepascal.org/svn/lazarus/trunk> lazarus
89+```
5690
5791#### 新しい deb ファイルを構築する
5892
59-- Lazarus インストールスクリプトディレクトリに移動する。:
60-
61-` cd lazarus/tools/install`
93+ * Lazarus インストールスクリプトディレクトリに移動する。:
6294
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:
95+```
96+cd lazarus/tools/install
97+```
6498
65-` sudo ./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/`
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:
66100
67-- 新しい fpc の deb ファイルをインストールします(訳者注:安定版を使う場合は不要です)。これは Lazarus の deb ファイルを構築するために必要となります。最初に古い FPC をアンインストールすることを忘れないでください。
101+```
102+sudo ./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/
103+```
68104
69-` sudo dpkg -i fpc_2.3.1-070726_i386.deb`
105+ * 新しい fpc の deb ファイルをインストールします(訳者注:安定版を使う場合は不要です)。これは Lazarus の deb ファイルを構築するために必要となります。最初に古い FPC をアンインストールすることを忘れないでください。
70106
71-- fpc-src の deb ファイルを構築します(訳者注:安定版を使う場合は不要です)。この作業は上の作業とほぼ同じです。:
107+```
108+sudo dpkg -i fpc_2.3.1-070726_i386.deb
109+```
72110
73-` ./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/`
111+ * fpc-src の deb ファイルを構築します(訳者注:安定版を使う場合は不要です)。この作業は上の作業とほぼ同じです。:
74112
75-- Lazarus の deb ファイルを構築する。 gtk2 版の通常の Lazarus を構築する場合:
113+```
114+./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/
115+```
76116
77-` ./create_lazarus_deb.sh append-revision`
117+ * Lazarus の deb ファイルを構築する。 gtk2 版の通常の Lazarus を構築する場合:
78118
79-gtk1 版の場合:
119+```
120+./create_lazarus_deb.sh append-revision
121+```
80122
81-` ./create_lazarus_deb.sh gtk1 append-revision`
123+gtk1 版の場合:
124+```
125+./create_lazarus_deb.sh gtk1 append-revision
126+```
82127
83-(訳者注:以上の手順で完成した Lazarus の deb ファイルを「sudo dpkg -i lazarus*.deb」としてインストールすれば最新の Lazarus を Ubuntu 上で使うことができます。ローカルリポジトリまでは必要ない方は、以下の作業は不要ということになります)
128+(訳者注:以上の手順で完成した Lazarus の deb ファイルを「sudo dpkg -i lazarus*.deb」としてインストールすれば最新の Lazarus を Ubuntu 上で使うことができます。ローカルリポジトリまでは必要ない方は、以下の作業は不要ということになります)
84129
85130#### リポジトリの deb ファイルを置き換える
86131
87-Now you have 3 deb files.
132+Now you have 3 deb files.
88133
89-You can install them directly, but first un-install the build version
134+You can install them directly, but first un-install the build version
90135
91-- If you installed fp-compiler you will need to:
136+ * If you installed fp-compiler you will need to:
92137
93-`dpkg -r fp-compiler fp-units-rtl fp-compiler `
138+```
139+dpkg -r fp-compiler fp-units-rtl fp-compiler
140+```
94141
95-- Copy them to your repository:
142+ * Copy them to your repository:
96143
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/`
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+```
99148
100-- Don't forget to remove the old ones.
149+ * Don't forget to remove the old ones.
101150
102151## PGP Key
103152
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.
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.
105154
106155### Creating a PGP key
107156
108-You can use tools like seahorse or thunderbird to create the PGP key.
157+You can use tools like seahorse or thunderbird to create the PGP key.
109158
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
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
117166
118167### Upload the key to a public key server
119168
120-In order to share the key you can upload the key to a public key server.
169+In order to share the key you can upload the key to a public key server.
121170
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.
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.
125174
126175### Remember the key ID
127176
128-You need the key ID later. The key ID is shown in seahorse. But you can see it also via:
129-
130-` gpg --list-keys`
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+```
131181
132182## Updating repository files
133183
134-Put the following script into /var/www/lazarus, edit it for your needs and run it:
135-
136- #!/usr/bin/env bash
137-
184+Put the following script into /var/www/lazarus, edit it for your needs and run it:
185+```
186+#!/usr/bin/env bash
187+
138188 set -x
139-
189+
140190 GPGHome=/home/gaertner/.gnupg/
141191 MainDir=dists/lazarus-testing
142-
192+
143193 for Arch in i386 amd64; do
144194 Dir=$MainDir/universe/binary-$Arch
145-
195+
146196 # create index
147197 apt-ftparchive packages $Dir > $Dir/Packages
148198 cat $Dir/Packages | gzip -9c > $Dir/Packages.gz
149199 cat $Dir/Packages | bzip2 > $Dir/Packages.bz2
150200 done
151-
201+
152202 # create Release file
153203 rm -f $MainDir/Release*
154204 Date=`date`
155205 echo "Origin: Lazarus" >> $MainDir/Release
156206 echo "Label: Lazarus" >> $MainDir/Release
157207 echo "Suite: unstable" >> $MainDir/Release
158208 echo "Codename: lazarus-testing" >> $MainDir/Release
159209 echo "Version: 1.0" >> $MainDir/Release
160210 echo "Date: $Date" >> $MainDir/Release
161211 echo "Architectures: amd64 i386" >> $MainDir/Release
162212 echo "Components: universe" >> $MainDir/Release
163213 echo "Description: Lazarus testing 1.0" >> $MainDir/Release
164-
214+
165215 apt-ftparchive release $MainDir >> $MainDir/Release
166-
216+
167217 # sign Release file
168218 gpg --sign --homedir=$GPGHome -ba -o $MainDir/Release.gpg $MainDir/Release
169-
219+
170220 # end.
221+```
171222
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*).
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_).
173224
174225## Adding the repository to a client
175226
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.
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.
177228
178-The following steps must be done on each computer, you want to use your repository.
229+The following steps must be done on each computer, you want to use your repository.
179230
180231### Add the key
181232
182-Download the key from the public key server:
183-
184-` gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 3A5B1204`
185-
186-The 3A5B1204 should be replaced with your key id. Check the output, that you got the right key.
187-
188-Add it to the apt system:
233+Download the key from the public key server:
234+```
235+gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 3A5B1204
236+```
189237
190-` gpg --export 3A5B1204 | sudo apt-key add -`
238+The 3A5B1204 should be replaced with your key id. Check the output, that you got the right key.
191239
192-You can see the list of apt keys with:
240+Add it to the apt system:
241+```
242+gpg --export 3A5B1204 | sudo apt-key add -
243+```
193244
194-` sudo apt-key list`
245+You can see the list of apt keys with:
246+```
247+sudo apt-key list
248+```
195249
196250### Add the repository
197251
198-You can use synaptic for this or edit the /etc/apt/sources.list directly. Add the line:
199-
200-` deb `[`http://progprak.scale.uni-koeln.de/lazarus/`](http://progprak.scale.uni-koeln.de/lazarus/)` lazarus-testing universe`
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+```
201256
202-Replace the http path with your own.
257+Replace the http path with your own.
203258
204259## Install Lazarus
205260
206-For example:
207-
208-` sudo apt-get update`\
209-` sudo apt-get install lazarus`
261+For example:
262+```
263+sudo apt-get update
264+ sudo apt-get install lazarus
265+```
210266
211267---
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).*
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).*

Back to history