| 1 |
zmedico |
1.8 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
robbat2 |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
vapier |
1.10 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/smartmontools/smartmontools-9999.ebuild,v 1.9 2012/08/18 04:44:38 vapier Exp $
|
| 4 |
robbat2 |
1.1 |
|
| 5 |
zmedico |
1.5 |
EAPI="3"
|
| 6 |
robbat2 |
1.1 |
|
| 7 |
vapier |
1.10 |
inherit flag-o-matic systemd
|
| 8 |
robbat2 |
1.1 |
if [[ ${PV} == "9999" ]] ; then
|
| 9 |
|
|
ESVN_REPO_URI="https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools"
|
| 10 |
|
|
ESVN_PROJECT="smartmontools"
|
| 11 |
vapier |
1.2 |
inherit subversion autotools
|
| 12 |
robbat2 |
1.1 |
SRC_URI=""
|
| 13 |
|
|
else
|
| 14 |
|
|
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
| 15 |
vapier |
1.9 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
|
| 16 |
robbat2 |
1.1 |
fi
|
| 17 |
|
|
|
| 18 |
flameeyes |
1.4 |
DESCRIPTION="Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) monitoring tools"
|
| 19 |
robbat2 |
1.1 |
HOMEPAGE="http://smartmontools.sourceforge.net/"
|
| 20 |
|
|
|
| 21 |
|
|
LICENSE="GPL-2"
|
| 22 |
|
|
SLOT="0"
|
| 23 |
vapier |
1.10 |
IUSE="caps minimal selinux static"
|
| 24 |
robbat2 |
1.1 |
|
| 25 |
vapier |
1.10 |
DEPEND="caps? ( sys-libs/libcap-ng )
|
| 26 |
|
|
selinux? ( sys-libs/libselinux )"
|
| 27 |
vapier |
1.7 |
RDEPEND="${DEPEND}
|
| 28 |
|
|
!minimal? ( virtual/mailx )"
|
| 29 |
robbat2 |
1.1 |
|
| 30 |
|
|
src_prepare() {
|
| 31 |
vapier |
1.2 |
if [[ ${PV} == "9999" ]] ; then
|
| 32 |
robbat2 |
1.1 |
#./autogen.sh
|
| 33 |
|
|
eautoreconf
|
| 34 |
|
|
fi
|
| 35 |
|
|
}
|
| 36 |
|
|
|
| 37 |
|
|
src_configure() {
|
| 38 |
|
|
use minimal && einfo "Skipping the monitoring daemon for minimal build."
|
| 39 |
|
|
use static && append-ldflags -static
|
| 40 |
vapier |
1.2 |
econf \
|
| 41 |
zmedico |
1.5 |
--with-docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
| 42 |
vapier |
1.2 |
--with-initscriptdir="/toss-it-away" \
|
| 43 |
vapier |
1.10 |
$(use_with caps libcap-ng) \
|
| 44 |
|
|
$(use_with selinux) \
|
| 45 |
|
|
$(systemd_with_unitdir)
|
| 46 |
robbat2 |
1.1 |
}
|
| 47 |
|
|
|
| 48 |
|
|
src_install() {
|
| 49 |
vapier |
1.2 |
if use minimal ; then
|
| 50 |
|
|
dosbin smartctl || die
|
| 51 |
|
|
doman smartctl.8
|
| 52 |
|
|
else
|
| 53 |
|
|
emake install DESTDIR="${D}" || die
|
| 54 |
|
|
rm -rf "${D}"/toss-it-away
|
| 55 |
robbat2 |
1.1 |
newinitd "${FILESDIR}"/smartd.rc smartd
|
| 56 |
|
|
newconfd "${FILESDIR}"/smartd.confd smartd
|
| 57 |
|
|
fi
|
| 58 |
|
|
}
|