1 |
|
# Copyright 1999-2021 Gentoo Authors
|
|
1 |
# Copyright 1999-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI="6"
|
|
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
inherit autotools flag-o-matic systemd
|
7 |
|
if [[ ${PV} == "9999" ]] ; then
|
|
6 |
inherit flag-o-matic systemd
|
|
7 |
if [[ ${PV} == 9999 ]] ; then
|
8 |
8 |
ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
|
9 |
9 |
ESVN_PROJECT="smartmontools"
|
10 |
|
inherit subversion
|
|
10 |
inherit autotools subversion
|
11 |
11 |
else
|
12 |
12 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
13 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
|
13 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
14 |
14 |
fi
|
15 |
15 |
|
16 |
16 |
DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
|
... | ... | |
22 |
22 |
|
23 |
23 |
DEPEND="
|
24 |
24 |
caps? (
|
25 |
|
static? ( sys-libs/libcap-ng[static-libs] )
|
26 |
|
!static? ( sys-libs/libcap-ng )
|
|
25 |
static? ( sys-libs/libcap-ng:=[static-libs] )
|
|
26 |
!static? ( sys-libs/libcap-ng:= )
|
27 |
27 |
)
|
28 |
28 |
selinux? (
|
29 |
|
sys-libs/libselinux
|
30 |
|
)"
|
31 |
|
RDEPEND="${DEPEND}
|
|
29 |
sys-libs/libselinux:=
|
|
30 |
)
|
|
31 |
"
|
|
32 |
RDEPEND="
|
|
33 |
${DEPEND}
|
32 |
34 |
daemon? ( virtual/mailx )
|
33 |
35 |
selinux? ( sec-policy/selinux-smartmon )
|
34 |
36 |
systemd? ( sys-apps/systemd )
|
... | ... | |
48 |
50 |
static? ( !systemd )
|
49 |
51 |
)"
|
50 |
52 |
|
51 |
|
PATCHES=(
|
52 |
|
# Backport from commit 56363dff436c12eaa296bbba39dfd65ec3f1f1f2
|
53 |
|
"${FILESDIR}/${P}-update-smart-drivedb-quiet.patch"
|
54 |
|
)
|
55 |
|
|
56 |
53 |
src_prepare() {
|
57 |
54 |
default
|
58 |
|
eautoreconf
|
|
55 |
|
|
56 |
if [[ ${PV} == 9999 ]] ; then
|
|
57 |
eautoreconf
|
|
58 |
fi
|
59 |
59 |
}
|
60 |
60 |
|
61 |
61 |
src_configure() {
|
... | ... | |
115 |
115 |
# Make sure we never install drivedb.h into the db location
|
116 |
116 |
# of the acutal image so we don't record hashes because user
|
117 |
117 |
# can modify that file
|
118 |
|
rm -f "${ED%/}${db_path}/drivedb.h" || die
|
|
118 |
rm -f "${ED}${db_path}/drivedb.h" || die
|
119 |
119 |
|
120 |
120 |
# Bug #622072
|
121 |
|
find "${ED%/}"/usr/share/doc -type f -exec chmod a-x '{}' \; || die
|
|
121 |
find "${ED}"/usr/share/doc -type f -exec chmod a-x '{}' \; || die
|
122 |
122 |
}
|
123 |
123 |
|
124 |
124 |
pkg_postinst() {
|
125 |
125 |
if use daemon || use update-drivedb; then
|
126 |
|
local initial_db_file="${EROOT}usr/share/${PN}/drivedb.h"
|
127 |
|
local db_path="${EROOT}var/db/${PN}"
|
|
126 |
local initial_db_file="${EROOT}/usr/share/${PN}/drivedb.h"
|
|
127 |
local db_path="${EROOT}/var/db/${PN}"
|
128 |
128 |
|
129 |
129 |
if [[ ! -f "${db_path}/drivedb.h" ]] ; then
|
130 |
130 |
# No initial database found
|