/[gentoo-x86]/sys-fs/mdadm/mdadm-3.1.5.ebuild
Gentoo

Contents of /sys-fs/mdadm/mdadm-3.1.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Aug 12 15:25:08 2012 UTC (9 months, 1 week ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +3 -3 lines
Inherit multilib.eclass for function get_libdir as noted by repoman.

(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.1.5.ebuild,v 1.2 2011/06/11 21:12:39 maekke Exp $
4
5 inherit multilib eutils flag-o-matic toolchain-funcs
6
7 DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools"
8 HOMEPAGE="http://neil.brown.name/blog/mdadm"
9 SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
14 IUSE="static"
15
16 DEPEND=""
17 RDEPEND=">=sys-apps/util-linux-2.16"
18
19 # The tests edit values in /proc and run tests on software raid devices.
20 # Thus, they shouldn't be run on systems with active software RAID devices.
21 RESTRICT="test"
22
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
26 epatch "${FILESDIR}"/${PN}-3.0-dont-make-man.patch
27 epatch "${FILESDIR}"/${PN}-2.6-syslog-updates.patch
28 epatch "${FILESDIR}"/${PN}-2.6.4-mdassemble.patch #211426
29 epatch "${FILESDIR}"/${PN}-3.1.5-cflags.patch #336175
30 use static && append-ldflags -static
31 }
32
33 mdadm_emake() {
34 emake \
35 CC="$(tc-getCC)" \
36 CWFLAGS="-Wall" \
37 CXFLAGS="${CFLAGS}" \
38 "$@" \
39 || die
40 }
41
42 src_compile() {
43 mdadm_emake all mdassemble
44 }
45
46 src_test() {
47 mdadm_emake test
48
49 sh ./test || die
50 }
51
52 src_install() {
53 emake DESTDIR="${D}" install || die
54 into /
55 dosbin mdassemble || die
56 dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
57
58 exeinto /$(get_libdir)/rcscripts/addons
59 newexe "${FILESDIR}"/raid-start.sh-3.0 raid-start.sh || die
60 newexe "${FILESDIR}"/raid-stop.sh raid-stop.sh || die
61
62 insinto /etc
63 newins mdadm.conf-example mdadm.conf
64 newinitd "${FILESDIR}"/mdadm.rc mdadm || die
65 newconfd "${FILESDIR}"/mdadm.confd mdadm || die
66 newinitd "${FILESDIR}"/mdraid.rc-3.1.1 mdraid || die
67 newconfd "${FILESDIR}"/mdraid.confd mdraid || die
68
69 # do not rely on /lib -> /libXX link
70 sed -i \
71 -e "s:/lib/rcscripts/:/$(get_libdir)/rcscripts/:" \
72 "${D}"/etc/init.d/*
73 }
74
75 pkg_postinst() {
76 elog "If using baselayout-2 and not relying on kernel auto-detect"
77 elog "of your RAID devices, you need to add 'mdraid' to your 'boot'"
78 elog "runlevel. Run the following command:"
79 elog "rc-update add mdraid boot"
80 }

  ViewVC Help
Powered by ViewVC 1.1.13