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