# 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/lib \ --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 # set gofish gopher root to /var/lib/gopher # instead of /var/gopher for better FHS-compilace dosed "s:/var/gopher:/var/lib/gopher:" etc/gofish.conf dosed "s:/var/gopher:/var/lib/gopher:" usr/bin/check-files # set gofish www root to /var/lib/www instead of /var/www # for proper order :) dosed "s:/var/www:/var/lib/www:" etc/gofish-www.conf 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/lib/gopher ] && ! [ -f ${ROOT}/var/lib/gopher/Configure_GoFish ] && \ rm -r "${D}"/var/lib/gopher/Configure_GoFish # changing permissions of gopher stuff chown -R gopher:gopher "${D}"/var/lib/gopher } pkg_postinst() { elog elog "Please configure /etc/${PN}.conf before attempt to use it!" elog ewarn "Gofish's gopher root directory has been changed" ewarn "If you have been used gofish with before" ewarn "you may need to move old stuff to /var/lib/gopher" }