From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AA1F8138359 for ; Fri, 16 Oct 2020 11:49:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F1B52E0830; Fri, 16 Oct 2020 11:49:34 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ABE51E082D for ; Fri, 16 Oct 2020 11:49:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A9EE434105C for ; Fri, 16 Oct 2020 11:49:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 575833A5 for ; Fri, 16 Oct 2020 11:49:32 +0000 (UTC) From: "Louis Sautier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Louis Sautier" Message-ID: <1602848960.590afb58d9dbca67e9160a9f36f67f6181854ac9.sbraz@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/icinga2/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/icinga2/icinga2-9999.ebuild X-VCS-Directories: net-analyzer/icinga2/ X-VCS-Committer: sbraz X-VCS-Committer-Name: Louis Sautier X-VCS-Revision: 590afb58d9dbca67e9160a9f36f67f6181854ac9 X-VCS-Branch: master Date: Fri, 16 Oct 2020 11:49:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4fe8947f-148d-43dd-b1ba-cadf7b414074 X-Archives-Hash: 37622895cbae404f7d537baabc8261ed commit: 590afb58d9dbca67e9160a9f36f67f6181854ac9 Author: Louis Sautier gentoo org> AuthorDate: Fri Oct 16 11:44:58 2020 +0000 Commit: Louis Sautier gentoo org> CommitDate: Fri Oct 16 11:49:20 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=590afb58 net-analyzer/icinga2: sync live ebuild with 2.12.1 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Louis Sautier gentoo.org> net-analyzer/icinga2/icinga2-9999.ebuild | 92 ++++++++++++-------------------- 1 file changed, 33 insertions(+), 59 deletions(-) diff --git a/net-analyzer/icinga2/icinga2-9999.ebuild b/net-analyzer/icinga2/icinga2-9999.ebuild index bb0f2605e73..c19de03c6e7 100644 --- a/net-analyzer/icinga2/icinga2-9999.ebuild +++ b/net-analyzer/icinga2/icinga2-9999.ebuild @@ -1,26 +1,27 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 + +inherit cmake systemd + if [[ ${PV} != 9999 ]]; then - inherit cmake-utils depend.apache eutils systemd toolchain-funcs wxwidgets SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm64 ~x86" else - inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs wxwidgets + inherit git-r3 EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" - EGIT_BRANCH="master" fi DESCRIPTION="Distributed, general purpose, network monitoring engine" -HOMEPAGE="http://icinga.org/icinga2" +HOMEPAGE="https://icinga.com/" LICENSE="GPL-2" SLOT="0" -IUSE="console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" -WX_GTK_VER="3.0" +IUSE="console jumbo-build libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" -CDEPEND=" +# Add accounts to DEPEND because of fowners in src_install +DEPEND=" !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) >=dev-libs/boost-1.66.0:=[context] @@ -28,39 +29,27 @@ CDEPEND=" mariadb? ( dev-db/mariadb-connector-c:= ) mysql? ( dev-db/mysql-connector-c:= ) postgres? ( dev-db/postgresql:= ) - dev-libs/yajl" - -DEPEND=" - ${CDEPEND} + dev-libs/yajl:= + acct-user/icinga + acct-group/icinga + acct-group/icingacmd" +BDEPEND=" sys-devel/bison >=sys-devel/flex-2.5.35" - RDEPEND=" - ${CDEPEND} + ${DEPEND} plugins? ( || ( net-analyzer/monitoring-plugins net-analyzer/nagios-plugins ) ) mail? ( virtual/mailx ) - acct-user/icinga - acct-group/icinga - acct-group/icingacmd acct-group/nagios" REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )" -want_apache2 - -pkg_setup() { - depend.apache_pkg_setup -} - src_configure() { - sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die local mycmakeargs=( - -DICINGA2_UNITY_BUILD=FALSE - -DCMAKE_VERBOSE_MAKEFILE=ON - -DCMAKE_BUILD_TYPE=None + -DICINGA2_UNITY_BUILD=$(usex jumbo-build) -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 @@ -69,9 +58,10 @@ src_configure() { -DICINGA2_GROUP=icingacmd -DICINGA2_COMMAND_GROUP=icingacmd -DICINGA2_RUNDIR=/run - -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes - -DUSE_SYSTEMD=$(usex systemd ON OFF) + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON + -DUSE_SYSTEMD=$(usex systemd) -DLOGROTATE_HAS_SU=ON + -DICINGA2_LTO_BUILD=$(usex lto) ) # default to off if minimal, allow the flags to be set otherwise if use minimal; then @@ -81,47 +71,26 @@ src_configure() { ) else mycmakeargs+=( - -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF) - -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF) - ) - fi - # LTO - if use lto; then - mycmakeargs+=( - -DICINGA2_LTO_BUILD=ON - ) - else - mycmakeargs+=( - -DICINGA2_LTO_BUILD=OFF + -DICINGA2_WITH_PGSQL=$(usex postgres) + -DICINGA2_WITH_MYSQL=$(usex mysql yes $(usex mariadb)) ) fi - cmake-utils_src_configure + cmake_src_configure } src_install() { - BUILDDIR="${WORKDIR}"/icinga2-${PV}_build - cd "${BUILDDIR}" || die - - emake DESTDIR="${D}" install - - einstalldocs + cmake_src_install newinitd "${FILESDIR}"/icinga2.initd-3 icinga2 - if use mysql ; then - docinto schema - newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql - docinto schema/upgrade - dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* - fi - if use mariadb ; then # same as mysql + if use mysql || use mariadb; then docinto schema newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql docinto schema/upgrade dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* fi - if use postgres ; then + if use postgres; then docinto schema newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql docinto schema/upgrade @@ -163,8 +132,13 @@ src_install() { } pkg_postinst() { - if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then - elog "DB IDO schema upgrade may be required required. - https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" + if [[ "${PV}" != 9999 ]]; then + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${PV}" -gt "${v}"; then + elog "DB IDO schema upgrade may be required." + elog "https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" + fi + done fi }