1 |
commit: e1e05db62e800d27b30bb74963df6766b27b2250 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 31 15:47:01 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 31 15:47:11 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1e05db6 |
7 |
|
8 |
sys-apps/smartmontools: Bump to version 7.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-apps/smartmontools/Manifest | 1 + |
14 |
sys-apps/smartmontools/smartmontools-7.1.ebuild | 150 ++++++++++++++++++++++++ |
15 |
2 files changed, 151 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/smartmontools/Manifest b/sys-apps/smartmontools/Manifest |
18 |
index 2d1eba91aa0..67556947217 100644 |
19 |
--- a/sys-apps/smartmontools/Manifest |
20 |
+++ b/sys-apps/smartmontools/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST smartmontools-7.0.tar.gz 944925 BLAKE2B 41b3894efa05471bf358fca4ba87a765e3a54df68c9a617804a9e0853752c57b68fdbaa9d55fa1462a8fa7de1d6cb5630c66929dfe521be38b180944cb80acc9 SHA512 96e18a201182579f699d541539ce393e7bc2191e027cfdf7f87455a63da3a14451574f8fe391232047ac941ace453a017193d0a4987a4edb8f7ed9d5007f0512 |
23 |
+DIST smartmontools-7.1.tar.gz 971468 BLAKE2B de3e1b10997903cb9bf6107f1bd1be9587b66af08a94e368dc9ed3aa6d69ba93d6b41d1ba60076275603702d9d0b47b26e376d3c9f020eb18fde5af4b686485b SHA512 440b2a957da10d240a8ef0008bd3358b83adb9eaca0f8d3e049b25d56a139c61dcd0bb4b27898faef6f189a27e159bdca3331e52e445c0eebf35e5d930f9e295 |
24 |
|
25 |
diff --git a/sys-apps/smartmontools/smartmontools-7.1.ebuild b/sys-apps/smartmontools/smartmontools-7.1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..9f111458dc6 |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/smartmontools/smartmontools-7.1.ebuild |
30 |
@@ -0,0 +1,150 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI="6" |
35 |
+ |
36 |
+inherit autotools flag-o-matic systemd |
37 |
+if [[ ${PV} == "9999" ]] ; then |
38 |
+ ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools" |
39 |
+ ESVN_PROJECT="smartmontools" |
40 |
+ inherit subversion |
41 |
+else |
42 |
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
43 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" |
44 |
+fi |
45 |
+ |
46 |
+DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation" |
47 |
+HOMEPAGE="https://www.smartmontools.org" |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+SLOT="0" |
51 |
+IUSE="caps +daemon selinux static systemd update_drivedb" |
52 |
+ |
53 |
+DEPEND=" |
54 |
+ caps? ( |
55 |
+ static? ( sys-libs/libcap-ng[static-libs] ) |
56 |
+ !static? ( sys-libs/libcap-ng ) |
57 |
+ ) |
58 |
+ kernel_FreeBSD? ( |
59 |
+ sys-freebsd/freebsd-lib[usb] |
60 |
+ ) |
61 |
+ selinux? ( |
62 |
+ sys-libs/libselinux |
63 |
+ )" |
64 |
+RDEPEND="${DEPEND} |
65 |
+ daemon? ( virtual/mailx ) |
66 |
+ selinux? ( sec-policy/selinux-smartmon ) |
67 |
+ systemd? ( sys-apps/systemd ) |
68 |
+ update_drivedb? ( |
69 |
+ app-crypt/gnupg |
70 |
+ || ( |
71 |
+ net-misc/curl |
72 |
+ net-misc/wget |
73 |
+ www-client/lynx |
74 |
+ dev-vcs/subversion |
75 |
+ ) |
76 |
+ ) |
77 |
+" |
78 |
+ |
79 |
+REQUIRED_USE="( caps? ( daemon ) )" |
80 |
+ |
81 |
+src_prepare() { |
82 |
+ default |
83 |
+ eautoreconf |
84 |
+} |
85 |
+ |
86 |
+src_configure() { |
87 |
+ use static && append-ldflags -static |
88 |
+ # The build installs /etc/init.d/smartd, but we clobber it |
89 |
+ # in our src_install, so no need to manually delete it. |
90 |
+ myeconfargs=( |
91 |
+ --with-drivedbdir="${EPREFIX}/var/db/${PN}" #575292 |
92 |
+ --with-initscriptdir="${EPREFIX}/etc/init.d" |
93 |
+ #--with-smartdscriptdir="${EPREFIX}/usr/share/${PN}" |
94 |
+ $(use_with caps libcap-ng) |
95 |
+ $(use_with selinux) |
96 |
+ $(use_with systemd libsystemd) |
97 |
+ $(use_with update_drivedb gnupg) |
98 |
+ $(use_with update_drivedb update-smart-drivedb) |
99 |
+ $(usex systemd "--with-systemdsystemunitdir=$(systemd_get_systemunitdir)" '') |
100 |
+ ) |
101 |
+ econf "${myeconfargs[@]}" |
102 |
+} |
103 |
+ |
104 |
+src_install() { |
105 |
+ local db_path="/var/db/${PN}" |
106 |
+ |
107 |
+ if use daemon; then |
108 |
+ default |
109 |
+ |
110 |
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd |
111 |
+ newconfd "${FILESDIR}"/smartd.confd smartd |
112 |
+ else |
113 |
+ dosbin smartctl |
114 |
+ doman smartctl.8 |
115 |
+ |
116 |
+ local DOCS=( AUTHORS ChangeL* COPYING INSTALL NEWS README TODO ) |
117 |
+ einstalldocs |
118 |
+ fi |
119 |
+ |
120 |
+ if use update_drivedb ; then |
121 |
+ if ! use daemon; then |
122 |
+ dosbin "${S}"/update-smart-drivedb |
123 |
+ fi |
124 |
+ |
125 |
+ exeinto /etc/cron.monthly |
126 |
+ doexe "${FILESDIR}/${PN}-update-drivedb" |
127 |
+ fi |
128 |
+ |
129 |
+ if use daemon || use update_drivedb; then |
130 |
+ keepdir "${db_path}" |
131 |
+ |
132 |
+ # Install a copy of the initial drivedb.h to /usr/share/${PN} |
133 |
+ # so that we can access that file later in pkg_postinst |
134 |
+ # even when dealing with binary packages (bug #575292) |
135 |
+ insinto /usr/share/${PN} |
136 |
+ doins "${S}"/drivedb.h |
137 |
+ fi |
138 |
+ |
139 |
+ # Make sure we never install drivedb.h into the db location |
140 |
+ # of the acutal image so we don't record hashes because user |
141 |
+ # can modify that file |
142 |
+ rm -f "${ED%/}${db_path}/drivedb.h" || die |
143 |
+ |
144 |
+ # Bug #622072 |
145 |
+ find "${ED%/}"/usr/share/doc -type f -exec chmod a-x '{}' \; || die |
146 |
+} |
147 |
+ |
148 |
+pkg_postinst() { |
149 |
+ if use daemon || use update_drivedb; then |
150 |
+ local initial_db_file="${EPREFIX%/}/usr/share/${PN}/drivedb.h" |
151 |
+ local db_path="${EPREFIX%/}/var/db/${PN}" |
152 |
+ |
153 |
+ if [[ ! -f "${db_path}/drivedb.h" ]] ; then |
154 |
+ # No initial database found |
155 |
+ cp "${initial_db_file}" "${db_path}" || die |
156 |
+ einfo "Default drive database which was shipped with this release of ${PN}" |
157 |
+ einfo "has been installed to '${db_path}'." |
158 |
+ else |
159 |
+ ewarn "WARNING: There's already a drive database in '${db_path}'!" |
160 |
+ ewarn "Because we cannot determine if this database is untouched" |
161 |
+ ewarn "or was modified by the user you have to manually update the" |
162 |
+ ewarn "drive database:" |
163 |
+ ewarn "" |
164 |
+ ewarn "a) Replace '${db_path}/drivedb.h' by the database shipped with this" |
165 |
+ ewarn " release which can be found in '${initial_db_file}', i.e." |
166 |
+ ewarn "" |
167 |
+ ewarn " cp \"${initial_db_file}\" \"${db_path}\"" |
168 |
+ ewarn "" |
169 |
+ ewarn "b) Run the following command as root:" |
170 |
+ ewarn "" |
171 |
+ ewarn " /usr/sbin/update-smart-drivedb" |
172 |
+ |
173 |
+ if ! use update_drivedb ; then |
174 |
+ ewarn "" |
175 |
+ ewarn "However, 'update-smart-drivedb' requires that you re-emerge ${PN}" |
176 |
+ ewarn "with USE='update_drivedb'." |
177 |
+ fi |
178 |
+ fi |
179 |
+ fi |
180 |
+} |