pdmenu-1.3.4-r1.ebuild 1.3 KB

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