--- sitecopy-0.16.3_p17.ebuild 2008-10-14 12:31:09.000000000 -0400 +++ sitecopy-0.16.6_p1.ebuild 2008-10-14 12:21:09.000000000 -0400 @@ -1,59 +1,48 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/sitecopy/sitecopy-0.16.3_p17.ebuild,v 1.3 2008/06/30 20:40:11 armin76 Exp $ +# $Header:$ -inherit eutils autotools +EAPI="1" -IUSE="expat nls rsh ssl webdav xml zlib" +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" -HOMEPAGE="http://packages.debian.org/unstable/sitecopy http://www.lyra.org/sitecopy/" -KEYWORDS="~amd64 ppc sparc x86" LICENSE="GPL-2" SLOT="0" -DEPEND="rsh? ( net-misc/netkit-rsh ) - >=net-misc/neon-0.24.6" +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/_/-} -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}" - # Make it work with neon .29 - epatch "${FILESDIR}"/${PV}-neon-29.patch - sed -i -e \ "s:docdir \= .*:docdir \= \$\(prefix\)\/share/doc\/${PF}:" \ Makefile.in || die "Documentation directory patching failed" @@ -63,18 +52,27 @@ } src_compile() { - econf ${myconf} \ - $(use_enable webdav) \ - $(use_enable nls) \ - $(use_enable rsh) \ - $(use_with expat) \ - $(use_with xml libxml2 ) \ - --with-neon \ - || die "econf failed" + 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 "eake 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" +}