Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ bump-ebuilds ] www-apps/Thruk-3.18 #441

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions www-apps/Thruk/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST Thruk-3.14.2.tar.gz 25163279 BLAKE2B b49058ea95da4ca8f567806bae06b54cfe848f36b6fef7ee993a01a973e2ed3468937808a7958fd1da51621d7eeeef0f333304e421aeccfaf9a9984a1bb5f21d SHA512 674467d02c1039eb04eda2646bf8ce54a04c537302f1d85d040851c57b5a2bdf60518ee95b05462e63e21f63c1591452b4534ad619fed70f7e017e766e293f2b
DIST Thruk-3.14.tar.gz 25165087 BLAKE2B 890a206ce9947d32d519d62f2603ccc149625ec317af6f45bb6f86428d9eb0063e0ab9fad337016255a82c15c516b8b86a9899539d8dd396c67ef09800b54a41 SHA512 e46e9cce879ad519ca920a06f857008c3d810310fd3e4604589885a2010508f42971d64e794238360017b2980448eba9fdd7a9837c414f9e4351514e54dc67de
DIST Thruk-3.16.tar.gz 25244082 BLAKE2B a0d805c76827e93f4ff3e08443ea2f2ba6998ff45bc6e833ea977b2b88cfae14c62d2d84f3e258e97aef3862a75e34952b7f8a225671e0e27c679920d71fe815 SHA512 0f4410c1a0c0e4865a1f32e825e0fc7235290d19ec15ea3fb64ba6a0364bd91e890939e9b61a61c3e4f540823842a775609a2cab15bea001f6a12eec2298d186
DIST Thruk-3.18.tar.gz 27717800 BLAKE2B e74d56e3cbf292a50d526869720caaa503faa5e6fdd28a7733dc828e4ff00a61ee18a8cd5c3ad0074f67fefe8921cb620461c4cb51cf7b4c4da1786083142fa0 SHA512 8b3c88c9c9c22b7b8e0fb183e16d57a97923e91ad75a1720cac13fbc7d1b781078023bf19e696717b36510e9772bbb24d1a67d3ccef749154600a6b64eeea269
94 changes: 94 additions & 0 deletions www-apps/Thruk/Thruk-3.18.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="multibackend monitoring webinterface for Nagios/Icinga and others"
HOMEPAGE="https://www.thruk.org"
SRC_URI="https://github.com/sni/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-1"
SLOT="0"
KEYWORDS="~amd64"

PATCHES=(
"${FILESDIR}/01-threads.patch"
"${FILESDIR}/3.0-themes-precompiled.patch"
)

DEPEND="
dev-perl/Cpanel-JSON-XS
dev-perl/Date-Calc
dev-perl/forks
dev-perl/thruk_libs
www-apache/mod_fcgid
www-client/phantomjs-bin
www-servers/apache
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-perl/Module-Install
"

src_configure() {
econf \
--sysconfdir="${EPREFIX}"/etc/"${PN}" \
--datadir="${EPREFIX}"/usr/share/"${PN}" \
--localstatedir="${EPREFIX}"/var/lib/"${PN}" \
--with-initdir="${EPREFIX}"/usr/share/"${PN}"/etc/init.d/ \
--with-tempdir="${EPREFIX}"/usr/share/"${PN}"/tmp/ \
--with-logrotatedir="${EPREFIX}"/etc/logrotate.d \
--with-logdir="${EPREFIX}"/var/log/"${PN}" \
--with-thruk-user=apache \
--with-thruk-group=apache
}

src_install() {
default

mv "${D}/etc/Thruk/thruk_local.conf" "${D}/etc/Thruk/thruk_local.conf.example"

insinto /etc/apache2/vhosts.d/
newins "${FILESDIR}/apache_thruk.conf.example" thruk.conf.example

insinto /etc/logrotate.d/
newins "${FILESDIR}/thruk-base.lograte" thruk-base

keepdir /var/log/"${PN}"
fowners apache:apache /var/log/Thruk/
keepdir /usr/share/"${PN}"/var/

exeinto /usr/share/"${PN}"/bin/
doexe script/*.pl
doexe script/*.sh
doexe script/[cdegnrt]*

keepdir /usr/share/Thruk/tmp
fowners apache:apache /usr/share/Thruk/tmp

keepdir /etc/Thruk/panorama/
fowners apache:apache /etc/Thruk/panorama/
keepdir /var/lib/Thruk/
fowners apache:apache /var/lib/Thruk/
keepdir /var/lib/Thruk/sessions/
fowners apache:apache /var/lib/Thruk/sessions/
keepdir /var/lib/Thruk/users/
fowners apache:apache /var/lib/Thruk/users/
}

pkg_preinst(){
if [ "$(grep -L '^APACHE2_OPTS=.*-DFCGID' "${EROOT}/etc/conf.d/apache2"|wc -l)" -gt 0 ]; then
# Probably the first time we are installed
# set some more sane default settings in /etc/conf.d/apache2

mkdir -p "${D}/etc/conf.d/"
sed -E '
s#^(APACHE2_OPTS\s*=\s*")([^"]+)(")#\1\2 -D FCGID\3#
' < "${EROOT}/etc/conf.d/apache2" > "${D}/etc/conf.d/apache2"
fi

if [ ! -r "${EROOT}/etc/Thruk/thruk_local.conf" ]; then
# Probably the first time we are installed
cp "${D}/etc/Thruk/thruk_local.conf.example" "${D}/etc/Thruk/thruk_local.conf"
fi
}