# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 inherit eutils DESCRIPTION="ZFS backup with remote capabilities and mbuffer integration" HOMEPAGE="https://github.com/oetiker/znapzend" SRC_URI="${HOMEPAGE}/releases/download/v${PV}/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64" IUSE="" RDEPEND="${DEPEND}" src_prepare() { epatch "${FILESDIR}/001-flatten_version.patch" epatch "${FILESDIR}/002-libdir.patch" } src_configure() { PERL5LIB="/usr/share/${PN}/perl5" \ econf --prefix=/opt --libdir="/usr/share/${PN}/perl5" } src_compile() { emake } src_install() { exeinto /usr/bin doexe bin/* insinto /etc/default newins init/${PN}.default ${PN} insinto /usr/share/${PN}/perl5 doins lib/ZnapZend.pm doins -r lib/ZnapZend insinto /usr/share/${PN}/perl5 doins -r thirdparty/lib/perl5/* doman man/znapzend{,zetup,ztatz}.1 newinitd ${FILESDIR}/initd_${PN} ${PN} } pkg_postinst() { elog "" elog "This software release depends on modules not available through Portage." elog "Since it will automatically obtain them from CPAN, they will be placed under" elog "'/usr/share/znapzend/perl5' in order not to interfere with the rest of the system." elog "" }