Added several ebuilds
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
AUX smartd-r1.rc 621 SHA256 ab06df01453c754649be911577464bb7c1379b236d420450f5ce1b1b480a136d SHA512 fed706bff5e45e207f90962a6185ab3f14166108eddd4f6f142cedb5489dfa05cab3e2e21593aa0d6361d02707cdb5f19cc35be5abbb3d4be51fdb976d959097 WHIRLPOOL b2b0cad7395edd40c29081abd4f9d9e4eb31d10efaf2f6bfc8e39d5faea8908ba4ccc60d3ea473fe197bd257f9fa7be4b086a576ded834c0c987677f41ba408c
|
||||
AUX smartd.confd 107 SHA256 714cc1b253e1f59b884be89693757fec91ca878c62f37451a49ef6bb72263e85 SHA512 ff45462944f01c0e7cac99443078b253dcbaed4f99ffab85052b12361d9eec4beec81cab334fbede9148b3dd503d5205add32ef4327a788f02a8b1e37f460437 WHIRLPOOL 773405a2cc669f6eaae835bc3a6415151891b91ccf4111147f8b12d9763be26cbf65815879a70cd64ae12a36f59840ffcb15ff7e527479f88d9816130e704e76
|
||||
AUX smartmontools-update-drivedb 42 SHA256 53a766a094ef63b925e2c3f8c08322b67c2ab40b1f2b84d414e5de4f6747aca8 SHA512 8ad70fc85ab67b7c32eda95dd37517382c2447862df08b810a54dcdedb1eb8148f3a0e29f402a54adff31d1e88d80d09a258ed9e1e13b597ab2a358ebeda0ce8 WHIRLPOOL 3dd62cd6e26a18c9fe5555a1d3feb2597eea6773c857a2cf559331486fc0ef2ef67a0bcb7d1e03b14631d0c8809daae7688d6e1f83f02e8867b0dc23dfcafb55
|
||||
EBUILD smartmontools-9999.ebuild 2659 SHA256 837e643359828272e48ed187fc59bb3022fce58022ea8ee12bd06fd66edc2e60 SHA512 62429c61b88a98e26ad715240d9713e25d916e9531712e17b27f4f6b3ea7d260b50d66780b1f7818d86dbc8d138e873311960b2a8c8e3d0d7c747e868bdc2c49 WHIRLPOOL da7ec558f93d05509783f87365c7d8487bacab1733b1df9a592850e940710d0531ef11411f84a12542025749ec8ae34acfa0c5d29ea17d6b0a14d6868f0c07dd
|
||||
MISC metadata.xml 517 SHA256 9498d60f66b4e752d70f5f34e5bcf2ed20bb9d113310d9f4344049dde7fc6087 SHA512 63c3af11414b2a8ac83351486b600c16dec940d01c07bacfefb762b3acb152f87db3f630772c0ec32cdc4b316ab3a98ed3efbda82d0af5680d76f0b24459ba14 WHIRLPOOL 4a7af5fe7bd02387df2ebd7c34379eff330710a4ffc7beed20953cac8c4ab2cfae4d1283c71bf1f79d1d765e681761b2e1a5ab19557ebb7e84c16aa143429f5c
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
pidfile="/run/smartd.pid"
|
||||
command="/usr/sbin/smartd"
|
||||
command_args="-p ${pidfile} ${SMARTD_OPTS}"
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after bootmisc
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if [ ! -f "/etc/smartd.conf" ] ; then
|
||||
eerror "You should setup your /etc/smartd.conf file!"
|
||||
eerror "See the smartd.conf(5) manpage."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading configuration"
|
||||
start-stop-daemon --signal HUP --pidfile ${pidfile} ${command##*/}
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# /etc/conf.d/smartd: config file for /etc/init.d/smartd
|
||||
|
||||
# Insert any other options needed
|
||||
SMARTD_OPTS=""
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/sbin/update-smart-drivedb
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="minimal">Do not install the monitoring daemon and associated scripts.</flag>
|
||||
<flag name="update_drivedb">Install a script to update the drivedb file.</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">smartmontools</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -0,0 +1,100 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit flag-o-matic systemd
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
|
||||
ESVN_PROJECT="smartmontools"
|
||||
inherit subversion autotools
|
||||
else
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~x64-macos"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) monitoring tools"
|
||||
HOMEPAGE="https://www.smartmontools.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="caps minimal selinux static update_drivedb"
|
||||
|
||||
DEPEND="
|
||||
caps? (
|
||||
static? ( sys-libs/libcap-ng[static-libs] )
|
||||
!static? ( sys-libs/libcap-ng )
|
||||
)
|
||||
selinux? (
|
||||
sys-libs/libselinux
|
||||
)"
|
||||
RDEPEND="${DEPEND}
|
||||
!minimal? ( virtual/mailx )
|
||||
selinux? ( sec-policy/selinux-smartmon )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use minimal && einfo "Skipping the monitoring daemon for minimal build."
|
||||
use static && append-ldflags -static
|
||||
# The build installs /etc/init.d/smartd, but we clobber it
|
||||
# in our src_install, so no need to manually delete it.
|
||||
myeconfargs=(
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}"
|
||||
--with-drivedbdir="${EPREFIX}/var/db/${PN}" #575292
|
||||
--with-initscriptdir="${EPREFIX}/etc/init.d"
|
||||
$(use_with caps libcap-ng)
|
||||
$(use_with selinux)
|
||||
$(systemd_with_unitdir)
|
||||
$(use_with update_drivedb update-smart-drivedb)
|
||||
$(use_with update_drivedb gnutls)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local db_path="/var/db/${PN}"
|
||||
|
||||
if use minimal ; then
|
||||
dosbin smartctl
|
||||
doman smartctl.8
|
||||
else
|
||||
default
|
||||
newinitd "${FILESDIR}"/smartd-r1.rc smartd
|
||||
newconfd "${FILESDIR}"/smartd.confd smartd
|
||||
|
||||
keepdir ${db_path}
|
||||
if use update_drivedb ; then
|
||||
# Move drivedb.h file out of PM's sight (bug #575292)
|
||||
mv "${ED}"${db_path}/drivedb.h "${T}" || die
|
||||
|
||||
exeinto /etc/cron.monthly
|
||||
doexe "${FILESDIR}"/${PN}-update-drivedb
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use minimal ; then
|
||||
local db_path="/var/db/${PN}"
|
||||
|
||||
if [[ -f "${db_path}/drivedb.h" ]] ; then
|
||||
ewarn "WARNING! The drive database file has been replaced with the version that"
|
||||
ewarn "got shipped with this release of ${PN}. You may want to update the"
|
||||
ewarn "database by running the following command as root:"
|
||||
ewarn ""
|
||||
ewarn "/usr/sbin/update-smart-drivedb"
|
||||
fi
|
||||
|
||||
if use update_drivedb ; then
|
||||
# Move drivedb.h to /var/db/${PN} (bug #575292)
|
||||
mv "${T}"/drivedb.h ${db_path} || die
|
||||
fi
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user