forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: https://bugs.gentoo.org/806055 Signed-off-by: Tomáš Mózes <[email protected]> Signed-off-by: Ionen Wolkens <[email protected]>
- Loading branch information
1 parent
591315d
commit 73486fd
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
DESCRIPTION="Free and open source log management" | ||
HOMEPAGE="https://www.graylog.org" | ||
SRC_URI="https://downloads.graylog.org/releases/graylog/${P}.tgz" | ||
|
||
LICENSE="GPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~ppc64 ~x86" | ||
RESTRICT="strip" | ||
|
||
RDEPEND="!app-admin/graylog2 | ||
acct-group/graylog | ||
acct-user/graylog | ||
>=virtual/jdk-1.8:*" | ||
|
||
DOCS=( | ||
README.markdown UPGRADING.rst | ||
) | ||
|
||
GRAYLOG_DATA_DIR="/var/lib/graylog" | ||
GRAYLOG_INSTALL_DIR="/usr/share/graylog" | ||
QA_PREBUILT="${GRAYLOG_INSTALL_DIR}/lib/sigar/libsigar*" | ||
|
||
src_prepare() { | ||
default | ||
|
||
# gentoo specific paths | ||
sed -i "s@\(node_id_file = \).*@\1${GRAYLOG_DATA_DIR}/node-id@g; \ | ||
s@\(message_journal_dir = \).*@\1${GRAYLOG_DATA_DIR}/data/journal@g;" \ | ||
graylog.conf.example || die | ||
} | ||
|
||
src_install() { | ||
default | ||
|
||
insinto /etc/graylog | ||
doins graylog.conf.example | ||
|
||
insinto "${GRAYLOG_INSTALL_DIR}" | ||
doins graylog.jar | ||
doins -r plugin | ||
|
||
keepdir "${GRAYLOG_DATA_DIR}" | ||
|
||
newconfd "${FILESDIR}/graylog.confd" graylog | ||
newinitd "${FILESDIR}/graylog.initd" graylog | ||
} | ||
|
||
pkg_postinst() { | ||
ewarn "Graylog does not depend on need.net any more (#439092)." | ||
ewarn | ||
ewarn "Please configure rc_need according to your binding address in:" | ||
ewarn "/etc/conf.d/graylog" | ||
} |