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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Tue Jan 7 10:11:58 2014 UTC (6 months, 3 weeks ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
Removed old versions and files

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

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.4.ebuild,v 1.11 2012/08/12 15:25:08 ssuominen 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.4-cflags.patch #336175
30 use static && append-ldflags -static
31
32 sed -i -e 's:-z now::' Makefile || die #331653
33 }
34
35 mdadm_emake() {
36 emake \
37 CC="$(tc-getCC)" \
38 CWFLAGS="-Wall" \
39 CXFLAGS="${CFLAGS}" \
40 "$@" \
41 || die
42 }
43
44 src_compile() {
45 mdadm_emake all mdassemble
46 }
47
48 src_test() {
49 mdadm_emake test
50
51 sh ./test || die
52 }
53
54 src_install() {
55 emake DESTDIR="${D}" install || die
56 into /
57 dosbin mdassemble || die
58 dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
59
60 exeinto /$(get_libdir)/rcscripts/addons
61 newexe "${FILESDIR}"/raid-start.sh-3.0 raid-start.sh || die
62 newexe "${FILESDIR}"/raid-stop.sh raid-stop.sh || die
63
64 insinto /etc
65 newins mdadm.conf-example mdadm.conf
66 newinitd "${FILESDIR}"/mdadm.rc mdadm || die
67 newconfd "${FILESDIR}"/mdadm.confd mdadm || die
68 newinitd "${FILESDIR}"/mdraid.rc-3.1.1 mdraid || die
69 newconfd "${FILESDIR}"/mdraid.confd mdraid || die
70
71 # do not rely on /lib -> /libXX link
72 sed -i \
73 -e "s:/lib/rcscripts/:/$(get_libdir)/rcscripts/:" \
74 "${D}"/etc/init.d/*
75 }
76
77 pkg_postinst() {
78 elog "If using baselayout-2 and not relying on kernel auto-detect"
79 elog "of your RAID devices, you need to add 'mdraid' to your 'boot'"
80 elog "runlevel. Run the following command:"
81 elog "rc-update add mdraid boot"
82 }

  ViewVC Help
Powered by ViewVC 1.1.20