aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/Makefile1
-rw-r--r--www/kiwix-tools/Makefile27
-rw-r--r--www/kiwix-tools/distinfo3
-rw-r--r--www/kiwix-tools/files/kiwix_serve.in35
-rw-r--r--www/kiwix-tools/files/library.xml4
-rw-r--r--www/kiwix-tools/pkg-descr7
-rw-r--r--www/kiwix-tools/pkg-plist9
7 files changed, 86 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index d33567703273..227f8d946c99 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -333,6 +333,7 @@
SUBDIR += kf5-khtml
SUBDIR += kf5-kjs
SUBDIR += kf5-kjsembed
+ SUBDIR += kiwix-tools
SUBDIR += kohana
SUBDIR += kurly
SUBDIR += larbin
diff --git a/www/kiwix-tools/Makefile b/www/kiwix-tools/Makefile
new file mode 100644
index 000000000000..37e69d21f03e
--- /dev/null
+++ b/www/kiwix-tools/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME= kiwix-tools
+DISTVERSION= 0.8.0
+CATEGORIES= www
+
+MAINTAINER= me@int19h.org
+COMMENT= Command-line Kiwix tools
+
+LICENSE= GPLv3+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libkiwix.so:devel/kiwix-lib \
+ libmicrohttpd.so:www/libmicrohttpd \
+ libctpp2.so:textproc/ctpp2 \
+ libzim.so:devel/libzim
+
+USES= meson pkgconfig
+USE_GITHUB= yes
+GH_ACCOUNT= kiwix
+USE_RC_SUBR= kiwix_serve
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/kiwix
+ ${INSTALL_DATA} files/library.xml ${STAGEDIR}${PREFIX}/share/kiwix
+
+.include <bsd.port.mk>
diff --git a/www/kiwix-tools/distinfo b/www/kiwix-tools/distinfo
new file mode 100644
index 000000000000..b5c1d1ccddc2
--- /dev/null
+++ b/www/kiwix-tools/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1548657926
+SHA256 (kiwix-kiwix-tools-0.8.0_GH0.tar.gz) = 4cf3289670d42cdc9a5c9145544f9936aa0a2f125582b36ac843177f69487295
+SIZE (kiwix-kiwix-tools-0.8.0_GH0.tar.gz) = 223082
diff --git a/www/kiwix-tools/files/kiwix_serve.in b/www/kiwix-tools/files/kiwix_serve.in
new file mode 100644
index 000000000000..7057f1ec14e2
--- /dev/null
+++ b/www/kiwix-tools/files/kiwix_serve.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: kiwix_serve
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# kiwix_serve_enable (bool): Set to NO by default.
+# Set it to YES to enable kiwix_serve.
+# kiwix_serve_port (int): Port on which the daemon will handle HTTP
+# requests. Set to 80 by default.
+# kiwix_serve_library (path): XML file listing ZIM files for the daemon
+# to serve. Use kiwix-manage to create one,
+# and to add ZIM files to it. Set to
+# %%PREFIX%%/share/kiwix/library.xml by default.
+
+. /etc/rc.subr
+
+name=kiwix_serve
+rcvar=kiwix_serve_enable
+
+load_rc_config $name
+
+: ${kiwix_serve_enable:=NO}
+: ${kiwix_serve_port=80}
+: ${kiwix_serve_library="%%PREFIX%%/share/kiwix/library.xml"}
+
+command=%%PREFIX%%/bin/kiwix-serve
+command_args="--daemon --port $kiwix_serve_port --library $kiwix_serve_library"
+
+run_rc_command "$1"
diff --git a/www/kiwix-tools/files/library.xml b/www/kiwix-tools/files/library.xml
new file mode 100644
index 000000000000..e85fb2a3a92e
--- /dev/null
+++ b/www/kiwix-tools/files/library.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<!-- See kiwix-manage(1) on how to add downloaded ZIM files to the library. -->
+<library version="20110515">
+</library>
diff --git a/www/kiwix-tools/pkg-descr b/www/kiwix-tools/pkg-descr
new file mode 100644
index 000000000000..466fb579cb88
--- /dev/null
+++ b/www/kiwix-tools/pkg-descr
@@ -0,0 +1,7 @@
+Kiwix is an offline reader for web content archived in ZIM format. It is
+particularly tailored towards Wikipedia and other wikis.
+
+This package contains command-line Kiwix tools: a local HTTP server to serve
+content, and a set of tools to manage ZIM files.
+
+WWW: http://www.kiwix.org/
diff --git a/www/kiwix-tools/pkg-plist b/www/kiwix-tools/pkg-plist
new file mode 100644
index 000000000000..49524ffcf4e6
--- /dev/null
+++ b/www/kiwix-tools/pkg-plist
@@ -0,0 +1,9 @@
+bin/kiwix-manage
+bin/kiwix-read
+bin/kiwix-search
+bin/kiwix-serve
+man/fr/man1/kiwix-manage.1.gz
+man/fr/man1/kiwix-serve.1.gz
+man/man1/kiwix-manage.1.gz
+man/man1/kiwix-serve.1.gz
+share/kiwix/library.xml