Lines 2-7
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/gofish/gofish-1.1.ebuild,v 1.3 2007/04/22 16:35:53 phreak Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/gofish/gofish-1.1.ebuild,v 1.3 2007/04/22 16:35:53 phreak Exp $ |
4 |
|
4 |
|
|
|
5 |
EAPI=2 |
6 |
|
5 |
inherit eutils |
7 |
inherit eutils |
6 |
|
8 |
|
7 |
DESCRIPTION="Gofish gopher server" |
9 |
DESCRIPTION="Gofish gopher server" |
Lines 9-15
Link Here
|
9 |
SRC_URI="mirror://sourceforge/gofish/${P}.tar.gz" |
11 |
SRC_URI="mirror://sourceforge/gofish/${P}.tar.gz" |
10 |
LICENSE="GPL-2" |
12 |
LICENSE="GPL-2" |
11 |
SLOT="0" |
13 |
SLOT="0" |
12 |
KEYWORDS="amd64 ~ppc ~x86" |
14 |
KEYWORDS="~amd64 ~ppc ~x86" |
13 |
IUSE="" |
15 |
IUSE="" |
14 |
|
16 |
|
15 |
DEPEND="" |
17 |
DEPEND="" |
Lines 22-45
Link Here
|
22 |
enewuser gopher 30 -1 -1 gopher |
24 |
enewuser gopher 30 -1 -1 gopher |
23 |
} |
25 |
} |
24 |
|
26 |
|
25 |
src_compile() { |
27 |
src_configure() { |
26 |
econf \ |
28 |
econf \ |
27 |
--localstatedir=/var \ |
29 |
--localstatedir=/var \ |
|
|
30 |
--with-gopherroot=/var/lib/gopher \ |
28 |
--disable-http || die "econf failed!" |
31 |
--disable-http || die "econf failed!" |
29 |
|
|
|
30 |
emake || die "emake failed!" |
31 |
} |
32 |
} |
32 |
|
33 |
|
33 |
src_install () { |
34 |
src_install () { |
34 |
sed -i s/';uid = -1'/'uid = 30'/ "${S}"/gofish.conf |
|
|
35 |
sed -i s/';gid = -1'/'uid = 30'/ "${S}"/gofish.conf |
36 |
make DESTDIR="${D}" install || die "make install failed!" |
35 |
make DESTDIR="${D}" install || die "make install failed!" |
|
|
36 |
# install init-script |
37 |
newinitd "${FILESDIR}"/gofish.rc gofish |
37 |
newinitd "${FILESDIR}"/gofish.rc gofish |
38 |
newconfd "${FILESDIR}"/gofish.confd gofish |
38 |
newconfd "${FILESDIR}"/gofish.confd gofish |
|
|
39 |
dodoc AUTHORS ChangeLog Configure_GoFish README TODO \ |
40 |
|| die "dodoc failed!" |
41 |
# set gofish user uid/gid to default 30 |
42 |
dosed "s:;uid = -1:uid = 30:" etc/gofish.conf |
43 |
dosed "s:;gid = -1:gid = 30:" etc/gofish.conf |
44 |
# set gofish gopher root to /var/lib/gopher |
45 |
# instead of /var/gopher for better FHS-compilace |
46 |
dosed "s:/var/gopher:/var/lib/gopher:" etc/gofish.conf |
47 |
dosed "s:/var/gopher:/var/lib/gopher:" usr/bin/check-files |
48 |
# set gofish www root to /var/lib/www instead of /var/www |
49 |
# for proper order :) |
50 |
dosed "s:/var/www:/var/lib/www:" etc/gofish-www.conf |
51 |
dosed "s:is-http = 1:is-http = 0:" etc/gofish-www.conf |
52 |
# gophish Makefile doesn't install gopher root directory |
53 |
# with Configure_GoFish file if root directory is exist |
54 |
# so we should not install it too |
55 |
[ -d ${ROOT}/var/lib/gopher ] && ! [ -f ${ROOT}/var/lib/gopher/Configure_GoFish ] && \ |
56 |
rm -r "${D}"/var/lib/gopher/Configure_GoFish |
39 |
} |
57 |
} |
40 |
|
58 |
|
41 |
pkg_postinst() { |
59 |
pkg_postinst() { |
42 |
echo |
60 |
elog |
43 |
elog "Please configure /etc/${PN}.conf before attempt to use it!" |
61 |
elog "Please configure /etc/${PN}.conf before attempt to use it!" |
44 |
echo |
62 |
elog |
|
|
63 |
ewarn "Gofish's gopher root directory has been changed" |
64 |
ewarn "If you have been used gofish with before" |
65 |
ewarn "you may need to move old stuff to /var/lib/gopher" |
45 |
} |
66 |
} |