summaryrefslogtreecommitdiff
blob: 4e0e0ab0e33745d1a1b00c4cac6b63e5f5d5e75b (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/mdadm/mdadm-1.2.0.ebuild,v 1.6 2004/06/24 22:15:07 agriffis Exp $

DESCRIPTION="An extremely useful tool for running RAID systems - it can be used as a replacement for the raidtools, or as a supplement."
HOMEPAGE="http://www.cse.unsw.edu.au/~neilb/source"
SRC_URI="http://www.cse.unsw.edu.au/~neilb/source/${PN}/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 amd64 alpha"
IUSE="static"
DEPEND=""
RDEPEND=""
S="${WORKDIR}/${P}"

src_unpack() {
	unpack ${A}
	cd ${S}

	mv Makefile Makefile.orig
	sed -e "36s:^CXFLAGS =:CXFLAGS = $CFLAGS:" Makefile.orig > Makefile

	if [ `use static` ]; then
		mv Makefile Makefile.orig
		echo "yes"
		sed \
			-e "42s:^# ::" \
			-e "43s:^# ::" \
			Makefile.orig > Makefile
	fi
}

src_compile() {
	make || die
}

src_install() {
	make DESTDIR=${D} install

	dodoc INSTALL COPYING TODO ANNOUNCE-${PV}

	insinto /etc
	newins mdadm.conf-example mdadm.conf
}