summaryrefslogtreecommitdiff
blob: 957cfa36cb716a1e6e6756b57a542d3e52a73c06 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/man2html/man2html-1.6f-r1.ebuild,v 1.1 2010/11/11 10:04:13 xmw Exp $

inherit eutils webapp

DESCRIPTION="Convert manual pages to HTML"
HOMEPAGE="http://primates.ximian.com/~flucifredi/man/
	http://freshmeat.net/projects/man/"
SRC_URI="http://primates.ximian.com/~flucifredi/man/man-${PV}.tar.gz"

LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
IUSE=""

DEPEND="app-misc/glimpse
	sys-apps/gawk
	virtual/man"

S=${WORKDIR}/man-${PV}

pkg_setup() {
	webapp_pkg_setup
	einfo "Installing into ${MY_HOSTROOTDIR}"
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/mansearch-gentoo.patch
	epatch "${FILESDIR}"/mansec-${PV}.patch
	epatch "${FILESDIR}"/${P}-apostrophe.patch
	find man2html -type f | xargs sed -i \
		-e "s:/home/httpd/htdocs/:/var/www/localhost/:g" \
		-e "s:/home/httpd/cgi-bin/:/var/www/localhost/cgi-bin/man:g" \
		-e "s:/home/httpd/cgi-aux/man:/var/www/localhost/cgi-aux/man:g"
}

src_compile() {
	:
}

src_install() {
	webapp_src_preinst

	cd man2html
	exeinto ${MY_HOSTROOTDIR}/cgi-bin/man
	doexe scripts/cgi-bin/man/*
	insinto ${MY_HOSTROOTDIR}/cgi-aux/man
	doins scripts/cgi-aux/man/*
	insinto /var/man2html
	newins glimpse_filters .glimpse_filters
	fperms 1777 /var/man2html
	exeinto /etc/cron.daily
	newexe "${FILESDIR}"/man2html.cron man2html

	webapp_src_install
}