# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header:$ inherit autotools eutils DEB_PL="${P##*_p}" MY_P="${P%%_*}" MY_P="${MY_P/-/_}" DESCRIPTION="sitecopy is for easily maintaining remote web sites" HOMEPAGE="http://www.manyfish.co.uk/sitecopy/ http://packages.debian.org/unstable/sitecopy" SRC_URI="mirror://debian/pool/main/s/${PN}/${MY_P}.orig.tar.gz mirror://debian/pool/main/s/${PN}/${MY_P}-${DEB_PL}.diff.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" IUSE="expat +ftp nls +rsh +sftp ssl +webdav xml zlib" DEPEND="rsh? ( net-misc/netkit-rsh ) >=net-misc/neon-0.24" S="${WORKDIR}"/${MY_P/_/-} pkg_setup() { if use zlib ; then built_with_use net-misc/neon zlib || die "neon needs zlib support" fi if use ssl ; then built_with_use net-misc/neon ssl || die "neon needs ssl support" myconf="${myconf} --with-ssl=openssl" fi if use expat ; then built_with_use net-misc/neon expat || die "neon needs expat support" fi if use xml ; then built_with_use net-misc/neon expat && die "neon needs expat support disabled for libxml2 support to be enabled" fi } src_unpack() { unpack ${A} # Debian patches epatch ${MY_P}-${DEB_PL}.diff # dpatch files are using 0.16.3 version as a reference # changing them to 0.16.6 because patch can't manage this sed -i s/sitecopy-0.16.3/sitecopy-0.16.6/g "${S}"/debian/patches/*.dpatch \ || die "Changing patches directory failed" epatch "${S}"/debian/patches/*.dpatch cd "${S}" sed -i -e \ "s:docdir \= .*:docdir \= \$\(prefix\)\/share/doc\/${PF}:" \ Makefile.in || die "Documentation directory patching failed" eautoconf eautomake } src_compile() { econf ${myconf} \ $(use_enable ftp) \ $(use_enable nls) \ $(use_enable sftp) \ $(use_enable webdav) \ $(use_enable rsh) \ $(use_with expat) \ $(use_with xml libxml2 ) \ || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" }