--- /var/lib/gentoo/portage/net-misc/gofish/gofish-1.1.ebuild 2009-10-07 03:51:51.000000000 +0900 +++ net-misc/gofish/gofish-1.1.ebuild 2009-10-29 21:15:49.000000000 +0800 @@ -2,6 +2,8 @@ # 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" @@ -9,7 +11,7 @@ SRC_URI="mirror://sourceforge/gofish/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~ppc ~x86" +KEYWORDS="~amd64 ~ppc ~x86" IUSE="" DEPEND="" @@ -22,24 +24,43 @@ enewuser gopher 30 -1 -1 gopher } -src_compile() { +src_configure() { econf \ --localstatedir=/var \ + --with-gopherroot=/var/lib/gopher \ --disable-http || die "econf failed!" - - emake || die "emake failed!" } src_install () { - sed -i s/';uid = -1'/'uid = 30'/ "${S}"/gofish.conf - sed -i s/';gid = -1'/'uid = 30'/ "${S}"/gofish.conf 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 } pkg_postinst() { - echo + elog elog "Please configure /etc/${PN}.conf before attempt to use it!" - echo + 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" }