blob: 98d56168a72a5f277fac30a052862c73b8f0b4b7 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/smartmontools/smartmontools-5.40.ebuild,v 1.3 2010/12/17 15:05:43 flameeyes Exp $
EAPI="2"
inherit flag-o-matic
if [[ ${PV} == "9999" ]] ; then
ESVN_REPO_URI="https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools"
ESVN_PROJECT="smartmontools"
inherit subversion autotools
SRC_URI=""
else
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
fi
DESCRIPTION="control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.)"
HOMEPAGE="http://smartmontools.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0"
IUSE="static minimal caps"
RDEPEND="!minimal? (
virtual/mailx
caps? ( sys-libs/libcap-ng )
)"
DEPEND=""
src_unpack() {
if [[ ${PV} == "9999" ]] ; then
subversion_src_unpack
else
unpack ${A}
fi
}
src_prepare() {
if [[ ${PV} == "9999" ]] ; then
#./autogen.sh
eautoreconf
fi
}
src_configure() {
local myconf
use minimal && einfo "Skipping the monitoring daemon for minimal build."
use static && append-ldflags -static
if ! use minimal; then
myconf="${myconf} $(use_with caps libcap-ng)"
else
# disable it so that we stay safe
myconf="${myconf} --without-libcap-ng"
fi
econf \
--with-docdir="/usr/share/doc/${PF}" \
--with-initscriptdir="/toss-it-away" \
${myconf} \
|| die
}
src_install() {
if use minimal ; then
dosbin smartctl || die
doman smartctl.8
else
emake install DESTDIR="${D}" || die
rm -rf "${D}"/toss-it-away
newinitd "${FILESDIR}"/smartd.rc smartd
newconfd "${FILESDIR}"/smartd.confd smartd
fi
}
|