proj/gentoo: Initial commit
[gentoo.git] / app-misc / editor-wrapper / editor-wrapper-4.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6
7 DESCRIPTION="Wrapper scripts that will execute EDITOR or PAGER"
8 HOMEPAGE="http://www.gentoo.org/"
9 SRC_URI=""
10
11 LICENSE="MIT"
12 SLOT="0"
13 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
14 IUSE=""
15
16 S="${WORKDIR}"
17
18 src_prepare() {
19         sed -e 's/@VAR@/EDITOR/g' "${FILESDIR}/${P}.sh" >editor || die
20         sed -e 's/@VAR@/PAGER/g'  "${FILESDIR}/${P}.sh" >pager  || die
21         if use prefix ; then
22                 sed -i \
23                         -e "s:#!/bin/sh:#!/usr/bin/env sh:" \
24                         -e "s: /etc/profile: \"${EPREFIX}/etc/profile\":" \
25                         editor pager || die
26         fi
27 }
28
29 src_install() {
30         exeinto /usr/libexec
31         doexe editor pager
32 }