app-shells/pdmenu: tidy up ebuild a bit.
[gentoo.git] / app-shells / pdmenu / pdmenu-1.3.4-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 inherit toolchain-funcs
8
9 DESCRIPTION="A simple console menu program"
10 HOMEPAGE="http://joeyh.name/code/pdmenu/"
11 SRC_URI="mirror://debian/pool/main/p/${PN}/pdmenu_${PV}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~mips ~x86"
16 IUSE="nls gpm examples"
17
18 DEPEND="
19         sys-libs/slang
20         gpm? ( sys-libs/gpm )
21         nls? ( sys-devel/gettext )"
22
23 S="${WORKDIR}/${PN}"
24
25 RESTRICT="test"
26
27 PATCHES=(
28         "${FILESDIR}"/${PN}-impl-dec.patch
29 )
30
31 DOCS=( doc/ANNOUNCE doc/BUGS doc/TODO )
32
33 src_prepare() {
34         default
35         sed \
36                 -e 's:\(-o pdmenu\):$(LDFLAGS) \1:g' \
37                 -i Makefile || die
38 }
39
40 src_configure() {
41         CC=$(tc-getCC) econf \
42                 $(use_with gpm) \
43                 $(use_enable nls)
44 }
45
46 src_compile() {
47         emake CC=$(tc-getCC)
48 }
49
50 src_install() {
51         dobin "${PN}"
52         use examples && dodoc -r examples
53         mv "doc/${PN}.man" "doc/${PN}.1" || die
54         mv "doc/${PN}rc.man" "doc/${PN}rc.5" || die
55         doman "doc/${PN}.1" "doc/${PN}rc.5"
56         einstalldocs
57 }
58
59 pkg_postinst() {
60         ewarn "Note this part from man page: Security warning! Any exec command"
61         ewarn "that uses the 'edit' flag will be a security hole. The user need"
62         ewarn "only to enter text with a ';' in it, and they can run an"
63         ewarn "arbitrary command after the semicolon!"
64 }