summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2018-05-12 02:36:45 +0200
committerMichał Górny <mgorny@gentoo.org>2018-05-15 19:46:20 +0200
commit67309f579907137a6594dbc24fc03f5adf075f85 (patch)
tree6955ca32b8ce090154571a7331b7014a32860dbe
parentx11-wm/enlightenment: bump E17 to 0.22.3 (diff)
downloadgentoo-67309f579907137a6594dbc24fc03f5adf075f85.tar.gz
gentoo-67309f579907137a6594dbc24fc03f5adf075f85.tar.bz2
gentoo-67309f579907137a6594dbc24fc03f5adf075f85.zip
net-irc/znc: bump to 1.7.0, remove custom patches
Take all the changes from the live ebuild like the new init script and the new cmake-based build system. Package-Manager: Portage-2.3.31, Repoman-2.3.9
-rw-r--r--net-irc/znc/Manifest2
-rw-r--r--net-irc/znc/files/README.gentoo-r14
-rw-r--r--net-irc/znc/znc-1.7.0.ebuild152
3 files changed, 156 insertions, 2 deletions
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index 55c3b0b329c9..6949365add4b 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -1,3 +1,5 @@
DIST googletest-release-1.7.0.tar.gz 468653 BLAKE2B 8dfca8b79dcd7b64ce84bad11ee68c549f4fe3dff7638ed1d845af4a7f754ad5df782d2cbebdb9fecfda2499dae6585e07cda7a8c8c454f0b70723d5c9578aa4 SHA512 c623d5720c4ed574e95158529872815ecff478c03bdcee8b79c9b042a603533f93fe55f939bcfe2cd745ce340fd626ad6d9a95981596f1a4d05053d874cd1dfc
+DIST gtest-1.8.0.tar.gz 1281617 BLAKE2B ac052b4d0eb0d8ded03a8c7dff05177818627b8a51f2dbc2c162b2ee2a5d1323539e7d0d02236d9ebb799995e018f0171c2fdaeb4de3bb339548265e50de79e6 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d
DIST znc-1.6.5.tar.gz 1470681 BLAKE2B 9de0b211280489423bc2894d0e76d7276aa42428d07d64516372a9ca6d1616db1f27c0142b54160c61cbee89d65ceadf941d001319254dbff9eb5b016988482e SHA512 d78603ac86d1fb92cdf591b1eb6d32fa19b0e39414bd69e1300c537051612ae590c43d3b8e4dd598cdff605bf3aa1d3d5d806edd428d15d50f733e1670f3e626
DIST znc-1.6.6.tar.gz 1471612 BLAKE2B 8bd977a95417c4259e9f38759d838f55a146f376dc8bb6230ab6e1b698fb7c9e060cbc237efd4e836961314abab56cc02e7c6bc74e40bad17abaf06e47fbb516 SHA512 cc5bc7328bfe36525ab215b4b53c7cd20aa02b41e7bb28507ff9d9632560f4c30396804e4b828bca0ece19f42813e3fce59d1bae639ea5fc149059f6979e63e7
+DIST znc-1.7.0.tar.gz 1853666 BLAKE2B 3e519d4005a10a9a5329f22ab6abbd19dfa2c7cecb949c138bc72909eae8883576fc0352e3ac46b852b8c58f038150419720aa48791a1339b004206f3afc20e9 SHA512 718dec65dfa2374c568b2694e4faef1f8cf313ae96d171e2263656e077e0fae5f8037c69a23ae33f4ea314ac6e15480c7dccef73ad3ac9324eb79caca622d54b
diff --git a/net-irc/znc/files/README.gentoo-r1 b/net-irc/znc/files/README.gentoo-r1
index cbd565d3d964..ca41e4dac26b 100644
--- a/net-irc/znc/files/README.gentoo-r1
+++ b/net-irc/znc/files/README.gentoo-r1
@@ -10,6 +10,6 @@ configuration files:
# rm -rf /home/$USER/.znc
# chown -R znc:znc /var/lib/znc
-OpenRC user may also adjust the location of the files and the user running
-znc in /etc/conf.d/znc instead. Systemd user may have to overwrite
+OpenRC users may also adjust the location of the files and the user running
+znc in /etc/conf.d/znc instead. Systemd users may have to overwrite the
existing unit file.
diff --git a/net-irc/znc/znc-1.7.0.ebuild b/net-irc/znc/znc-1.7.0.ebuild
new file mode 100644
index 000000000000..b27016716af6
--- /dev/null
+++ b/net-irc/znc/znc-1.7.0.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit cmake-utils python-single-r1 readme.gentoo-r1 systemd user
+
+GTEST_VER="1.8.0"
+GTEST_URL="https://github.com/google/googletest/archive/release-${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz"
+DESCRIPTION="An advanced IRC Bouncer"
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"}
+ SRC_URI=""
+else
+ SRC_URI="
+ https://znc.in/releases/archive/${P}.tar.gz
+ test? ( ${GTEST_URL} )
+ "
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+HOMEPAGE="https://znc.in"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="+ipv6 +icu libressl nls perl python +ssl sasl tcl test +zlib"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )"
+
+RDEPEND="
+ icu? ( dev-libs/icu:= )
+ nls? ( dev-libs/boost:=[nls] )
+ 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:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ perl? ( >=dev-lang/swig-3.0.0 )
+ python? ( >=dev-lang/swig-3.0.0 )
+"
+
+pkg_setup() {
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+
+ 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}
+}
+
+src_prepare() {
+ # Let SWIG rebuild modperl/modpython to make user patching easier.
+ if [[ ${PV} != *9999* ]]; then
+ rm modules/modperl/generated.tar.gz || die
+ rm modules/modpython/generated.tar.gz || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWANT_SYSTEMD=yes # Causes -DSYSTEMD_DIR to be used.
+ -DSYSTEMD_DIR="$(systemd_get_systemunitdir)"
+ -DWANT_ICU="$(usex icu)"
+ -DWANT_IPV6="$(usex ipv6)"
+ -DWANT_I18N="$(usex nls)"
+ -DWANT_PERL="$(usex perl)"
+ -DWANT_PYTHON="$(usex python)"
+ -DWANT_CYRUS="$(usex sasl)"
+ -DWANT_OPENSSL="$(usex ssl)"
+ -DWANT_TCL="$(usex tcl)"
+ -DWANT_ZLIB="$(usex zlib)"
+ )
+
+ if [[ ${PV} != *9999* ]] && use test; then
+ export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googletest"
+ export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cmake-utils_src_make unittest
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodoc NOTICE
+ newinitd "${FILESDIR}"/znc.initd-r2 znc
+ newconfd "${FILESDIR}"/znc.confd-r1 znc
+
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die
+ DISABLE_AUTOFORMATTING=1
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+ readme.gentoo_print_elog
+ fi
+
+ if [[ -d "${EROOT%/}"/etc/znc ]]; then
+ ewarn "${EROOT%/}/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 " ${EROOT%/}/var/lib/znc"
+ ewarn "please move ${EROOT%/}/etc/znc to ${EROOT%/}/var/lib/znc"
+ ewarn "or adjust your service configuration."
+ fi
+}
+
+pkg_config() {
+ 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 enter to interactively create a new configuration file 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"
+ start-stop-daemon --start --user ${PN}:${PN} --env ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
+ "${EROOT%/}"/usr/bin/znc -- --makeconf --datadir "${EROOT%/}/var/lib/znc" ||
+ die "Config failed"
+ einfo
+ einfo "You can now start the znc service using the init system of your choice."
+ einfo "Don't forget to enable it if you want to use znc at boot."
+ fi
+}