summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2016-03-19 18:10:18 +0100
committerIan Delaney <idella4@gentoo.org>2016-03-21 21:11:34 +0800
commit942dfd926c80e680f564099f0b9535a2777c0245 (patch)
treeab5db13c332a104199b7202c7f611dce251bc509 /net-irc/znc
parentvirtual/mysql: Drop old revisions wrt bug 577910 (diff)
downloadgentoo-942dfd926c80e680f564099f0b9535a2777c0245.tar.gz
gentoo-942dfd926c80e680f564099f0b9535a2777c0245.tar.bz2
gentoo-942dfd926c80e680f564099f0b9535a2777c0245.zip
net-irc/znc: bump to 1.6.3, EAPI=6
- use the proper LICENSE - remove the ZNC_DATADIR variable - the libressl patch is no longer required → drop patch - swig is not needed to build bindings from a release, removed from DEPEND - configure uses python3 by default → don't specify it any more - move informational postinst messages to a README.gentoo file - fix the systemd unit by setting a valid HOME for the znc user - delete the custom src_unpack function, provide the full path to gtest Gentoo-Bug: https://bugs.gentoo.org/567344 Gentoo-Bug: https://bugs.gentoo.org/571366 Gentoo-Bug: https://bugs.gentoo.org/521916 Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1086
Diffstat (limited to 'net-irc/znc')
-rw-r--r--net-irc/znc/Manifest1
-rw-r--r--net-irc/znc/files/README.gentoo22
-rw-r--r--net-irc/znc/znc-1.6.3.ebuild126
3 files changed, 149 insertions, 0 deletions
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index 2e4aebe3fe84..dc1f820dc26f 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -2,3 +2,4 @@ DIST gtest-1.7.0.zip 1164254 SHA256 247ca18dd83f53deb1328be17e4b1be31514cedfc1e3
DIST znc-1.2.tar.gz 1235150 SHA256 d9a2cd2a484ff23e6fc9cbde8dd8a43efbcd8d288afca7b1268914ca0d18701d SHA512 dff24e56127e5599d64b4c62de967d5d48d8ebf23ca8597d33bf0b3622640512db7a462bfa7c2031cd8307f402bab8efa345f6d1fc813e78eb0dcae581de3cf7 WHIRLPOOL b0810eb66e63be762f74f04eb2289e3634b18d6ecbd36d55f6a6772697e0397637d59b9ea01eaf62ef1cbe5f6e65b06432a254f4ada35194aa06b65c4a2f7994
DIST znc-1.4.tar.gz 1239648 SHA256 86e98fd0ed182d39828c926809f8075d836ee3b70a6dd43dfbb434822f2a7b52 SHA512 0c33b05e8232084999812cbaa467dc7d37b80cafc1001b82e89c702b4303d8db9a27b948fe653e7090404eb1c66f5492f02f3524bc39efabade4be8bdb476671 WHIRLPOOL 420e665fa193b3f0284a070e021c4c467e3d40a0812eedeef9b2f65a6626a050b7af8bf15a754ac571d12261705832cfa18a0f7a7817cce96d220028a86230cf
DIST znc-1.6.1.tar.gz 1463397 SHA256 ba49397364f48d6d32ae5242bc1166f21d972f85dd390d6bbe68a63ecbb6c140 SHA512 92c0acca6b585df394cf8d6d295948fc1342ff7b15d081017d2e0ba521129f914fa2b019a82d801f826f1009456294e4f578e978f34677bbfe436e87e2734aba WHIRLPOOL ff4a22742d5e1e8da66325fdc8a2fd88a467674a5f13f6d353b1c3588affd86f2c33c24d48f1b61dfba14311d6f1c13b2939851316cb302ab031073baa05ec17
+DIST znc-1.6.3.tar.gz 1464200 SHA256 631c46de76fe601a41ef7676bc974958e9a302b72b25fc92b4a603a25d89b827 SHA512 777279b6c973310b4e78a0472bd1e355c2adf3e4fbe9ebedde3dd4706e5c0b208d4330eb2318a8d9e0d7d7146bee0a4a428cbe5a3f230c8f6aa692a477e86e2b WHIRLPOOL 2a41e0ac90038a8cc8f289d4ffc0494d29eda75450f650b8870c076fb809eb9c5829720bb39eb43d38ee4ac7f9bea6000ad90fcdd8c0eea461bf04f88cc17b52
diff --git a/net-irc/znc/files/README.gentoo b/net-irc/znc/files/README.gentoo
new file mode 100644
index 000000000000..5b222a24f589
--- /dev/null
+++ b/net-irc/znc/files/README.gentoo
@@ -0,0 +1,22 @@
+To run znc as a user, run 'znc --makeconf' to create a configuration file.
+
+If znc was compiled with the 'daemon' use flag, you may run
+ emerge --config znc
+to configure it.
+
+To generate a new SSL certificate, run:
+ znc --system-wide-config-as znc --makepem -d /var/lib/znc
+as root.
+
+If migrating from a user-based install, you can copy the existing
+configuration files:
+ mkdir /var/lib/znc
+ mv /home/$USER/.znc/* /var/lib/znc
+ rm -rf /home/$USER/.znc
+ chown -R znc:znc /var/lib/znc
+You may also adjust the location of the files and the user running znc
+in /etc/conf.d/znc instead.
+
+To run as a daemon, please make sure that your configuration contains
+ PidFile = /run/znc/znc.pid
+or that the PidFile value matches the one in /etc/conf.d/znc.
diff --git a/net-irc/znc/znc-1.6.3.ebuild b/net-irc/znc/znc-1.6.3.ebuild
new file mode 100644
index 000000000000..eb377274c8d1
--- /dev/null
+++ b/net-irc/znc/znc-1.6.3.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{3_3,3_4,3_5} )
+inherit eutils python-single-r1 readme.gentoo-r1 systemd user
+
+MY_PV=${PV/_/-}
+GTEST_VER="1.7.0"
+GTEST_URL="https://googletest.googlecode.com/files/gtest-${GTEST_VER}.zip"
+DESCRIPTION="An advanced IRC Bouncer"
+
+SRC_URI="http://znc.in/releases/${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 libressl perl python ssl sasl tcl test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/icu:=
+ sys-libs/zlib
+ 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 )
+ )
+ tcl? ( dev-lang/tcl:0= )
+"
+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 ipv6) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable sasl cyrus) \
+ $(use_enable ssl openssl) \
+ $(use_enable tcl tcl) \
+ $(use_with test gtest "${WORKDIR}/gtest-${GTEST_VER}")
+}
+
+src_install() {
+ emake install DESTDIR="${D%/}"
+ dodoc NOTICE README.md
+ if use daemon; then
+ newinitd "${FILESDIR}"/znc.initd-r1 znc
+ newconfd "${FILESDIR}"/znc.confd-r1 znc
+ fi
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo")
+ 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
+}