# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 PYTHON_COMPAT=( python{3_3,3_4} ) inherit base python-single-r1 systemd user MY_PV=${PV/_/-} DESCRIPTION="An advanced IRC Bouncer" if [[ ${PV} == *9999* ]]; then inherit git-r3 EGIT_REPO_URI=${EGIT_REPO_URI:-"git://github.com/znc/znc.git"} SRC_URI="" KEYWORDS="" else SRC_URI="http://znc.in/releases/${PN}-${MY_PV}.tar.gz" KEYWORDS="~amd64 ~arm ~x86" fi HOMEPAGE="http://znc.in" LICENSE="GPL-2" SLOT="0" IUSE="debug icu ipv6 perl python ssl sasl tcl test zlib" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RDEPEND=" perl? ( >=dev-lang/perl-5.10 ) python? ( ${PYTHON_DEPS} ) sasl? ( >=dev-libs/cyrus-sasl-2 ) ssl? ( >=dev-libs/openssl-0.9.7d:0 ) tcl? ( dev-lang/tcl:0= ) " SWIG_DEPEND=">=dev-lang/swig-3.0.0" DEPEND=" virtual/pkgconfig perl? ( ${SWIG_DEPEND} ) python? ( ${SWIG_DEPEND} ) test? ( >=dev-cpp/gtest-1.7.0 ) ${RDEPEND} " S="${WORKDIR}/${PN}-${MY_PV}" PATCHES=( "${FILESDIR}/${PN}-systemwide-gtest.patch" ) CONFDIR="/var/lib/znc" pkg_setup() { if use python; then python-single-r1_pkg_setup fi } src_prepare() { if [[ ${PV} == *9999* ]]; then ./autogen.sh fi base_src_prepare } src_configure() { econf \ $(use_enable debug) \ $(use_enable ipv6) \ $(use_enable perl) \ $(use_enable python) \ $(use_enable sasl cyrus) \ $(use_enable ssl openssl) \ $(use_enable tcl) \ $(use_enable icu charset) \ $(use_enable zlib) \ "$(systemd_with_unitdir)" } src_install() { emake install DESTDIR="${D}" dodoc NOTICE README.md } pkg_postinst() { elog elog "Run 'znc --makeconf' as the user you want to run ZNC as" elog "to make a configuration file" elog }