summaryrefslogtreecommitdiff
blob: 9fdfec12088ed625b33e8f39380175e37e07453d (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild,v 1.1 2005/05/28 21:36:14 vapier Exp $

inherit flag-o-matic eutils

DESCRIPTION="Linux RAID 0/1/4/5 utilities"
HOMEPAGE="http://people.redhat.com/mingo/raidtools/"
SRC_URI="http://people.redhat.com/mingo/raidtools/${P}.tar.gz"

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

# We link statically with popt so that libpopt can
# live in /usr but keep critical raid binaries in /
DEPEND="dev-libs/popt"
RDEPEND=""

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-gcc33.patch
	epatch "${FILESDIR}"/${P}-2.6.Headers.patch
	epatch "${FILESDIR}"/${P}-mkraid.patch
	epatch "${FILESDIR}"/${P}-s390x.patch
	epatch "${FILESDIR}"/${P}-raidstop.patch
	epatch "${FILESDIR}"/${P}-PIC.patch
	epatch "${FILESDIR}"/${P}-quiet-raidstart.patch

	# Buffer overflow fix
	sed -i -e "/define MAX_LINE_LENGTH/s:100:1000:" common.h
	# Don't create device nodes (pisses off selinux) #73928
	sed -i \
		-e '/^CFLAGS/s:-O2:@CFLAGS@:' \
		-e "s:mknod:echo mknod means MonKey NOD:" \
		Makefile.in || die "sed Makefile.in failed"
}

src_install() {
	make install ROOTDIR="${D}" || die
	insinto /$(get_libdir)/rcscripts/addons
	doins "${FILESDIR}"/raid-start.sh || die "addon failed"

	exeinto /etc/cron.daily
	newexe "${FILESDIR}"/raidtools.cron raidtools

	doman *.8 *.5
	dodoc README *raidtab raidreconf-HOWTO reconf.notes retry summary \
		Software-RAID.HOWTO/Software-RAID.HOWTO.txt
	dohtml Software-RAID.HOWTO/Software-RAID.HOWTO.html
	docinto config
	dodoc *.sample
}