aboutsummaryrefslogtreecommitdiff
blob: cd192866e0c249c6dfebd6e13350af7d04848574 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libkudzu/libkudzu-1.1.62-r1.ebuild,v 1.12 2006/08/26 04:55:47 mr_bones_ Exp $

inherit eutils rpm multilib

# Revision of the RPM. Shouldn't affect us, as we're just grabbing the source
# tarball out of it
RPMREV="1"

MY_P="${PN/lib}-${PV}"

DESCRIPTION="Red Hat Hardware detection tools"
SRC_URI="mirror://fedora/development/source/SRPMS/${MY_P}-${RPMREV}.src.rpm"
HOMEPAGE="http://fedora.redhat.com/projects/additional-projects/kudzu/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
IUSE=""

RDEPEND="dev-libs/popt
	sys-apps/hwdata-gentoo"
DEPEND="dev-libs/popt
	sys-apps/pciutils"

S="${WORKDIR}/${MY_P}"

src_unpack() {
	rpm_src_unpack
	cd "${S}"
	epatch \
		"${FILESDIR}"/sunlance.patch \
		"${FILESDIR}"/${PV}-remove-sata-ata-storage-classes.patch \
		"${FILESDIR}"/${PV}-remove-pci-fill-class.patch \
		"${FILESDIR}"/${PV}-remove-pci-device-class.patch
}

src_compile() {
	emake \
		all \
		RPM_OPT_FLAGS="${CFLAGS}" || die
}

src_install() {
	emake install install-program \
		DESTDIR="${D}" \
		libdir="${D}/usr/$(get_libdir)" \
		|| die "install failed"

	# libkudzu installs the headers and libkudzu.a
	rm -rf \
		"${D}"/usr/include \
		"${D}"/usr/$(get_libdir)/libkudzu.a \
		|| die "removing colliding files failed"

	# don't install incompatible init scripts
	rm -rf \
		"${D}"/etc/rc.d \
		|| die "removing rc.d files failed"
}