Last active
August 29, 2015 14:02
-
-
Save christoph-buente/e18584e312bcadfe82e5 to your computer and use it in GitHub Desktop.
Homebrew formula for osm2pgsql 0.8.4 on Mac OS X Mavericks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Osm2pgsql < Formula | |
homepage 'http://wiki.openstreetmap.org/wiki/Osm2pgsql' | |
url 'https://github.com/openstreetmap/osm2pgsql/archive/0.84.0.tar.gz' | |
sha1 '42145c39596580680f120a07a4f30f97a86a3698' | |
depends_on :postgresql | |
depends_on "autoconf" => :build | |
depends_on "automake" => :build | |
depends_on "libtool" => :build | |
depends_on "zlib" => :build | |
depends_on "lbzip2" => :build | |
depends_on "geos" | |
depends_on "proj" | |
depends_on "protobuf-c" => :optional | |
def install | |
args = [ | |
"--with-proj=#{Formula["proj"].opt_prefix}", | |
"--with-zlib=#{Formula["zlib"].opt_prefix}", | |
"--with-bzip2=#{Formula["lbzip2"].opt_prefix}" | |
] | |
if build.with? "protobuf-c" | |
args << "--with-protobuf-c=#{Formula["protobuf-c"].opt_prefix}" | |
end | |
system "./autogen.sh" | |
system "./configure", *args | |
system "make" | |
bin.install "osm2pgsql" | |
(share+'osm2pgsql').install 'default.style' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment