blob: c6b636bc480c18c2d28ca7c14c8dc812602a084f (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/kudzu-knoppix/kudzu-knoppix-1.1.36-r2.ebuild,v 1.5 2005/06/25 18:17:34 gustavoz Exp $
inherit eutils
MY_PV=${PV}-2
S=${WORKDIR}/kudzu-${PV}
DESCRIPTION="Knoppix version of the Red Hat hardware detection tools"
HOMEPAGE="http://www.knopper.net/"
SRC_URI="http://developer.linuxtag.net/knoppix/sources/${PN}_${MY_PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 -mips ~ppc ~ppc64 ~sparc ~x86"
IUSE="livecd nls minimal python"
RDEPEND="!livecd? ( !minimal? ( dev-libs/newt ) )
dev-libs/popt
sys-apps/hwdata-knoppix"
DEPEND="${RDEPEND}
!livecd? (
nls? (
sys-devel/gettext
)
!minimal? (
sys-libs/slang
>=dev-libs/dietlibc-0.20
)
)
sys-apps/pciutils
!sys-apps/kudzu"
src_unpack() {
unpack ${A}
if ! use nls; then
epatch "${FILESDIR}/${P}-nonls-v4.patch" || die "epatch failed"
fi
epatch ${FILESDIR}/sunlance.patch
}
src_compile() {
# Fix the modules directory to match Gentoo layout.
perl -pi -e 's|/etc/modutils/kudzu|/etc/modules.d/kudzu|g' *.*
if use livecd; then
emake libkudzu.a RPM_OPT_FLAGS="${CFLAGS}" || die
elif use minimal; then
emake updfstab RPM_OPT_FLAGS="${CFLAGS}" || die
else
emake RPM_OPT_FLAGS="${CFLAGS}" || die
fi
if use x86 || use ppc; then
if ! use livecd && ! use minimal; then
cd ddcprobe || die
emake RPM_OPT_FLAGS="${CFLAGS}" || die
fi
fi
}
src_install() {
if use livecd; then
dodir /etc/sysconfig
insinto /usr/include/kudzu
doins *.h
dolib.a libkudzu.a
elif use minimal; then
dodir /etc/sysconfig
insinto /usr/include/kudzu
doins *.h
dolib.a libkudzu.a
dosbin updfstab
insinto /etc
doins updfstab.conf*
elif use python; then
make install install-program DESTDIR=${D} || die "Install failed"
else
make installdata install-program DESTDIR=${D} || die "Install failed"
fi
if ! use livecd && ! use minimal; then
# Init script isn't appropriate
rm -rf ${D}/etc/rc.d
# Add our own init scripts
newinitd ${FILESDIR}/${PN/-knoppix}.rc ${PN/-knoppix} || die
newconfd ${FILESDIR}/${PN/-knoppix}.conf.d ${PN/-knoppix} || die
fi
if use x86 || use ppc; then
if ! use livecd && ! use minimal; then
cd ${S}/ddcprobe || die
dosbin ddcxinfo ddcprobe || die
fi
fi
}
|