/[gentoo-x86]/app-text/info2html/info2html-2.0.ebuild
Gentoo

Contents of /app-text/info2html/info2html-2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Jun 14 13:16:57 2007 UTC (12 years, 7 months ago) by angelos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
Stable on amd64 wrt bug 181657
(Portage version: 2.1.2.9)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/info2html/info2html-2.0.ebuild,v 1.5 2007/06/14 09:20:13 yoswink Exp $
4
5 inherit eutils webapp
6
7 DESCRIPTION="Converts GNU .info files to HTML"
8 HOMEPAGE="http://info2html.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/info2html/${P}.tar"
10
11 LICENSE="freedist"
12 # webapp.eclass deals with SLOTting
13 #SLOT="0"
14 IUSE=""
15 KEYWORDS="alpha amd64 hppa sparc x86"
16
17 RDEPEND="dev-lang/perl"
18
19 src_unpack() {
20 local infos state line i
21 unpack ${A}
22 cd ${S}
23
24 # filter user-provided data to prevent cross-frame/site scripting attacks
25 # bug #91354 (fix from Werner Fink)
26 epatch ${FILESDIR}/info2html-2.0-xss.patch
27
28 # Fixup INFODIR for paths in /etc/profile.env INFOPATH
29 infos=$(grep "^export INFOPATH=" /etc/profile.env | tail -n 1 |\
30 sed -e "s:^export INFOPATH=:INFOPATH=:;s:'::g")
31 # Default path to /usr/share/info and /usr/local/share/info
32 [[ -z ${infos} ]] && export infos="/usr/share/info"
33 infos=( ${INFOPATH//:/ } )
34 mv ${S}/info2html.conf ${S}/info2html.conf.orig
35 touch ${S}/info2html.conf
36 state="copy"
37 inserted="no"
38 while read line; do
39 [[ ${line} == "@INFODIR = (" ]] && state="insert"
40 [[ ${line} == ");" ]] && state="copy"
41 case ${state} in
42 "copy")
43 echo ${line} >> ${S}/info2html.conf
44 ;;
45 "insert")
46 echo ${line} >> ${S}/info2html.conf
47 for info in "${infos[@]}"; do
48 echo " '${info}'," >> ${S}/info2html.conf
49 done
50 echo " '/usr/local/share/info'" >> ${S}/info2html.conf
51 state="skip"
52 inserted="yes"
53 ;;
54 "skip")
55 ;;
56 esac
57 done < ${S}/info2html.conf.orig
58 [[ ${state} == "copy" && ${inserted} == "yes" ]] ||
59 die "Setting up info2html.conf failed"
60 }
61
62 src_install() {
63 webapp_src_preinst
64
65 exeinto ${MY_CGIBINDIR}
66 cp info2html infocat info2html.css info2html.conf ${D}/${MY_CGIBINDIR}
67 # README zapped by info2html-gentoo.patch; it only listed
68 # the homepage so it doesn't add anything useful.
69 # dodoc README
70
71 webapp_src_install
72 }

  ViewVC Help
Powered by ViewVC 1.1.20