summaryrefslogtreecommitdiff
path: root/databases/tile38
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2016-06-23 23:16:03 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2016-06-23 23:16:03 +0000
commitdb38d296fdcb0d72ba9bcb689ece5f15df122415 (patch)
treec246263304178a650589b9afb514ebbdfc2ab852 /databases/tile38
parentNew slibtool: (diff)
- Add databases/tile38
Tile38 is an open source (MIT licensed), in-memory geolocation data store, spatial index, and realtime geofence. It supports a variety of object types including lat/lon points, bounding boxes, XYZ tiles, Geohashes, and GeoJSON. Features: Spatial index with search methods such as NEARBY, WITHIN, and INTERSECTS. Realtime geofencing through persistent sockets or webhooks. Object types of lat/lon, bbox, Geohash, GeoJSON, QuadKey, and XYZ tile. Support for lots of Clients Libraries written in many different langauges. Variety of client protocols, including http (curl), websockets, telnet, and the Redis RESP. Server responses are RESP or JSON. Full command line interface. Leader / follower replication. In-memory database that persists on disk. WWW: http://tile38.com/ PR: 210147 Submitted by: olevole@olevole.ru
Notes
Notes: svn path=/head/; revision=417404
Diffstat (limited to 'databases/tile38')
-rw-r--r--databases/tile38/Makefile54
-rw-r--r--databases/tile38/distinfo3
-rw-r--r--databases/tile38/files/tile38.in45
-rw-r--r--databases/tile38/pkg-descr18
-rw-r--r--databases/tile38/pkg-plist4
5 files changed, 124 insertions, 0 deletions
diff --git a/databases/tile38/Makefile b/databases/tile38/Makefile
new file mode 100644
index 000000000000..eda1f98ccf29
--- /dev/null
+++ b/databases/tile38/Makefile
@@ -0,0 +1,54 @@
+# Created by: olevole@olevole.ru
+# $FreeBSD$
+
+PORTNAME= tile38
+PORTVERSION= 1.2.0
+CATEGORIES= databases
+
+MAINTAINER= olevole@olevole.ru
+COMMENT= In-memory geolocation data store, spatial index, and realtime geofence
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= go>=1.4:lang/go \
+ bash:shells/bash
+RUN_DEPENDS= go>=1.4:lang/go \
+ bash:shells/bash
+
+USE_GITHUB= yes
+GH_ACCOUNT= tidwall
+
+USES= shebangfix
+SHEBANG_FILES= build.sh
+
+USE_RC_SUBR= tile38
+
+USERS= ${PORTNAME}
+GROUPS= ${PORTNAME}
+
+TILE38_DBDIR?= /var/db/tile38
+TILE38_RUNDIR?= /var/run/tile38
+
+SUB_LIST= PORTNAME=${PORTNAME} \
+ TILE38_USER=${USERS} \
+ TILE38_DBDIR=${TILE38_DBDIR} \
+ TILE38_RUNDIR=${TILE38_RUNDIR}
+
+PLIST_SUB= TILE38_USER=${USERS} \
+ TILE38_GROUP=${GROUPS} \
+ TILE38_DBDIR=${TILE38_DBDIR} \
+ TILE38_RUNDIR=${TILE38_RUNDIR}
+
+do-build:
+ @cd ${WRKSRC} && ./build.sh
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${TILE38_DBDIR} ${STAGEDIR}${TILE38_RUNDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/tile38-cli ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/tile38-server ${STAGEDIR}${PREFIX}/bin/
+
+do-test:
+ @cd ${WRKSRC} && ./build.sh test
+
+.include <bsd.port.mk>
diff --git a/databases/tile38/distinfo b/databases/tile38/distinfo
new file mode 100644
index 000000000000..f3ce9e38ae5c
--- /dev/null
+++ b/databases/tile38/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1465389710
+SHA256 (tidwall-tile38-1.2.0_GH0.tar.gz) = 8797cfe8ad0f787cc00c26a863329090a929257d9f5c5d8d20c17f05234cb2a5
+SIZE (tidwall-tile38-1.2.0_GH0.tar.gz) = 1701880
diff --git a/databases/tile38/files/tile38.in b/databases/tile38/files/tile38.in
new file mode 100644
index 000000000000..9507886b0f18
--- /dev/null
+++ b/databases/tile38/files/tile38.in
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# $FreeBSD: $
+#
+
+# PROVIDE: tile38
+# REQUIRE: LOGIN
+# BEFORE: securelevel
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `tile38':
+#
+# tile38_enable="YES"
+#
+# optional:
+#
+# tile38_flags (flags): Set extra flags here. More options in tile38(1)
+# Default is empty "".
+# tile38_user (user): Set user to run tile38.
+# Default is "%%TILE38_USER%%".
+# tile38_data (data): Set data directory path
+# Default is "%%TILE38_DBDIR%%".
+
+. /etc/rc.subr
+
+name="tile38"
+rcvar="${name}_enable"
+
+start_cmd="tile38_start"
+
+command="%%PREFIX%%/bin/tile38-server"
+pidfile="%%TILE38_RUNDIR%%/$name.pid"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${tile38_enable="NO"}
+: ${tile38_user="%%TILE38_USER%%"}
+: ${tile38_data="%%TILE38_DBDIR%%"}
+
+tile38_start()
+{
+ /usr/sbin/daemon -f -p ${pidfile} -u ${tile38_user} ${command} -d ${tile38_data} ${tile38_flags} ${rc_arg}
+}
+
+run_rc_command "$1"
diff --git a/databases/tile38/pkg-descr b/databases/tile38/pkg-descr
new file mode 100644
index 000000000000..d5f3ce8f523e
--- /dev/null
+++ b/databases/tile38/pkg-descr
@@ -0,0 +1,18 @@
+Tile38 is an open source (MIT licensed), in-memory geolocation data store,
+spatial index, and realtime geofence. It supports a variety of object types
+including lat/lon points, bounding boxes, XYZ tiles, Geohashes, and GeoJSON.
+
+Features:
+
+ Spatial index with search methods such as NEARBY, WITHIN, and INTERSECTS.
+ Realtime geofencing through persistent sockets or webhooks.
+ Object types of lat/lon, bbox, Geohash, GeoJSON, QuadKey, and XYZ tile.
+ Support for lots of Clients Libraries written in many different langauges.
+ Variety of client protocols, including http (curl), websockets, telnet,
+ and the Redis RESP.
+ Server responses are RESP or JSON.
+ Full command line interface.
+ Leader / follower replication.
+ In-memory database that persists on disk.
+
+WWW: http://tile38.com/
diff --git a/databases/tile38/pkg-plist b/databases/tile38/pkg-plist
new file mode 100644
index 000000000000..475a56950dd3
--- /dev/null
+++ b/databases/tile38/pkg-plist
@@ -0,0 +1,4 @@
+bin/tile38-server
+bin/tile38-cli
+@dir(%%TILE38_USER%%,%%TILE38_GROUP%%,) %%TILE38_DBDIR%%
+@dir(%%TILE38_USER%%,%%TILE38_GROUP%%,) %%TILE38_RUNDIR%%