# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/gofish/gofish-1.1.ebuild,v 1.3 2007/04/22 16:35:53 phreak Exp $ EAPI=2 inherit eutils DESCRIPTION="Gofish gopher server" HOMEPAGE="http://gofish.sourceforge.net" SRC_URI="mirror://sourceforge/gofish/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc ~x86" IUSE="" DEPEND="" RDEPEND="" S="${WORKDIR}/${PN}" pkg_setup() { enewgroup gopher 30 enewuser gopher 30 -1 -1 gopher } src_configure() { econf \ --localstatedir=/var \ --disable-http || die "econf failed!" } src_install () { make DESTDIR="${D}" install || die "make install failed!" # install init-script newinitd "${FILESDIR}"/gofish.rc gofish newconfd "${FILESDIR}"/gofish.confd gofish dodoc AUTHORS ChangeLog Configure_GoFish README TODO \ || die "dodoc failed!" # set gofish user uid/gid to default 30 dosed "s:;uid = -1:uid = 30:" etc/gofish.conf dosed "s:;gid = -1:gid = 30:" etc/gofish.conf # disable http by default dosed "s:is-http = 1:is-http = 0:" etc/gofish-www.conf # gophish Makefile doesn't install gopher root directory # with Configure_GoFish file if root directory is exist # so we should not install it too [ -d ${ROOT}/var/gopher ] && ! [ -f ${ROOT}/var/gopher/Configure_GoFish ] && \ rm "${D}"/var/lib/gopher/Configure_GoFish } pkg_postinst() { elog elog "Please configure /etc/${PN}.conf before attempt to use it!" elog }