# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header:$ EAPI="1" 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="debug +ftp nls +rsh +sftp threads +webdav" # some features are directly provided by neon # if we want them to be added when emerging sitecopy # with EAPI 2, add neon[zlib?], neon[ipv6?] # in the same way ssl/gnutls support check can be done DEPEND=">=net-misc/neon-0.24" RDEPEND="${DEPEND} rsh? ( net-misc/netkit-rsh )" S="${WORKDIR}"/${MY_P/_/-} 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 $(use_enable debug) \ $(use_enable ftp) \ $(use_enable nls) \ $(use_enable rsh) \ $(use_enable sftp) \ $(use_enable threads) \ $(use_enable webdav) \ --disable-gnomefe \ || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" } pkg_postinst() { # Trying to launch sitecopy doesn't work if there isn't an open rcfile # into the home directory. # It should help. ewarn "You have to write your open rcfile to execute sitecopy." ewarn "Look at the open rcfile example here : /usr/share/sitecopy/examplerc" }