import ports/www/logswan, from Frederic Cambus, tweak from me, ok benoit@,

earlier version ok jung@

Logswan is a fast Web log analyzer using probabilistic data structures. It is
targeted at very large log files, typically APIs logs. It has constant memory
usage regardless of the log file size, and takes approximatively 4MB of RAM.

Unique visitors counting is performed using two HyperLogLog counters (one for
IPv4, and another one for IPv6), providing a relative accuracy of 0.10%.
This commit is contained in:
sthen 2015-11-05 16:19:04 +00:00
parent e98a8cc97e
commit 3166fc4d7d
5 changed files with 60 additions and 0 deletions

34
www/logswan/Makefile Normal file
View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2015/11/05 16:19:04 sthen Exp $
COMMENT = web log analyzer using probabilistic data structures
DISTNAME = logswan-${GH_TAGNAME}
CATEGORIES = www
HOMEPAGE = http://www.logswan.org
MAINTAINER = Frederic Cambus <fcambus@users.sourceforge.net>
# BSD
PERMIT_PACKAGE_CDROM = Yes
GH_ACCOUNT = fcambus
GH_PROJECT = logswan
GH_TAGNAME = 1.02
WANTLIB = c m jansson GeoIP
MODULES = devel/cmake
NO_TEST = Yes
LIB_DEPENDS = devel/jansson \
net/GeoIP
pre-configure:
sed -i s,/var/db/GeoIP,${LOCALSTATEDIR}/db/GeoIP, \
${WRKSRC}/src/logswan.c
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/logswan
${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/logswan
.include <bsd.port.mk>

2
www/logswan/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (logswan-1.02.tar.gz) = QYtiKg9CUMbqYkpqwBQyEj+NtstJuXCexlDHFr4/OI4=
SIZE (logswan-1.02.tar.gz) = 14931

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_logswan_c,v 1.1.1.1 2015/11/05 16:19:04 sthen Exp $
--- src/logswan.c.orig Thu Nov 5 15:53:31 2015
+++ src/logswan.c Thu Nov 5 15:54:23 2015
@@ -106,8 +106,8 @@ int main (int argc, char *argv[]) {
begin = clock();
/* Initializing GeoIP */
- geoip = GeoIP_open("/usr/local/share/GeoIP/GeoIP.dat", GEOIP_MEMORY_CACHE);
- geoipv6 = GeoIP_open("/usr/local/share/GeoIP/GeoIPv6.dat", GEOIP_MEMORY_CACHE);
+ geoip = GeoIP_open("/var/db/GeoIP/GeoIP.dat", GEOIP_MEMORY_CACHE);
+ geoipv6 = GeoIP_open("/var/db/GeoIP/GeoIPv6.dat", GEOIP_MEMORY_CACHE);
/* Get log file size */
stat(intputFile, &logFileSize);

6
www/logswan/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
Logswan is a fast Web log analyzer using probabilistic data structures. It is
targeted at very large log files, typically APIs logs. It has constant memory
usage regardless of the log file size, and takes approximatively 4MB of RAM.
Unique visitors counting is performed using two HyperLogLog counters (one for
IPv4, and another one for IPv6), providing a relative accuracy of 0.10%.

4
www/logswan/pkg/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2015/11/05 16:19:04 sthen Exp $
@bin bin/logswan
share/doc/logswan/
share/doc/logswan/README.md