diff --git a/lib/autoparts/packages/postgis.rb b/lib/autoparts/packages/postgis.rb new file mode 100644 index 0000000..421e3e5 --- /dev/null +++ b/lib/autoparts/packages/postgis.rb @@ -0,0 +1,37 @@ +module Autoparts + module Packages + class Postgis < Package + name 'postgis' + version '2.1.8' + description 'PostGIS: a spatial database extender for PostgreSQL object-relational database.' + category Category::LIBRARIES + + source_url 'http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz' + source_sha1 'cfb3b7a01449fbbdb3a052002cebd23537ea6c93' + source_filetype 'tar.gz' + + depends_on 'postgresql' + depends_on 'geos' + depends_on 'proj4' + depends_on 'gdal' + + def compile + Dir.chdir(name_with_version) do + args = [ + "--prefix=#{prefix_path}" + ] + + execute './configure', *args + execute 'make' + end + end + + + def install + Dir.chdir(name_with_version) do + execute 'make install' + end + end + end + end +end diff --git a/lib/autoparts/packages/proj4.rb b/lib/autoparts/packages/proj4.rb new file mode 100644 index 0000000..d6c025d --- /dev/null +++ b/lib/autoparts/packages/proj4.rb @@ -0,0 +1,33 @@ +module Autoparts + module Packages + class Proj4 < Package + name 'proj4' + version '4.9.1' + description 'PROJ.4: a Cartographic Projections library originally written by Gerald Evenden then of the USGS.' + category Category::LIBRARIES + + source_url 'http://download.osgeo.org/proj/proj-4.9.1.tar.gz' + source_sha1 '0bc63a41f1bdcff600d076c056f796007abf3f2f' + source_filetype 'tar.bz2' + + depends_on 'swig' + + def name_with_version + 'proj-' + version + end + + def compile + Dir.chdir(name_with_version) do + execute './configure', "--prefix=#{prefix_path}" + execute 'make' + end + end + + def install + Dir.chdir(name_with_version) do + execute 'make install' + end + end + end + end +end