summaryrefslogtreecommitdiff
blob: a8f5f78eb95e9fc06342a56660d509bbc5a36345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/makedev/makedev-3.23.1.ebuild,v 1.4 2007/08/07 14:51:37 uberlord Exp $

inherit toolchain-funcs

MY_PN="MAKEDEV"
MY_VER=${PV%.*}
MY_REL=${PV#${MY_VER}.}
MY_P="${MY_PN}-${MY_VER}"
DESCRIPTION="program used for creating device files in /dev"
HOMEPAGE="http://people.redhat.com/nalin/MAKEDEV/"
SRC_URI="http://people.redhat.com/nalin/MAKEDEV/${MY_P}-${MY_REL}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="build selinux"

RDEPEND="!<sys-apps/baselayout-2.0.0_rc"
DEPEND=""

S=${WORKDIR}/${MY_P}

src_compile() {
	use selinux && export SELINUX=1
	emake CC=$(tc-getCC) OPTFLAGS="${CFLAGS}" || die
}

src_install() {
	# set devdir to makedevdir so we dont have to worry about /dev
	emake install DESTDIR="${D}" makedevdir=/sbin devdir=/sbin || die
	dodoc *.txt
	keepdir /dev
}

pkg_postinst() {
	use build && MAKEDEV -d "${ROOT}"/dev generic
}