summaryrefslogtreecommitdiff
blob: 7fc7bdb6b2b542913b734f7e8c5429402a739519 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

inherit toolchain-funcs user

DESCRIPTION="A daemon to serve the gopher protocol"
HOMEPAGE="http://r-36.net/src/geomyidae/"
SRC_URI="http://r-36.net/src/${PN}/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

pkg_setup(){
	enewgroup gopherd
	enewuser gopherd -1 -1 /var/gopher gopherd
}

src_compile() {
	tc-export CC
	emake || die
}

src_install() {
	dosbin ${PN} || die

	newinitd rc.d/Gentoo.init.d ${PN} || die
	newconfd rc.d/Gentoo.conf.d ${PN} || die

	insinto /var/gopher
	doins index.gph || die
	fowners -R root.gopherd /var/gopher || die
	fperms -R g=rX,o=rX /var/gopher || die

	doman ${PN}.8 || die
	dodoc README || die
}