| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-process/pkill-darwin/pkill-darwin-1.0.ebuild,v 1.1 2011/05/18 18:24:11 grobian Exp $
|
| 4 |
|
| 5 |
EAPI=3
|
| 6 |
|
| 7 |
inherit toolchain-funcs
|
| 8 |
|
| 9 |
DESCRIPTION="pgrep(1) and pkill(1) for Darwin"
|
| 10 |
HOMEPAGE="http://prefix.gentooexperimental.org:8000/pkill-darwin/"
|
| 11 |
SRC_URI="http://www.gentoo.org/~grobian/distfiles/${P}.tar.xz"
|
| 12 |
|
| 13 |
LICENSE="BSD"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="~ppc-macos ~x86-macos ~x64-macos"
|
| 16 |
IUSE=""
|
| 17 |
|
| 18 |
src_compile() {
|
| 19 |
echo $(tc-getCC) ${CFLAGS} -o pkill ${LDFLAGS} pkill.c
|
| 20 |
$(tc-getCC) ${CFLAGS} -o pkill ${LDFLAGS} pkill.c || die
|
| 21 |
# don't link, such that the suid trick described below won't make people
|
| 22 |
# suid their pkill too
|
| 23 |
cp pkill pgrep || die
|
| 24 |
ln -s pkill.1 pgrep.1 || die
|
| 25 |
}
|
| 26 |
|
| 27 |
src_install() {
|
| 28 |
into /usr
|
| 29 |
dobin pkill pgrep
|
| 30 |
doman pkill.1 pgrep.1
|
| 31 |
}
|
| 32 |
|
| 33 |
pkg_postinst() {
|
| 34 |
einfo "If you you want pgrep to be able to show and match on the arguments"
|
| 35 |
einfo "of all processes, you will have to make pgrep suid root. To do so"
|
| 36 |
einfo "you have to perform the following steps:"
|
| 37 |
einfo " % sudo chown root ${EPREFIX}/usr/bin/pgrep"
|
| 38 |
einfo " % sudo chmod u+s ${EPREFIX}/usr/bin/prgep"
|
| 39 |
}
|