# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils inherit mono DESCRIPTION="Simias SimpleServer" HOMEPAGE="http://www.ifolder.com/index.php/Simple_Server/" SRC_URI="http://forgeftp.novell.com/ifolder/client/3.4/20060320-0101/src/${P}.tar.gz" IUSE="simpleserver" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" DEPEND=">=dev-lang/mono-1.0 >=dev-dotnet/log4net-1.2.9 >=net-libs/libflaim-4.8.61" src_unpack() { unpack ${A} cd ${S} } src_compile() { local myconf datadir sedcmd myconf="--prefix=/usr --sysconfdir=/etc" if use simpleserver;then datadir=/var/lib/SimpleServer/simias sed -i -e "s|@_simiasdatadir_@|${datadir}|g" ${S}/other/SimpleServer/simpleserver.in || die "Error patching simpleserver.in" myconf="${myconf} --with-simiasdatadir=${D}${datadir}" fi ./configure ${myconf} || die "Error configuring ${P}" make || die "Error compiling ${P}" } src_install() { emake DESTDIR=${D} install if use simpleserver;then cd other/SimpleServer emake DESTDIR=${D} install-simpleserver || die "Error installing simpleserver" doinitd ${FILESDIR}/ifolder fi } pkg_postinst() { if use simpleserver;then einfo "" einfo "SimpleServer has been installed." einfo "Please edit /etc/SimpleServer.xml to suit your needs." einfo "" einfo "An init script has also been installed to start and stop the" einfo "SimpleServer process. /etc/init.d/ifolder" einfo "If you would like to start SimpleServer on boot-up please run" einfo "rc-update add ifolder default" einfo "" einfo "Point your clients to simpleserver:8086" einfo "" fi }