1
0
mirror of https://github.com/dguglielmi/sunny-overlay.git synced 2025-12-06 22:32:37 +01:00

www-servers/tang: add ebuild

This commit is contained in:
2018-07-26 11:57:39 +02:00
parent 754a560dc7
commit 0aedf94dbd
3 changed files with 96 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
AUX tang-6-optional-nagios.patch 1638 BLAKE2B a31b0c0d1503baec3a9c56c2055b59f8fef716c3a30d5524a03ca7e122dbbaa6281904fab06a54101ff96f22719b0e1b3532e2bbb2ea4aa54e765764aed61ce9 SHA512 3ccec9683e1b94b7072cf6b4c0f3c5ce8d6078979bbff4571915dcd64c289d6f6acd3fdc068569e6ce6a47403a4b99b9afec0a593c0894b06289eb3f2f564667
DIST tang-6.tar.bz2 118040 BLAKE2B 22b0ae89db9d742f488037ce0fb99893d7b963917dd843e36c66650893678e82b312f1fdbe29c7dd7898d473ac69064182836bc3eeae666379a4a2599eb99d42 SHA512 60883e45373a991c1e5e60e2313232bf36eacd0b3fcdc025a5358298636c92a074ac1a6b17f7b4096a20dcfca4402e162ae79137b3447a64d5091e6f96a95e5f
EBUILD tang-6.ebuild 781 BLAKE2B 5b65428a905e9ce6b6c98e0cd14beec4000ee6467a8e7f670580823bd6249eeacb28e729fdc20d86593406075b462ed142e08bd5f9ca6f826ac362a531c0783b SHA512 23e34ebcf225abacc7779f02aef6dd407bfba3f4353ec23e63c820741ade5d13312132e3cbf6a689087892f379b326001eb3fc28e8c1e4db3d9da0ca340c90af

View File

@@ -0,0 +1,56 @@
diff -dNur a/configure.ac b/configure.ac
--- a/configure.ac 2017-06-14 14:20:42.000000000 +0200
+++ b/configure.ac 2018-07-25 17:19:37.832581622 +0200
@@ -29,6 +29,11 @@
PKG_CHECK_MODULES([jose], [jose >= 8])
PKG_CHECK_MODULES([systemd], [systemd])
+AC_ARG_ENABLE([nagiosplugin],
+ AS_HELP_STRING([--disable-nagios], [Disable Nagios plugin]))
+
+AM_CONDITIONAL([NAGIOSPLUGIN], [test "x$enable_nagiosplugin" != "xno"])
+
AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
[],
diff -dNur a/Makefile.am b/Makefile.am
--- a/Makefile.am 2017-06-10 15:29:39.000000000 +0200
+++ b/Makefile.am 2018-07-25 17:21:39.342292389 +0200
@@ -16,12 +16,16 @@
dist_libexec_SCRIPTS = src/tangd-update src/tangd-keygen
libexec_PROGRAMS = src/tangd
+if NAGIOSPLUGIN
nagios_PROGRAMS = src/tang
man1_MANS = doc/tang-nagios.1
+endif
man8_MANS = doc/tang.8
src_tangd_SOURCES = src/http.c src/http.h src/tangd.c
+if NAGIOSPLUGIN
src_tang_SOURCES = src/nagios.c
+endif
%: %.in
$(AM_V_GEN)mkdir -p "`dirname "$@"`"
@@ -32,12 +36,18 @@
$(srcdir)/$@.in > $@
AM_TESTS_ENVIRONMENT = SD_ACTIVATE="@SD_ACTIVATE@" PATH=$(srcdir)/src:$(builddir)/src:$(PATH)
-TESTS = tests/adv tests/rec tests/nagios
+TESTS = tests/adv tests/rec
+if NAGIOSPLUGIN
+TESTS += tests/nagios
+endif
CLEANFILES = $(nodist_systemdsystemunit_DATA)
EXTRA_DIST = \
$(foreach unit,$(nodist_systemdsystemunit_DATA),$(unit).in) \
COPYING \
$(TESTS) \
- $(man1_MANS) \
$(man8_MANS)
+
+if NAGIOSPLUGIN
+EXTRA_DIST += $(man1_MANS)
+endif

View File

@@ -0,0 +1,37 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools systemd
DESCRIPTION="Tang is a server for binding data to network presence"
HOMEPAGE="https://latchset.github.io/"
SRC_URI="https://github.com/latchset/${PN}/releases/download/v${PV}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="nagios"
DEPEND=">=net-libs/http-parser-2.8.0
sys-apps/systemd
>=dev-libs/jose-8"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}"/${P}-optional-nagios.patch )
src_prepare() {
default
eautoreconf
}
src_configure() {
local myconf=(
$(use_enable nagios nagiosplugin)
--localstatedir="${EPREFIX}/var"
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
)
econf "${myconf[@]}"
}