summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mair-Keimberger <m.mairkeimberger@gmail.com>2019-03-07 18:43:33 +0100
committerPatrice Clement <monsieurp@gentoo.org>2019-03-09 22:01:55 +0100
commit93c236ce0b0061f119388dd217faf75158e8a948 (patch)
treef6ab9f1850d689693f1bea138d56794b51b74224 /sys-block/scsiadd
parentsys-block/scsiadd: use HTTPS. (diff)
downloadgentoo-93c236ce0b0061f119388dd217faf75158e8a948.tar.gz
gentoo-93c236ce0b0061f119388dd217faf75158e8a948.tar.bz2
gentoo-93c236ce0b0061f119388dd217faf75158e8a948.zip
sys-block/scsiadd: EAPI7 bump, minor improvements.
Closes: https://bugs.gentoo.org/679696 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com> Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'sys-block/scsiadd')
-rw-r--r--sys-block/scsiadd/scsiadd-1.97-r1.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/sys-block/scsiadd/scsiadd-1.97-r1.ebuild b/sys-block/scsiadd/scsiadd-1.97-r1.ebuild
new file mode 100644
index 000000000000..718a26b6f7ac
--- /dev/null
+++ b/sys-block/scsiadd/scsiadd-1.97-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user toolchain-funcs flag-o-matic
+
+DESCRIPTION="Add and remove SCSI devices from your Linux system during runtime"
+HOMEPAGE="https://llg.cubic.org/tools/"
+SRC_URI="https://llg.cubic.org/tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="suid"
+
+pkg_setup() {
+ use suid && enewgroup scsi
+}
+
+src_prepare() {
+ default
+ # remove 'strip' command
+ sed -i -e "s:^\(.*strip.*\):#\1:g" Makefile.in || die
+
+ # convert docs to utf-8
+ if [ -x "$(type -p iconv)" ]; then
+ for X in NEWS README; do
+ iconv -f LATIN1 -t UTF8 -o "${X}~" "${X}" && mv -f "${X}~" "${X}" \
+ || rm -f "${X}~" || die
+ done
+ fi
+}
+
+src_compile() {
+ # extra safety for suid
+ append-ldflags -Wl,-z,now
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin scsiadd
+ if use suid; then
+ fowners root:scsi /usr/sbin/scsiadd
+ fperms 4710 /usr/sbin/scsiadd
+ fi
+ dodoc NEWS README TODO
+ doman scsiadd.8
+}
+
+pkg_postinst() {
+ if use suid; then
+ ewarn
+ ewarn "You have chosen to install ${PN} with the binary setuid root. This"
+ ewarn "means that if there any undetected vulnerabilities in the binary,"
+ ewarn "then local users may be able to gain root access on your machine."
+ ewarn
+ fi
+}