diff options
author | Louis Sautier <sautier.louis@gmail.com> | 2017-03-26 19:52:45 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-04-01 14:12:10 +0200 |
commit | 1435e8b19be12bd06f0ef322a884bd70b9c05f6f (patch) | |
tree | 5bc660e2ff77217047473ee4a93e62b1328db5e7 /net-irc/znc/znc-1.6.5.ebuild | |
parent | sci-biology/tophat: Unbundle python modules (diff) | |
download | gentoo-1435e8b19be12bd06f0ef322a884bd70b9c05f6f.tar.gz gentoo-1435e8b19be12bd06f0ef322a884bd70b9c05f6f.tar.bz2 gentoo-1435e8b19be12bd06f0ef322a884bd70b9c05f6f.zip |
net-irc/znc: bump to 1.6.5, add Python 3.6
Gentoo-Bug: 613286
Package-Manager: Portage-2.3.4, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4303
Diffstat (limited to 'net-irc/znc/znc-1.6.5.ebuild')
-rw-r--r-- | net-irc/znc/znc-1.6.5.ebuild | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/net-irc/znc/znc-1.6.5.ebuild b/net-irc/znc/znc-1.6.5.ebuild new file mode 100644 index 000000000000..ae97ab976e87 --- /dev/null +++ b/net-irc/znc/znc-1.6.5.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{4,5,6} ) +inherit eutils python-single-r1 readme.gentoo-r1 systemd user + +MY_PV=${PV/_/-} +GTEST_VER="1.7.0" +GTEST_URL="https://github.com/google/googletest/archive/release-${GTEST_VER}.tar.gz -> googletest-release-${GTEST_VER}.tar.gz" +DESCRIPTION="An advanced IRC Bouncer" + +SRC_URI=" + http://znc.in/releases/archive/${PN}-${MY_PV}.tar.gz + test? ( ${GTEST_URL} ) +" +KEYWORDS="~amd64 ~arm ~x86" + +HOMEPAGE="http://znc.in" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="daemon debug +ipv6 +icu libressl perl python +ssl sasl tcl test +zlib" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + icu? ( dev-libs/icu:= ) + perl? ( >=dev-lang/perl-5.10:= ) + python? ( ${PYTHON_DEPS} ) + sasl? ( >=dev-libs/cyrus-sasl-2 ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + tcl? ( dev-lang/tcl:0= ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S=${WORKDIR}/${PN}-${MY_PV} + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.1-systemwideconfig.patch + "${FILESDIR}"/${PN}-1.6.1-create-pidfile-per-default.patch +) + +pkg_setup() { + if use python; then + python-single-r1_pkg_setup + fi + if use daemon; then + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} + # The home directory was previously set to /dev/null + # This caused a bug with the systemd unit + # https://bugs.gentoo.org/521916 + esethome ${PN} /var/lib/${PN} + fi +} + +src_configure() { + econf \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ + $(use_enable debug) \ + $(use_enable icu charset) \ + $(use_enable ipv6) \ + $(use_enable perl) \ + $(use_enable python) \ + $(use_enable sasl cyrus) \ + $(use_enable ssl openssl) \ + $(use_enable tcl) \ + $(use_enable zlib) \ + $(use_with test gtest "${WORKDIR}/googletest-release-${GTEST_VER}") +} + +src_install() { + default + dodoc NOTICE + if use daemon; then + newinitd "${FILESDIR}"/znc.initd-r1 znc + newconfd "${FILESDIR}"/znc.confd-r1 znc + fi + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo") || die + DISABLE_AUTOFORMATTING=1 + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + if [[ -d "${EROOT%/}"/etc/znc ]]; then + ewarn "/etc/znc exists on your system." + ewarn "Due to the nature of the contents of that folder," + ewarn "we have changed the default configuration to use" + ewarn " /var/lib/znc" + ewarn "please move /etc/znc to /var/lib/znc" + ewarn "or adjust /etc/conf.d/znc" + fi +} + +pkg_config() { + if use daemon; then + if [[ -e "${EROOT%/}/var/lib/znc" ]]; then + ewarn "${EROOT%/}/var/lib/znc already exists, aborting to avoid damaging" + ewarn "any existing configuration. If you are sure you want" + ewarn "to generate a new configuration, remove the folder" + ewarn "and try again." + else + einfo "Press any key to interactively create a new configuration file" + einfo "for znc." + einfo "To abort, press Control-C" + read + mkdir -p "${EROOT%/}/var/lib/znc" || die + chown -R ${PN}:${PN} "${EROOT%/}/var/lib/znc" || + die "Setting permissions failed" + "${EROOT%/}"/usr/bin/znc --system-wide-config-as ${PN} -c -r -d "${EROOT%/}/var/lib/znc" || + die "Config failed" + echo + einfo "To start znc, run '/etc/init.d/znc start'" + einfo "or add znc to a runlevel:" + einfo " rc-update add znc default" + fi + else + ewarn "To configure znc as a system-wide daemon you have to" + ewarn "enable the 'daemon' use flag." + fi +} |