aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2009-09-25 12:14:32 +0000
committerStanislav Sedov <stas@FreeBSD.org>2009-09-25 12:14:32 +0000
commit70601e0570c347b4880f326c3a8ea5e0cdd6712c (patch)
treecb3f02ca9a56c73f8609cc680a5d10b5f5880c3e /astro
parentf0c8f460aa6754c8f6519c9af9ad39d5218fb056 (diff)
downloadports-70601e0570c347b4880f326c3a8ea5e0cdd6712c.tar.gz
ports-70601e0570c347b4880f326c3a8ea5e0cdd6712c.zip
Notes
Diffstat (limited to 'astro')
-rw-r--r--astro/Makefile1
-rw-r--r--astro/osmosis/Makefile54
-rw-r--r--astro/osmosis/distinfo3
-rw-r--r--astro/osmosis/files/osmosis.in86
-rw-r--r--astro/osmosis/pkg-descr9
5 files changed, 153 insertions, 0 deletions
diff --git a/astro/Makefile b/astro/Makefile
index b77e285431fc..d3d4f6f852a5 100644
--- a/astro/Makefile
+++ b/astro/Makefile
@@ -42,6 +42,7 @@
SUBDIR += openmap
SUBDIR += openuniverse
SUBDIR += orsa
+ SUBDIR += osmosis
SUBDIR += p5-Astro
SUBDIR += p5-Astro-ADS
SUBDIR += p5-Astro-Catalog
diff --git a/astro/osmosis/Makefile b/astro/osmosis/Makefile
new file mode 100644
index 000000000000..73faa4e70a1b
--- /dev/null
+++ b/astro/osmosis/Makefile
@@ -0,0 +1,54 @@
+# New ports collection makefile for: osmosis
+# Date created: 2009/09/21
+# Whom: Gleb Smirnoff <glebius@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= osmosis
+PORTVERSION= 0.31.2
+CATEGORIES= astro java
+MASTER_SITES= http://dev.openstreetmap.org/~bretth/osmosis-build/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-bin
+
+MAINTAINER= glebius@FreeBSD.org
+COMMENT= A command line java app for processing OpenStreetMap data
+
+NO_BUILD= yes
+
+USE_JAVA= YES
+JAVA_VERSION= 1.6+
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+SUB_FILES= osmosis
+
+FETCH_ARGS= -pRr
+JAVAJARDIR_REL= ${JAVAJARDIR:C,${PREFIX}/?,,}
+JARFILES= aopalliance-1.0.jar \
+ bzip2-20090327.jar \
+ commons-dbcp-1.2.2.jar \
+ commons-logging-1.1.1.jar \
+ commons-pool-1.3.jar \
+ jpf-1.5.jar \
+ mysql-connector-java-5.1.6.jar \
+ postgis-1.3.2.jar \
+ postgresql-8.3-603.jdbc4.jar \
+ spring-beans-2.5.6.SEC01.jar \
+ spring-context-2.5.6.SEC01.jar \
+ spring-core-2.5.6.SEC01.jar \
+ spring-jdbc-2.5.6.SEC01.jar \
+ spring-tx-2.5.6.SEC01.jar \
+ stax2-api-3.0.1.jar \
+ woodstox-core-lgpl-4.0.3.jar
+
+PLIST_FILES= bin/osmosis ${JAVAJARDIR_REL}/osmosis.jar \
+ ${JARFILES:S,^,${DATADIR_REL}/,}
+
+do-install:
+ @${MKDIR} ${JAVAJARDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/osmosis.jar ${JAVAJARDIR}/
+ @${MKDIR} ${DATADIR}/
+ ${INSTALL_DATA} ${JARFILES:S,^,${WRKSRC}/lib/default/,} ${DATADIR}/
+ ${INSTALL_SCRIPT} ${WRKDIR}/osmosis ${PREFIX}/bin/osmosis
+
+.include <bsd.port.mk>
diff --git a/astro/osmosis/distinfo b/astro/osmosis/distinfo
new file mode 100644
index 000000000000..1a7f46b92006
--- /dev/null
+++ b/astro/osmosis/distinfo
@@ -0,0 +1,3 @@
+MD5 (osmosis-0.31.2-bin.tar.gz) = 3c8a5d8109add0395208c38543034962
+SHA256 (osmosis-0.31.2-bin.tar.gz) = 3252ba62271c6b74a7c13960ecf68b703c47764371be4dfa04577c6e01a99c8c
+SIZE (osmosis-0.31.2-bin.tar.gz) = 6837385
diff --git a/astro/osmosis/files/osmosis.in b/astro/osmosis/files/osmosis.in
new file mode 100644
index 000000000000..e025d0834dec
--- /dev/null
+++ b/astro/osmosis/files/osmosis.in
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# Config files can define several variables used throughout this script.
+# JAVACMD - The java command to launch osmosis.
+# JAVACMD_OPTIONS - The options to append to the java command, typically used
+# to modify jvm settings such as max memory.
+# OSMOSIS_OPTIONS - The options to apply to all osmosis invocations, typically
+# used to add plugins or make quiet operation the default.
+
+if [ -f /etc/osmosis ] ; then
+ . /etc/osmosis
+fi
+
+if [ -f "$HOME/.osmosis" ] ; then
+ . "$HOME/.osmosis"
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ # No JAVACMD provided in osmosis config files, therefore default to java
+ JAVACMD="%%LOCALBASE%%/bin/java"
+fi
+
+JAVACMD_OPTIONS="-Xmx1024m ${JAVACMD_OPTIONS}"
+JAVA_VERSION="%%JAVA_VERSION%%"
+export JAVA_VERSION
+
+if [ "x$1x" = "xx" ] || echo "$@" | grep -q -e '--help' ; then
+ cat <<EOF
+osmosis
+
+Example Usage
+
+Import a planet file into a local MySQL database.
+% osmosis --read-xml file=~/osm/planbet/planet.osm --write-mysql host="x" \\
+ database="x" user="x" password="x"
+
+Export a planet file from a local MySQL database.
+% osmosis --read-mysql host="x" database="x" user="x" password="x" --write-xml \\
+ file="planet.osm"
+
+Derive a change set between two planet files.
+% osmosis --read-xml file="planet1.osm" --read-xml file="planet2.osm" \\
+ --derive-change --write-xml-change file="planetdiff-1-2.osc"
+
+Derive a change set between a planet file and a database.
+% osmosis --read-xml file="planet1.osm" --read-mysql host="x" database="x" \\
+ user="x" password="x" --derive-change --write-xml-change \\
+ file="planetdiff-1-2.osc"
+
+Apply a change set to a planet file.
+% osmosis --read-xml file="planet1.osm" --read-xml-change \\
+ file="planetdiff-1-2.osc" --apply-change --write-xml file="planet2.osm"
+
+Sort the contents of a planet file.
+% osmosis --read-xml file="data.osm" --sort type="TypeThenId" --write-xml \\
+ file="data-sorted.osm"
+
+The above examples make use of the default pipe connection feature, however
+a simple read and write planet file command line could be written in two ways.
+The first example uses default pipe connection, the second explicitly connects
+the two components using a pipe named "mypipe". The default pipe connection
+will always work so long as each task is specified in the correct order.
+
+% osmosis --read-xml file="planetin.osm" --write-xml file="planetout.osm"
+
+% osmosis --read-xml file="planetin.osm" outPipe.0="mypipe" --write-xml \\
+ file="planetout.osm" inPipe.0="mypipe"
+
+Full usage details are available at:
+http://www.bretth.com/wiki/Wiki.jsp?page=OpenStreetMap
+
+EOF
+ exit 1
+fi
+
+# Build up the classpath of required jar files.
+CLASSPATH=%%JAVALIBDIR%%/osmosis.jar:${OSMOSIS_CLASSPATH}
+for FILE in `ls %%DATADIR%%`; do
+ CLASSPATH=${CLASSPATH}:%%DATADIR%%/${FILE}
+done
+
+MAINCLASS=org.openstreetmap.osmosis.core.Osmosis
+EXEC="${JAVACMD} ${JAVACMD_OPTIONS} -cp ${CLASSPATH} ${MAINCLASS} \
+ ${OSMOSIS_OPTIONS} $@"
+
+exec $EXEC
diff --git a/astro/osmosis/pkg-descr b/astro/osmosis/pkg-descr
new file mode 100644
index 000000000000..50cecfcf43b4
--- /dev/null
+++ b/astro/osmosis/pkg-descr
@@ -0,0 +1,9 @@
+Osmosis is a command line java app for processing OSM data. The tool consists
+of a series of pluggable components that can be chained together to perform a
+larger operation. For example, it has components for reading from database and
+from file, components for writing to database and to file, components for
+deriving and applying change sets to data sources, components for sorting data,
+etc. It has been written so that it is easy to add new features without
+re-writing common tasks such as file or database handling.
+
+WWW: http://wiki.openstreetmap.org/wiki/Osmosis