diff options
author | Ruven Pillay <someone@users.sourceforge.net> | 2024-03-27 16:20:38 +0100 |
---|---|---|
committer | Ruven Pillay <someone@users.sourceforge.net> | 2024-03-27 16:20:38 +0100 |
commit | 509dfc7e91ee576cd00201703a605ecec28748d8 (patch) | |
tree | c58480daa8069fafd8a9ed76414fe0a4e98f83f5 | |
parent | Revert "sys-boot/boot-repair-iso-download: new package" (diff) | |
download | guru-509dfc7e91ee576cd00201703a605ecec28748d8.tar.gz guru-509dfc7e91ee576cd00201703a605ecec28748d8.tar.bz2 guru-509dfc7e91ee576cd00201703a605ecec28748d8.zip |
net-misc/iipsrv: new package
Merge request for new net-misc/iipsrv package with user and group accounts (both set to -1) for the server process in acct-user/iipsrv and acct--group/iipsrv. net-misc/iipsrv includes both OpenRC and Systemd files and configuration.
iipsrv is an image server and transcoder for high resolution and scientific images that supports the IIP, IIIF, Deepzoom and Zoomify APIs (https://iipimage.sourceforge.io)
Signed-off-by: Ruven Pillay <someone@users.sourceforge.net>
-rw-r--r-- | acct-group/iipsrv/iipsrv-0-r1.ebuild | 8 | ||||
-rw-r--r-- | acct-group/iipsrv/metadata.xml | 12 | ||||
-rw-r--r-- | acct-user/iipsrv/iipsrv-0-r1.ebuild | 13 | ||||
-rw-r--r-- | acct-user/iipsrv/metadata.xml | 12 | ||||
-rw-r--r-- | net-misc/iipsrv/Manifest | 1 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv-1.2-make.patch | 11 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv-1.2-rawtile.patch | 10 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv.apache2.conf | 6 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv.confd | 84 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv.initd | 32 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv.lighttpd.conf | 9 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv.systemd.conf | 77 | ||||
-rw-r--r-- | net-misc/iipsrv/files/iipsrv.systemd.service | 21 | ||||
-rw-r--r-- | net-misc/iipsrv/iipsrv-1.2.ebuild | 77 | ||||
-rw-r--r-- | net-misc/iipsrv/metadata.xml | 33 |
15 files changed, 406 insertions, 0 deletions
diff --git a/acct-group/iipsrv/iipsrv-0-r1.ebuild b/acct-group/iipsrv/iipsrv-0-r1.ebuild new file mode 100644 index 000000000..35f064dae --- /dev/null +++ b/acct-group/iipsrv/iipsrv-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-group + +ACCT_GROUP_ID=-1 diff --git a/acct-group/iipsrv/metadata.xml b/acct-group/iipsrv/metadata.xml new file mode 100644 index 000000000..ceab52578 --- /dev/null +++ b/acct-group/iipsrv/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>ruven@users.sourceforge.net</email> + <name>Ruven</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> +</pkgmetadata> diff --git a/acct-user/iipsrv/iipsrv-0-r1.ebuild b/acct-user/iipsrv/iipsrv-0-r1.ebuild new file mode 100644 index 000000000..bbc0861fe --- /dev/null +++ b/acct-user/iipsrv/iipsrv-0-r1.ebuild @@ -0,0 +1,13 @@ +# Copyright 2019-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-user + +DESCRIPTION="User for iipsrv" + +ACCT_USER_ID=-1 +ACCT_USER_GROUPS=( "iipsrv" ) + +acct-user_add_deps diff --git a/acct-user/iipsrv/metadata.xml b/acct-user/iipsrv/metadata.xml new file mode 100644 index 000000000..ceab52578 --- /dev/null +++ b/acct-user/iipsrv/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>ruven@users.sourceforge.net</email> + <name>Ruven</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> +</pkgmetadata> diff --git a/net-misc/iipsrv/Manifest b/net-misc/iipsrv/Manifest new file mode 100644 index 000000000..345b1c5a5 --- /dev/null +++ b/net-misc/iipsrv/Manifest @@ -0,0 +1 @@ +DIST iipsrv-1.2.tar.bz2 719024 BLAKE2B be1afb93f6367f58fd68c71b6e80c53601160b21cf90c76b42fef722d428555a2f0389864824c85db298112eef97f1ff6b3a5e345491a0096df11e123945872c SHA512 76d7dee476384e24dc13c8e37ed14999c8c584742303456cbc893eb11b2e5e6effe01f208f84830cefb48694290252908826550bf89d0fb1a8c6c82f1bc30fcd diff --git a/net-misc/iipsrv/files/iipsrv-1.2-make.patch b/net-misc/iipsrv/files/iipsrv-1.2-make.patch new file mode 100644 index 000000000..f9acb3ed4 --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv-1.2-make.patch @@ -0,0 +1,11 @@ +--- iipsrv-1.2/Makefile.am 2021-04-09 22:29:51.000000000 +0200 ++++ iipsrv-1.2/Makefile.am.new 2023-10-11 00:13:21.665852075 +0200 +@@ -1,6 +1,6 @@ + AUTOMAKE_OPTIONS = dist-bzip2 + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = fcgi src man ++SUBDIRS = src man + +-EXTRA_DIST = TODO COPYING.FCGI doc windows ++EXTRA_DIST = doc windows diff --git a/net-misc/iipsrv/files/iipsrv-1.2-rawtile.patch b/net-misc/iipsrv/files/iipsrv-1.2-rawtile.patch new file mode 100644 index 000000000..2b50a94ce --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv-1.2-rawtile.patch @@ -0,0 +1,10 @@ +--- iipsrv-1.2/src/RawTile.h ++++ iipsrv-1.2/src/RawTile.new.h +@@ -26,6 +26,7 @@ + #include <string> + #include <cstdlib> + #include <ctime> ++#include <cstdint> + + #if !( (__cplusplus >= 201103L) || ((defined(_MSC_VER) && _MSC_VER >= 1900)) ) + #include <stdint.h> // Required for C++98 diff --git a/net-misc/iipsrv/files/iipsrv.apache2.conf b/net-misc/iipsrv/files/iipsrv.apache2.conf new file mode 100644 index 000000000..2caeb4e20 --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv.apache2.conf @@ -0,0 +1,6 @@ +<IfDefine PROXY> + +ProxyPass "/fcgi-bin/iipsrv.fcgi" "fcgi://0.0.0.0:9000/" +ProxyPass "/iiif" "fcgi://0.0.0.0:9000/" + +</IfDefine> diff --git a/net-misc/iipsrv/files/iipsrv.confd b/net-misc/iipsrv/files/iipsrv.confd new file mode 100644 index 000000000..63443776a --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv.confd @@ -0,0 +1,84 @@ +# OpenRC configuration file + + +# Parameters to pass to OpenRC init: + +# Set which host and port iipsrv should listen +HOST="0.0.0.0" +PORT=9000 + +# Set user and group under which iipsrv should run +USER=iipsrv +GROUP=iipsrv + + +# Parameters to pass directly to iipsrv. +# See https://iipimage.sourceforge.io/documentation/server for full details. +# Note that these must be exported: + +# File to which iipsrv should log +export LOGFILE="/var/log/iipsrv.log" + +# Level of logging (0 is no logging) +export VERBOSITY=1 + +# Set a mapping from a URL prefix to a supported protocol +export URI_MAP="iiif=>IIIF" + +# Max internal cache size for raw tile data in MB +#MAX_IMAGE_CACHE_SIZE=10 + +# Prefix automatically added to each file path +#FILESYSTEM_PREFIX= + +# Suffix automatically added to end of each file path +#FILESYSTEM_SUFFIX + +# Default JPEG quality factor +#JPEG_QUALITY=75 + +# Default PNG deflate compression factor +# PNG_QUALITY=1 + +# Default WebP quality factor +#WEBP_QUALITY=50 + +# Maximum output image dimensions in pixels +#MAX_CVT=5000 + +# Whether image may be upscaled: 0 = no, 1 = yes +#ALLOW_UPSCALING=1 + +# Maximum number of quality layers to decode in supported formats (-1 for all layers) +# MAX_LAYERS=-1 + +# TIFF image to use as watermark +#WATERMARK= + +# Probability (between 0.0-1.0) that a tile will have watermark applied +#WATERMARK_PROBABILITY=1.0 + +# Opacity (between 0.0-1.0) applied to watermark image +#WATERMARK_OPACITY=1 + +#Comma-delimitted list of memcached servers with optional port numbers +#MEMCACHED_SERVERS= + +#Time in seconds that cache remains fresh +#MEMCACHED_TIMEOUT=86400 + +# Interpolation method to use for rescaling when using image export +# 0 = nearest neighbout, 1 = bilinear +#INTERPOLATION=1 + +# Cross Origin Resource Sharing setting. Disabled by default +#CORS= + +# Set a base URL for use in IIIF requests if using web server rewriting +#BASE_URL= + +# Set the HTTP Cache-Control header +#CACHE_CONTROL="max-age=86400" + +# Pattern following name stem to indicate an image sequence +#FILENAME_PATTERN="_pyr_" diff --git a/net-misc/iipsrv/files/iipsrv.initd b/net-misc/iipsrv/files/iipsrv.initd new file mode 100644 index 000000000..8426f7f47 --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv.initd @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="IIPImage server" + +command="/usr/sbin/iipsrv" +command_args="--bind ${HOST}:${PORT}" +command_user="${USER}:${GROUP}" +command_background=true + +extra_started_commands="reload" +description_reload="Empty internal caches" + +pidfile="/run/${RC_SVCNAME}.pid" + + +start_pre() +{ + if [ ${LOGFILE} != "syslog" ]; then + # Make sure logfile is writable + checkpath --quiet --file --owner ${command_user} ${LOGFILE} + fi +} + + +reload() +{ + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-misc/iipsrv/files/iipsrv.lighttpd.conf b/net-misc/iipsrv/files/iipsrv.lighttpd.conf new file mode 100644 index 000000000..df62b1d21 --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv.lighttpd.conf @@ -0,0 +1,9 @@ +server.modules += ("mod_fastcgi") +fastcgi.server = ( + "/fcgi-bin/iipsrv.fcgi" => ( + ("host"=>"0.0.0.0", "port"=>9000, "check-local"=>"disable") + ), + "/iiif" => ( + ("host"=>"0.0.0.0", "port"=>9000, "check-local"=>"disable") + ) +) diff --git a/net-misc/iipsrv/files/iipsrv.systemd.conf b/net-misc/iipsrv/files/iipsrv.systemd.conf new file mode 100644 index 000000000..353a40fde --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv.systemd.conf @@ -0,0 +1,77 @@ +# Systemd configuration file for iipsrv + +# Paramters passed to systemd. +# Set which host and port iipsrv should listen +HOST="0.0.0.0" +PORT=9000 + + +# Parameters to pass directly to iipsrv. +# See http://iipimage.sourceforge.net/documentation/server for full details. + +# File to which iipsrv should log +LOGFILE="/var/log/iipsrv.log" + +# Level of logging (0 is no logging) +VERBOSITY=1 + +# Set a mapping from a URL prefix to a supported protocol +URI_MAP="iiif=>IIIF" + +# Max internal cache size for raw tile data in MB +#MAX_IMAGE_CACHE_SIZE=10 + +# Prefix automatically added to each file path +#FILESYSTEM_PREFIX= + +# Suffix automatically added to end of each file path +#FILESYSTEM_SUFFIX + +# Default JPEG quality factor +#JPEG_QUALITY=75 + +# Default PNG deflate compression factor +# PNG_QUALITY=1 + +# Default WebP quality factor +#WEBP_QUALITY=50 + +# Maximum output image dimensions in pixels +#MAX_CVT=5000 + +# Whether image may be upscaled: 0 = no, 1 = yes +#ALLOW_UPSCALING=1 + +# Maximum number of quality layers to decode in supported formats (-1 for all layers) +# MAX_LAYERS=-1 + +# TIFF image to use as watermark +#WATERMARK= + +# Probability (between 0.0-1.0) that a tile will have watermark applied +#WATERMARK_PROBABILITY=1.0 + +# Opacity (between 0.0-1.0) applied to watermark image +#WATERMARK_OPACITY=1 + +#Comma-delimitted list of memcached servers with optional port numbers +#MEMCACHED_SERVERS= + +#Time in seconds that cache remains fresh +#MEMCACHED_TIMEOUT=86400 + +# Interpolation method to use for rescaling when using image export +# 0 = nearest neighbout, 1 = bilinear +#INTERPOLATION=1 + +# Cross Origin Resource Sharing setting. Disabled by default +#CORS= + +# Set a base URL for use in IIIF requests if using web server rewriting +#BASE_URL= + +# Set the HTTP Cache-Control header +#CACHE_CONTROL="max-age=86400" + +# Pattern following name stem to indicate an image sequence +#FILENAME_PATTERN="_pyr_" diff --git a/net-misc/iipsrv/files/iipsrv.systemd.service b/net-misc/iipsrv/files/iipsrv.systemd.service new file mode 100644 index 000000000..7641b0ef6 --- /dev/null +++ b/net-misc/iipsrv/files/iipsrv.systemd.service @@ -0,0 +1,21 @@ +[Install] +WantedBy=multi-user.target + +[Unit] +Description=IIPImage server +After=network.target +Documentation=https://iipimage.sourceforge.io man:iipsrv(8) + +[Service] +User=iipsrv +Group=iipsrv + +Environment="HOST=0.0.0.0" "PORT=9000" "LOGFILE=/var/log/iipsrv.log" +EnvironmentFile=-/etc/default/iipsrv + +# Make sure logfile is writable by our user +ExecStartPre=+/bin/sh -ec "if [[ ${LOGFILE} != syslog ]]; then /usr/bin/touch -a ${LOGFILE} && chown iipsrv:iipsrv ${LOGFILE}; fi" + +ExecStart=/usr/sbin/iipsrv --bind ${HOST}:${PORT} +ExecReload=kill -HUP $MAINPID +Restart=on-failure diff --git a/net-misc/iipsrv/iipsrv-1.2.ebuild b/net-misc/iipsrv/iipsrv-1.2.ebuild new file mode 100644 index 000000000..3b3d7fd82 --- /dev/null +++ b/net-misc/iipsrv/iipsrv-1.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +DESCRIPTION="High performance image server for high resolution and scientific images" +HOMEPAGE="https://iipimage.sourceforge.io" +SRC_URI="mirror://sourceforge/iipimage/IIP%20Server/${P}/${P}.tar.bz2" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +IUSE="zlib png webp jpeg2k memcached lighttpd apache2" + +DEPEND=" + dev-libs/fcgi + media-libs/libjpeg-turbo + media-libs/tiff + memcached? ( dev-libs/libmemcached-awesome ) + png? ( media-libs/libpng ) + webp? ( media-libs/libwebp ) + jpeg2k? ( media-libs/openjpeg ) + apache2? ( www-servers/apache[apache2_modules_proxy,apache2_modules_proxy_fcgi] ) + lighttpd? ( www-servers/lighttpd )" + +RDEPEND=" + acct-user/iipsrv + acct-group/iipsrv + ${DEPEND}" + +BDEPEND="${DEPEND}" + +# Skip autoconf m4 macro warning +QA_CONFIG_IMPL_DECL_SKIP=( TIFFGetVersion ) + +# Patches to add missing include to RawTile class and remove bundled libfcgi sources +PATCHES=( + "${FILESDIR}/${P}-rawtile.patch" + "${FILESDIR}/${P}-make.patch" +) + +src_install() { + + # Rename and install our binary + newsbin src/iipsrv.fcgi iipsrv + doman man/iipsrv.8 + + # Install systemd service + systemd_newunit "${FILESDIR}"/${PN}.systemd.service iipsrv.service + # Install systemd environment file + insinto /etc/default/ + newins "${FILESDIR}"/${PN}.systemd.conf iipsrv + + # Install OpenRC script and config + newinitd "${FILESDIR}"/iipsrv.initd iipsrv + newconfd "${FILESDIR}"/iipsrv.confd iipsrv + + # Install Lighttpd configuration + if use lighttpd ; then + elog "Installing Lighttpd configuration ..." + elog "Add line 'include \"iipsrv.conf\"' to /etc/lighttpd/lighttpd.conf and (re)start Lighttpd" + insinto /etc/lighttpd/ + newins "${FILESDIR}"/iipsrv.lighttpd.conf iipsrv.conf + fi + + # Install Apache configuration + if use apache2 ; then + elog "Installing Apache configuration ..." + elog "Define PROXY in /etc/conf.d/apache2 and (re)start Apache" + insinto /etc/apache2/modules.d/ + newins "${FILESDIR}"/iipsrv.apache2.conf 20_iipsrv.conf + fi + +} diff --git a/net-misc/iipsrv/metadata.xml b/net-misc/iipsrv/metadata.xml new file mode 100644 index 000000000..24aa69064 --- /dev/null +++ b/net-misc/iipsrv/metadata.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>ruven@users.sourceforge.net</email> + <name>Ruven</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + + <longdescription>IIPImage is an advanced high-performance feature-rich image server system for web-based streamed viewing + and zooming of ultra high-resolution images. It is designed to be fast and bandwidth-efficient with low processor and memory + requirements. The system can comfortably handle gigapixel size images as well as advanced image features such as 8, 16 and 32 bits per + channel, CIELAB colorimetric images and scientific imagery such as multispectral images and digital elevation maps.</longdescription> + <use> + <flag name="lighttpd">Add Lighttpd config file</flag> + <flag name="apache2">Add Apache mox_proxy_fcgi config file</flag> + </use> + + <upstream> + <maintainer> + <email>ruven@users.sourceforge.net</email> + <name>Ruven</name> + </maintainer> + <changelog>https://github.com/ruven/iipsrv/commits/master</changelog> + <doc>https://iipimage.sourceforge.net/documentation/server</doc> + <remote-id type="github">ruven/iipsrv</remote-id> + <remote-id type="sourceforge">iipimage</remote-id> + </upstream> + +</pkgmetadata> |