Changes between Initial Version and Version 1 of UsersWikiPostgisRpmInstallation


Ignore:
Timestamp:
Apr 13, 2009, 2:31:58 PM (15 years ago)
Author:
pierre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostgisRpmInstallation

    v1 v1  
     1
     2= PostGIS RPM Installation =
     3
     4Version:1.0.4 for PostGIS RPM Set[[BR]]
     5Author:Devrim Gunduz <devrim@gunduz.org>[[BR]]
     6Date:Oct 04, 2005
     7
     8== INTRODUCTION ==
     9This document exists to explain the layout of the RPM for PostGIS .
     10
     11This document is written to be applicable to version 1.0.X of PostGIS
     12which is the current version of the RPM's as of this writing. More to the
     13point, versions prior to 1.0.X are not documented here.
     14
     15It is preferable for the distribution-specific set to be the one used.
     16If you want to stay up-to-date on the PostGIS core itself, use the community
     17RPMS. These RPMs are kept up2date.
     18
     19PostGIS RPM is installed as every RPM, so it is not mentioned in here.
     20
     21== BUILDING RPMS ==
     22To build RPMs, you'll need the following:
     23 * The source tarball of PostGIS.
     24 * PostGIS spec (see extras/rpm/spec for the file)
     25 * Some patches/sources from CVS (see extras/rpm/patches for the files)
     26
     27Please note that you'll need some development tools for building PostGIS. You'll
     28be prompted for this prerequisites.
     29
     30Here is a basic guide for building RPMs:
     31
     32# Move the patches/sources and source tarball into /usr/src/redhat/SOURCES
     33# Next, move the spec file under /usr/src/redhat/SPECS
     34# Run the following command: rpmbuild -bb postgis.spec
     35This will build RPMs for you.
     36
     37NOTES (neverhood@sibmail.com) for building postgis-1.3.1 on Fedora Core 6.
     38
     39I found that spec file in postgis-1.3.1tar.gz have invalid make command. In original spec file it is:
     40
     41{{{
     42make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so"
     43
     44}}}
     45
     46(and with that command you'll get incorrect lwpostgis.sql and spatial_ref_sys.sql files).
     47
     48Replace this command with that one:
     49
     50{{{
     51make %{?_smp_mflags} LPATH=`pg_config --pkglibdir`
     52
     53}}}
     54
     55After this changes you'll get right postgis rpm package.
     56/* end of notes */
     57
     58The RPMs will be placed under /usr/src/redhat/RPMS/i386/
     59If you specify an explicit target while rpmbuild, then the directory may change:
     60
     61 Command:  rpmbuild -bb --target i686 postgis.spec[[BR]]
     62 Resulting directory:  /usr/src/redhat/RPMS/i686/
     63
     64== RPM FILE LOCATIONS. ==
     65To be in compliance with the Linux FHS, the PostGIS RPMs install files in
     66a manner not consistent with most of the PostGIS documentation.  According
     67to the standard PostGIS documentation, PostGIS is installed under the
     68directory /usr/local, with executables, source, and data existing in
     69various subdirectories.
     70
     71Different distributions have different ideas of some of these file locations.
     72In particular, the documentation directory can be /usr/doc, /usr/doc/packages,
     73/usr/share/doc, /usr/share/doc/packages, or some other similar path. The current
     74Red Hat / Fedora Core locations are listed below.
     75
     76However, the RPM's install the files like this:
     77
     78
     79 Executables:            /usr/bin[[BR]]
     80 Libraries:              /usr/lib[[BR]]
     81 Documentation:          /usr/share/doc/postgis-x.y.z[[BR]]
     82 JDBC2 related:          /usr/shara/java[[BR]]
     83 Perl utils:             /usr/bin
     84
     85
     86
     87Use of 'rpm -ql' for each package is recommended as the 'Official' location source.
     88
     89While it may seem gratuitous to place these files in different locations, the
     90FHS requires it -- distributions should not ever touch /usr/local.  It may
     91also seem like more work to keep track of where everything is -- but, that's
     92the beauty of RPM -- you don't have to keep track of the files, RPM does it
     93for you.
     94
     95These RPMs are designed to be LSB-compliant -- if you find this not to be the
     96case, please let me know by way of the postgis-devel@PostGIS.org mailing
     97list.
     98
     99== REBUILDING FROM SOURCE RPM ==
     100If your distribution is not supported by the binary RPM's from PostGIS.org,
     101you will need to rebuild from the source RPM.  Download the .src.rpm for this
     102release.  You will need to be root to rebuild, unless you have already set up
     103a non-root build environment.
     104
     105Install the source RPM with rpm -i, then CD to the rpm building area (on RedHat
     106or Fedora Core, this is /usr/src/redhat by default).  You will have to have a full
     107development environment to rebuild the RPM.
     108
     109This release of the RPM includes the ability to conditionally build
     110sets of packages.  The parameters, their defaults, and the meanings are:
     111
     112 jdbc2:          Build the RPM with jdbc2 support (default value is 1)[[BR]]
     113 utils:          Build the RPM with perl utils (default value is 1)
     114
     115To use these defines, invoke a rebuild like this:
     116
     117{{{
     118 rpm --rebuild --define 'jdbc2 0 ' --define 'utils' postgis-1.0.4-1.src.rpm
     119
     120}}}
     121
     122This line would disable the jdbc2 and utils, if requested.
     123
     124Please note that the spec file needs some patches to PostGIS source tree to build, so you
     125may need to download them via CVS before rebuilding the package.
     126
     127== MORE INFORMATION ==
     128You can get more information at http://www.PostGIS.org
     129
     130Please help make this packaging better -- let me know if you find problems, or
     131better ways of doing things.  You can reach us by e-mail at
     132postgis-devel@lists.refractions.net .