From b494572158c5cbd3c0639963b6f49fef5b1079ea Mon Sep 17 00:00:00 2001 From: Jonas Schlitzer Date: Tue, 15 Mar 2016 12:23:03 +0100 Subject: [PATCH] init commit --- .gitignore | 2 ++ hooks/after-install.sh | 16 ++++++++++++ hooks/after-install.sh~ | 2 ++ rpm.sh | 57 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 .gitignore create mode 100755 hooks/after-install.sh create mode 100755 hooks/after-install.sh~ create mode 100755 rpm.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e464c60 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +/build diff --git a/hooks/after-install.sh b/hooks/after-install.sh new file mode 100755 index 0000000..73d267c --- /dev/null +++ b/hooks/after-install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +##-- Install Mapnik & Mod_tile +cd install_pkg +cd mapnik +make install +ldconfig +cd .. +cd mod_tile +make install +make install-mod_tile +ldconfig +cd ../../ +rm -rf install_pkg +mv osm2pgsql /usr/local/bin + diff --git a/hooks/after-install.sh~ b/hooks/after-install.sh~ new file mode 100755 index 0000000..98bee2d --- /dev/null +++ b/hooks/after-install.sh~ @@ -0,0 +1,2 @@ +#!/bin/bash +ls diff --git a/rpm.sh b/rpm.sh new file mode 100755 index 0000000..b368980 --- /dev/null +++ b/rpm.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +#-- Install build dependencies +apt-get install make +apt-get install cmake +apt-get install g++ +apt-get install libboost-all-dev +apt-get install fpm +apt-get install libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev lua5.2 liblua5.2-dev python +apt-get install libharfbuzz-dev libpng-dev libfreetype6-dev +apt-get install autoconf apache2-dev +apt-get install git +#-- Compile the things + +#-- osm2psql +git clone git://github.com/openstreetmap/osm2pgsql.git +cd osm2pgsql +mkdir build +cd build +cmake .. -DCMAKE_BUILD_TYPE=Release +make -j12 +cd ../../ + +#-- mapnik +git clone -b v3.0.9 git://github.com/mapnik/mapnik +cd mapnik +./configure +JOBS=12 make +cd .. +#-- mod_tile +git clone git://github.com/openstreetmap/mod_tile.git +cd mod_tile +./autogen.sh +./configure +make -j12 +cd .. +#-- copy things to pkg +rm -rf pkg/ +mkdir pkg +cp -r mapnik pkg/ +cp -r mod_tile pkg/ +cp osm2pgsql/build/osm2pgsql pkg/osm2pgsql +chmod +x pkg/osm2pgsql/osm2pgsql +chmod +x hooks/after-install.sh + +#-- Package all the things +rm -f *.deb +fpm -C pkg \ + -s dir \ + -t deb \ + --name tileserver \ + --version 1.0.0 \ + --description "TileServer setup (mapnik, osm2pgsql, mod_tile)" \ + --after-install hooks/after-install.sh \ + . + +