Difference between revisions of "How to setup a FPC and Lazarus Ubuntu repository"
Line 24: | Line 24: | ||
* install development packages: | * install development packages: | ||
− | sudo apt-get install | + | sudo apt-get install libgtk2.0-dev libgtk1.2-dev libgpmg1-dev fakeroot libncurses5-dev |
* Install the latest stable FPC. This is needed to build the new FPC and Lazarus: | * Install the latest stable FPC. This is needed to build the new FPC and Lazarus: | ||
Either the deb files from the official site or the tar.gz. | Either the deb files from the official site or the tar.gz. | ||
Line 35: | Line 35: | ||
* build the fpc deb. 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: | * build the fpc deb. 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: | ||
./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/ | ./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/ | ||
+ | * install the new fpc deb. This is needed to build the lazarus deb, which depends on the new fpc deb. Don't forget to uninstall first your old FPC. | ||
+ | sudo dpkg -i fpc_2.3.1-070726_i386.deb | ||
* build the fpc-src deb. This works pretty much the same as above: | * build the fpc-src deb. This works pretty much the same as above: | ||
./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/ | ./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/ | ||
− | * | + | * build the lazarus deb. You can either build a normal lazarus: |
− | + | ./create_lazarus_deb.sh append-revision | |
+ | or a lazarus using gtk2: | ||
+ | ./create_lazarus_deb.sh gtk2 append-revision | ||
+ | * Now you have 3 deb files. Copy them to your repository: | ||
+ | cp fpc_2.3.1-070726_i386.deb fpc-src_2.3.1-070726_i386.deb lazarus_0.9.23.11636-0_i386.deb /var/www/lazarus/dists/lazarus-testing/universe/binary-i386/ |
Revision as of 14:49, 26 July 2007
What is a repository?
A ubuntu repository is a directory. It can be stored on the lokal disk, or on a webserver or on a ftp server. To use it, you add its path into your /etc/apt/sources.list and setup a gpg key. Then you can simply install lazarus with your favourite package gui (e.g. synaptic) and fpc, fpc-src and lazarus will be downloaded, installed and updated automatically.
Who needs it?
Administrators who wants to install FPC+Lazarus on a pool of computers. Like in school. Or newbies who just want to quickly test it.
The directory structure
Let's assume you want create a repository available via the apache webserver. Then you need to setup a directory like /var/www/lazarus that is public readable and only writable by root.
Create the following sub directory:
mkdir -p /var/www/lazarus/dists/lazarus-testing/universe/binary-i386
The debs
Put the fpc, fpc-src and lazarus deb files into it.
Creating the deb files yourself
You can create the debs with the scripts in tools/install/ of the lazarus sources.
- install development packages:
sudo apt-get install libgtk2.0-dev libgtk1.2-dev libgpmg1-dev fakeroot libncurses5-dev
- Install the latest stable FPC. This is needed to build the new FPC and Lazarus:
Either the deb files from the official site or the tar.gz.
- Download the FPC sources. To get the current development version you can use the command below. To get a more stable version, see [[1]]:
svn co http://svn.freepascal.org/svn/fpc/trunk fpc
- Download the lazarus sources:
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
- go into the lazarus install script directory:
cd lazarus/tools/install
- build the fpc deb. 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:
./create_fpc_deb.sh fpc /path/to/the/sources/of/fpc/
- install the new fpc deb. This is needed to build the lazarus deb, which depends on the new fpc deb. Don't forget to uninstall first your old FPC.
sudo dpkg -i fpc_2.3.1-070726_i386.deb
- build the fpc-src deb. This works pretty much the same as above:
./create_fpc_deb.sh fpc-src /path/to/the/sources/of/fpc/
- build the lazarus deb. You can either build a normal lazarus:
./create_lazarus_deb.sh append-revision
or a lazarus using gtk2:
./create_lazarus_deb.sh gtk2 append-revision
- Now you have 3 deb files. Copy them to your repository:
cp fpc_2.3.1-070726_i386.deb fpc-src_2.3.1-070726_i386.deb lazarus_0.9.23.11636-0_i386.deb /var/www/lazarus/dists/lazarus-testing/universe/binary-i386/