Changes between Version 6 and Version 7 of UsersWikiPostGIS20Debian60pkg
- Timestamp:
- 09/28/12 16:14:49 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiPostGIS20Debian60pkg
v6 v7 7 7 mkdir chroot 8 8 sudo debootstrap --arch=amd64 squeeze chroot http://ftp.debian.org/debian/ 9 }}} 10 11 Prevent start-stop-daemon from starting daemons inside the chroot. 12 {{{ 13 echo "exit 0" > chroot/sbin/start-stop-deamon 14 }}} 9 15 sudo mount --bind /proc chroot/proc 10 16 sudo mount --bind /sys chroot/sys … … 19 25 {{{ 20 26 apt-get update 27 echo -e "en_US ISO-8859-1\nen_US.UTF-8 UTF-8" >> /etc/locale.gen 21 28 apt-get install locales 22 echo -e "en_US ISO-8859-1\nen_US.UTF-8 UTF-8" >> /etc/locale.gen23 locale-gen24 29 }}} 25 Add the official Debian backports repo and pin the postgresql 9.1 packages and its immediate dependencies. Also add debhelper, as version 9 is required for building GEOS, as itis also available from backports.30 Add the official Debian backports repo and pin the postgresql 9.1 dependency packages. Also add debhelper, as version 9 is required for building GEOS, which is also available from backports. 26 31 {{{ 27 32 cat >> /etc/apt/sources.list.d/backports.list <<EOF … … 38 43 Pin-Priority: 1000 39 44 40 Package: postgresql-9.141 Pin: release o=Debian Backports42 Pin-Priority: 100043 44 Package: postgresql-client-9.145 Pin: release o=Debian Backports46 Pin-Priority: 100047 48 45 Package: postgresql-client-common 49 46 Pin: release o=Debian Backports … … 51 48 52 49 Package: postgresql-common 53 Pin: release o=Debian Backports54 Pin-Priority: 100055 56 Package: postgresql-contrib57 Pin: release o=Debian Backports58 Pin-Priority: 100059 60 Package: postgresql-contrib-9.161 Pin: release o=Debian Backports62 Pin-Priority: 100063 64 Package: postgresql-plperl-9.165 50 Pin: release o=Debian Backports 66 51 Pin-Priority: 1000 … … 78 63 }}} 79 64 80 Install the dependencies required for building everything. And yes, it's a lot of stuff. 81 82 Disclaimer: Not entirely sure all of these are needed, but it'd take a considerable amount of time to determine only what is need at this point, so I'm not doing that. 65 Install the dependencies required for building everything. 83 66 {{{ 84 apt-get install build-essential postgresql-9.1 debhelper devscripts dh-make-perl autotools-dev flex bison libgeos-dev libproj-dev libssl-dev xsltproc docbook docbook-xsl default-jdk libpg-java fastjar libjts-java imagemagick libcunit1-dev dblatex libxml2-dev libgtk2.0-dev postgresql-server-dev-9.1 apt-file libclass-data-inheritable-perl alien doxygen swig ruby ruby-dev libpopt-dev libjson0-dev checkinstall proj-bin grass-dev libcurl4-dev libdap-dev libgif-dev libhdf4-alt-dev libhdf5-serial-dev libjasper-dev libjpeg-dev libltdl3-dev libmysqlclient-dev libnetcdf-dev libpng-dev libpq-dev libspatialite-dev libsqlite3-dev libxerces-c2-dev unixodbc-dev libgdal1-dev ant67 apt-get install build-essential debhelper postgresql-server-dev-9.1 doxygen swig ruby ruby1.8 ruby1.8-dev autotools-dev flex bison libproj-dev xsltproc docbook docbook-xsl default-jdk libpg-java fastjar libjts-java imagemagick libcunit1-dev dblatex libxml2-dev libgtk2.0-dev libgdal1-dev ant 85 68 }}} 86 87 69 Create a scratch directory to perform all the tasks and cd into it 88 70 {{{ … … 90 72 cd scratch 91 73 }}} 92 93 Download the two patch files from this page into this scratch directory94 95 74 Build a GEOS 3.3.3 package. I used the control files from wheezy. 96 75 {{{ … … 104 83 cd .. 105 84 }}} 85 Install the GEOS dev package to support building Postgis 2.0. 86 {{{ 87 dpkg -i libgeos-dev_3.3.3-1.1_amd64.deb libgeos-c1_3.3.3-1.1_amd64.deb libgeos-3.3.3_3.3.3-1.1_amd64.deb 88 }}} 89 Download the two patch files from this page into the scratch directory. 106 90 107 Install the GEOS dev packages. These are required to build Postgis 2.0 108 {{{ 109 sudo dpkg -i 110 }}} 111 112 Build Postgis 2.0. This uses the postgis 1.5.3 control files from squeeze. The two patches are applied here to fix an issue with the Postgis (a bad URL in java/jdbc/build.xml to the maven jar that ant requires for building), and to make the control files build the package. 91 Build Postgis 2.0. This uses the postgis 1.5.3 control files from squeeze. The two patches are applied here to fix an issue with the Postgis itself (a bad URL in java/jdbc/build.xml to the maven jar that ant requires for building), and to make the control files build the package. Ensure that both postgis_debian-2.0.1.patch and postgis_maven.patch are in the scratch directory. 113 92 {{{ 114 93 wget http://postgis.org/download/postgis-2.0.1.tar.gz … … 119 98 tar xvfz postgis_1.5.3-2.debian.tar.gz 120 99 rm -f postgis_1.5.3-2.debian.tar.gz 121 patch -p0 < ../ ../postgis_debian-2.0.1.patch100 patch -p0 < ../postgis_debian-2.0.1.patch 122 101 rm -rf debian/source 123 102 dpkg-buildpackage 124 103 cd .. 104 }}} 105 106 Exit the chroot, umount the bind mounted directories from inside the chroot, copy the deb files that were created out, then delete the chroot. 107 {{{ 108 exit 109 sudo umount chroot/proc 110 sudo umount chroot/sys 111 sudo umount chroot/dev/pts 112 sudo umount chroot/dev 113 cp chroot/scratch/*.deb . 114 sudo rm -rf chroot 125 115 }}} 126 116