Skip to content

Commit c404d1d

Browse files
author
jef
committedOct 31, 2010
documentation update
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14468 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7a80eff commit c404d1d

File tree

5 files changed

+142
-106
lines changed

5 files changed

+142
-106
lines changed
 

‎INSTALL

Lines changed: 47 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ Last change: 20101028
99
3. Building on GNU/Linux
1010
3.1. Building QGIS with Qt 4.x
1111
3.2. Prepare apt
12-
3.3. Install Qt4
13-
3.4. Install additional software dependencies required by QGIS
14-
3.5. GRASS Specific Steps
15-
3.6. Setup ccache (Optional)
16-
3.7. Prepare your development environment
17-
3.8. Check out the QGIS Source Code
18-
3.9. Starting the compile
19-
3.10. Building Debian packages
20-
3.11. Running QGIS
21-
3.12. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
12+
3.3. Install build dependencies
13+
3.4. Setup ccache (Optional)
14+
3.5. Prepare your development environment
15+
3.6. Check out the QGIS Source Code
16+
3.7. Starting the compile
17+
3.8. Building Debian packages
18+
3.9. Running QGIS
19+
3.10. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
2220
4. Building on Windows
2321
4.1. Building with Microsoft Visual Studio
2422
4.2. Building using MinGW
@@ -133,6 +131,10 @@ These instructions should work fine if this is a system that has already been
133131
in use for a while, you may need to just skip those steps which are irrelevant
134132
to you.
135133

134+
/!\ Note: Refer to the section ''Building Debian packages'' for building
135+
debian packages. Unless you plan to develop on QGIS, that is probably the
136+
easiest option to compile and install QGIS.
137+
136138

137139
3.2. Prepare apt
138140
================
@@ -153,14 +155,22 @@ Now update your local sources database:
153155

154156

155157

156-
3.3. Install Qt4
157-
================
158+
3.3. Install build dependencies
159+
===============================
158160

159161

160-
sudo apt-get install libqt4-core libqt4-debug \
161-
libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
162-
qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
162+
|| Distribution | install command for packages |
163+
| hardy | ``apt-get install bison cmake fcgi-dev flex grass-dev libexpat1-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
164+
| intrepid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
165+
| jaunty | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
166+
| karmic | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
167+
| lenny | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-dev libqwt5-qt4-dev libsqlite3-dev pkg-config proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4-dev sip4`` |
168+
| lucid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
169+
| maverick | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
170+
| sid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
171+
| squeeze | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
163172

173+
(extracted from the respective control files in debian/)
164174

165175
/!\ A Special Note: If you are following this set of instructions on
166176
a system where you already have Qt3 development tools installed, there will
@@ -198,45 +208,12 @@ applications is used in all cases:
198208
Use the simple command line dialog that appears after running each of the
199209
above commands to select the Qt4 version of the relevant applications.
200210

201-
202-
3.4. Install additional software dependencies required by QGIS
203-
==============================================================
204-
205-
206-
sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj \
207-
libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
208-
libgsl0-dev g++ libjasper-dev libtiff4-dev subversion \
209-
libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags \
210-
python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
211-
212-
213-
/!\ Debian users should use libgdal-dev above rather
214-
215211
/!\ Note: For python language bindings SIP >= 4.5 and PyQt4 >= 4.1 is required! Some stable GNU/Linux
216212
distributions (e.g. Debian or SuSE) only provide SIP < 4.5 and PyQt4 < 4.1. To include support for python
217213
language bindings you may need to build and install those packages from source.
218214

219-
If you do not have cmake installed already:
220-
221-
222-
sudo apt-get install cmake
223-
224215

225-
226-
3.5. GRASS Specific Steps
227-
=========================
228-
229-
/!\ Note: If you don't need to build with GRASS support, you can
230-
skip this section.
231-
232-
Now you can install grass from dapper:
233-
234-
235-
sudo apt-get install grass libgrass-dev
236-
237-
238-
239-
3.6. Setup ccache (Optional)
216+
3.4. Setup ccache (Optional)
240217
============================
241218

242219
You should also setup ccache to speed up compile times:
@@ -248,7 +225,7 @@ You should also setup ccache to speed up compile times:
248225

249226

250227

251-
3.7. Prepare your development environment
228+
3.5. Prepare your development environment
252229
=========================================
253230

254231
As a convention I do all my development work in $HOME/dev/<language>, so in
@@ -263,7 +240,7 @@ this:
263240
This directory path will be assumed for all instructions that follow.
264241

265242

266-
3.8. Check out the QGIS Source Code
243+
3.6. Check out the QGIS Source Code
267244
===================================
268245

269246
There are two ways the source can be checked out. Use the anonymous method
@@ -302,11 +279,9 @@ qgis.org certificate. Press 'p' to accept it permanently:
302279

303280

304281

305-
3.9. Starting the compile
282+
3.7. Starting the compile
306283
=========================
307284

308-
/!\ Note: The next section describes howto build debian packages
309-
310285
I compile my development version of QGIS into my ~/apps directory to avoid
311286
conflicts with Ubuntu packages that may be under /usr. This way for example
312287
you can use the binary packages of QGIS on your system along side with your
@@ -346,8 +321,8 @@ Now on with the build:
346321
It may take a little while to build depending on your platform.
347322

348323

349-
3.10. Building Debian packages
350-
==============================
324+
3.8. Building Debian packages
325+
=============================
351326

352327
Instead of creating a personal installation as in the previous step you can
353328
also create debian package. This is done from the qgis root directory, where
@@ -386,8 +361,8 @@ Install them using dpkg. E.g.:
386361

387362

388363

389-
3.11. Running QGIS
390-
==================
364+
3.9. Running QGIS
365+
=================
391366

392367
Now you can try to run QGIS:
393368

@@ -399,7 +374,7 @@ If all has worked properly the QGIS application should start up and appear
399374
on your screen.
400375

401376

402-
3.12. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
377+
3.10. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
403378
========================================================================================================
404379

405380
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If you want
@@ -408,7 +383,7 @@ necessary adjustments to the following code. This guide assumes that you don't h
408383
installed any previous version of gdal, grass and qgis.
409384

410385

411-
3.12.1. Step 1: install base packages
386+
3.10.1. Step 1: install base packages
412387
=====================================
413388

414389
First you need to install the necessary packages required to download the source
@@ -419,7 +394,7 @@ code and compile it. Open the terminal and issue the following command:
419394

420395

421396

422-
3.12.2. Step 2: compile and install the ecw libraries
397+
3.10.2. Step 2: compile and install the ecw libraries
423398
=====================================================
424399

425400
Go to the ERDAS web site http://www.erdas.com/ and follow the links
@@ -460,7 +435,7 @@ leave the folder
460435

461436

462437

463-
3.12.3. Step 3: download the MrSID binaries
438+
3.10.3. Step 3: download the MrSID binaries
464439
===========================================
465440

466441
Go to the LIZARDTECH web site http://www.lizardtech.com/ and follow the links
@@ -471,7 +446,7 @@ then download the "'''GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'''"
471446
Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167"
472447

473448

474-
3.12.4. Step 4: compile and install the gdal libraries
449+
3.10.4. Step 4: compile and install the gdal libraries
475450
======================================================
476451

477452
Download the latest gdal source code
@@ -548,7 +523,7 @@ leave the folder
548523

549524

550525

551-
3.12.5. Step 5: compile and install GRASS
526+
3.10.5. Step 5: compile and install GRASS
552527
=========================================
553528

554529
Before downloading and compile GRASS source code you need to install a few
@@ -570,7 +545,8 @@ For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/
570545
Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
571546

572547

573-
CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config --with-python=/usr/bin/python2.5-config
548+
CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
549+
--with-python=/usr/bin/python2.5-config
574550

575551

576552
The additional gcc option -fexceptions is necessary to enable exceptions support in GRASS libraries. It is currently the only way to avoid QGIS crashes if a fatal error happens in GRASS library. See also http://trac.osgeo.org/grass/ticket/869
@@ -601,7 +577,7 @@ may want to give it a try
601577

602578

603579

604-
3.12.6. Step 6: compile and install QGIS
580+
3.10.6. Step 6: compile and install QGIS
605581
========================================
606582

607583
As for GRASS you can obtain the QGIS source code from different sources,
@@ -712,7 +688,7 @@ Advanced Installation):
712688
- expat
713689
- fcgi
714690
- gdal17
715-
- grass-devel-vc
691+
- grass
716692
- gsl-devel
717693
- iconv
718694
- pyqt4
@@ -1147,7 +1123,10 @@ Run these commands:
11471123

11481124

11491125
export PATH="/usr/local/bin:/usr/local/lib:$PATH"
1150-
./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg --without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw --with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes --with-proj-share=/usr/local/share/proj
1126+
./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg \
1127+
--without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw \
1128+
--with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes \
1129+
--with-proj-share=/usr/local/share/proj
11511130
make
11521131
make install
11531132

‎doc/linux.t2t

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ These instructions should work fine if this is a system that has already been
1919
in use for a while, you may need to just skip those steps which are irrelevant
2020
to you.
2121

22+
/!\ **Note:** Refer to the section ''Building Debian packages'' for building
23+
debian packages. Unless you plan to develop on QGIS, that is probably the
24+
easiest option to compile and install QGIS.
25+
2226
== Prepare apt ==
2327

2428
The packages qgis depends on to build are available in the "universe" component
@@ -37,13 +41,20 @@ sudo apt-get update
3741
```
3842

3943

40-
== Install Qt4 ==
44+
== Install build dependencies ==
4145

42-
```
43-
sudo apt-get install libqt4-core libqt4-debug \
44-
libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
45-
qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
46-
```
46+
|| Distribution | install command for packages |
47+
| hardy | ``apt-get install bison cmake fcgi-dev flex grass-dev libexpat1-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
48+
| intrepid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
49+
| jaunty | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
50+
| karmic | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
51+
| lenny | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-dev libqwt5-qt4-dev libsqlite3-dev pkg-config proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4-dev sip4`` |
52+
| lucid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
53+
| maverick | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
54+
| sid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
55+
| squeeze | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
56+
57+
(extracted from the respective control files in ``debian/``)
4758

4859
/!\ **A Special Note:** If you are following this set of instructions on
4960
a system where you already have Qt3 development tools installed, there will
@@ -81,37 +92,10 @@ sudo update-alternatives --config linguist
8192
Use the simple command line dialog that appears after running each of the
8293
above commands to select the Qt4 version of the relevant applications.
8394

84-
== Install additional software dependencies required by QGIS ==
85-
86-
```
87-
sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj \
88-
libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
89-
libgsl0-dev g++ libjasper-dev libtiff4-dev subversion \
90-
libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags \
91-
python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
92-
```
93-
94-
/!\ Debian users should use libgdal-dev above rather
95-
9695
/!\ **Note:** For python language bindings SIP >= 4.5 and PyQt4 >= 4.1 is required! Some stable GNU/Linux
9796
distributions (e.g. Debian or SuSE) only provide SIP < 4.5 and PyQt4 < 4.1. To include support for python
9897
language bindings you may need to build and install those packages from source.
9998

100-
If you do not have cmake installed already:
101-
```
102-
sudo apt-get install cmake
103-
```
104-
105-
== GRASS Specific Steps ==
106-
107-
/!\ **Note:** If you don't need to build with GRASS support, you can
108-
skip this section.
109-
110-
Now you can install grass from dapper:
111-
112-
```
113-
sudo apt-get install grass libgrass-dev
114-
```
11599

116100
== Setup ccache (Optional) ==
117101

@@ -176,8 +160,6 @@ Error validating server certificate for 'https://svn.qgis.org:443':
176160

177161
== Starting the compile ==
178162

179-
/!\ **Note:** The next section describes howto build debian packages
180-
181163
I compile my development version of QGIS into my ~/apps directory to avoid
182164
conflicts with Ubuntu packages that may be under /usr. This way for example
183165
you can use the binary packages of QGIS on your system along side with your
@@ -426,7 +408,8 @@ For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/
426408
Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
427409

428410
```
429-
CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config --with-python=/usr/bin/python2.5-config
411+
CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
412+
--with-python=/usr/bin/python2.5-config
430413
```
431414

432415
The additional gcc option -fexceptions is necessary to enable exceptions support in GRASS libraries. It is currently the only way to avoid QGIS crashes if a fatal error happens in GRASS library. See also http://trac.osgeo.org/grass/ticket/869

‎doc/msvc.t2t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ For the QGIS build you need to install following packages from OSGeo4W (select
4444
- expat
4545
- fcgi
4646
- gdal17
47-
- grass-devel-vc
47+
- grass
4848
- gsl-devel
4949
- iconv
5050
- pyqt4

‎doc/msys.t2t

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ In MSYS console go to the directory where you've unpacked or checked out sources
289289
Run these commands:
290290
```
291291
export PATH="/usr/local/bin:/usr/local/lib:$PATH"
292-
./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg --without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw --with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes --with-proj-share=/usr/local/share/proj
292+
./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg \
293+
--without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw \
294+
--with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes \
295+
--with-proj-share=/usr/local/share/proj
293296
make
294297
make install
295298
```

‎scripts/scandeps.pl

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/perl
2+
3+
use strict;
4+
use warnings;
5+
6+
open I, "doc/linux.t2t";
7+
open O, ">doc/linux.t2t.new";
8+
while(<I>) {
9+
last if /^\|\| Distribution \| install command for packages \|\n$/;
10+
print O;
11+
}
12+
13+
print O "|| Distribution | install command for packages |\n";
14+
15+
for my $c (<debian/control.*>) {
16+
my ($dist) = $c =~ /^.*\/control\.(.*)$/;
17+
18+
open F, $c;
19+
while(<F>) {
20+
chop;
21+
last if /^Build-Depends:/i;
22+
}
23+
24+
s/^Build-Depends:\s*//;
25+
my $deps = $_;
26+
27+
while(<F>) {
28+
chop;
29+
last if /^\S/;
30+
$deps .= $_;
31+
}
32+
33+
my @deps;
34+
foreach my $p (split /,/, $deps) {
35+
$p =~ s/^\s+//;
36+
$p =~ s/\s+.*$//;
37+
next if $p =~ /^(debhelper|subversion|python-central)$/;
38+
push @deps, $p;
39+
}
40+
41+
my $dep="";
42+
my @dep;
43+
foreach my $p (sort @deps) {
44+
if( length("$dep $p") > 60 ) {
45+
push @dep, $dep;
46+
$dep = $p;
47+
} else {
48+
$dep .= " $p";
49+
}
50+
}
51+
52+
push @dep, $dep;
53+
54+
print O "| $dist | ``apt-get install " . join( " ", @dep ) . "`` |\n";
55+
}
56+
57+
while(<I>) {
58+
last if /^$/;
59+
}
60+
61+
print O;
62+
63+
while(<I>) {
64+
print O;
65+
}
66+
67+
close O;
68+
close I;
69+
70+
rename "doc/linux.t2t", "doc/linux.t2t.orig";
71+
rename "doc/linux.t2t.new", "doc/linux.t2t";

0 commit comments

Comments
 (0)
Please sign in to comment.