summaryrefslogtreecommitdiff
blob: 574a2150c4cc56738ca1f4897d4151f5befa0b75 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils toolchain-funcs

DESCRIPTION="IBM's tools for support of the ipr SCSI controller"
SRC_URI="mirror://sourceforge/iprdd/${P}-src.tgz"
HOMEPAGE="http://sourceforge.net/projects/iprdd/"

SLOT="0"
LICENSE="IBM"
KEYWORDS="~ppc ~ppc64"

DEPEND=">=sys-libs/ncurses-5.4-r5
	>=sys-apps/pciutils-2.1.11-r1
	>=sys-fs/sysfsutils-1.3.0
	virtual/udev"

RDEPEND="${DEPEND}
	virtual/logger"

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

src_prepare() {
	# Respect CFLAGS and LDFLAGS, bug #377757
	sed -i \
		-e '/^CFLAGS/s/= -g/+=/' \
		-e 's/$(CFLAGS)/\0 $(LDFLAGS)/g' \
		Makefile || die

	epatch_user
}

src_compile() {
	# Respect CC, bug #377757
	emake CC="$(tc-getCC)"
}

src_install () {
	emake INSTALL_MOD_PATH="${D}" install

	newinitd "${FILESDIR}"/iprinit iprinit
	newinitd "${FILESDIR}"/iprupdate iprupdate
	newinitd "${FILESDIR}"/iprdump iprdump
}

pkg_postinst() {
	einfo "This package also contains several init.d files. "
	einfo "You should add them to your default runlevels as follows:"
	einfo "rc-update add iprinit default"
	einfo "rc-update add iprdump default"
	einfo "rc-update add iprupdate default"
}