sys-fs/vhba: Bump to 20190302

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2019-03-05 15:06:26 +01:00
parent f65f9ab7d0
commit ed3054bc58
2 changed files with 82 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST vhba-module-20170610.tar.bz2 15622 BLAKE2B 7556f13dba719779a8c9c2acb03c51f9f4b33153b46146109cd3387094a9e3ca2ad9750e4564139696c2a417a5aad347c32a33eeb7b69594477efc2ceab0e12e SHA512 bf27a6a7a6aabf6c1a4c1f16b1a08dce460ee675ea53b141c6db8edf0637dffa900e03b9141f9f1a672fcd8f84e6f2be86a07e1f78bc5667a7a7669d45f1f687
DIST vhba-module-20190302.tar.bz2 15708 BLAKE2B 4a6f1f22e893597e50e78fa06e1296079b600ad6b2cf7b319267ef44d1ff07795f2aca22541993a7fc57d15550297e71046ce4147226d0731aa2b4d691dd5299 SHA512 6df59112b9b0597ce98de85744acd8158dbc015841740649fa3538fec32f1d7cbf4e489062998cc13dc85a1b3558bcffc2ea65285e17ee5b3f1c0a7d49cd6a38

View File

@@ -0,0 +1,81 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit eutils linux-mod udev
MY_P=vhba-module-${PV}
DESCRIPTION="Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite"
HOMEPAGE="http://cdemu.org"
SRC_URI="mirror://sourceforge/cdemu/${MY_P}.tar.bz2"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~x86"
IUSE=""
RDEPEND="virtual/udev"
DEPEND="${RDEPEND}
virtual/pkgconfig"
S=${WORKDIR}/${MY_P}
MODULE_NAMES="vhba(block:${S})"
BUILD_TARGETS=modules
pkg_setup() {
CONFIG_CHECK="~BLK_DEV_SR ~CHR_DEV_SG"
check_extra_config
BUILD_PARAMS="KDIR=${KV_OUT_DIR}"
linux-mod_pkg_setup
}
src_prepare() {
# Avoid "make jobserver unavailable" warning and -Werror problems
sed -e '/ccflags/s/-Werror$/-Wall/' \
-i Makefile || die "sed failed"
eapply_user
}
src_install() {
dodoc AUTHORS ChangeLog README
linux-mod_src_install
einfo "Generating udev rules ..."
dodir "$(get_udevdir)"/rules.d
cat > "${D}/$(get_udevdir)"/rules.d/69-vhba.rules <<-EOF || die
# do not edit this file, it will be overwritten on update
#
KERNEL=="vhba_ctl", SUBSYSTEM=="misc", TAG+="uaccess"
EOF
}
pkg_postinst() {
# Older versions of vhba installed their rule file in /etc/udev/rules.d,
# which overrides rules in /lib/udev/rules.d. We remove the old file
# automatically if it is identical to the default one installed by
# vhba-1.2.1 or 20101015-r1. Note that the comment at the top of the rules
# file states that it can be automatically overwritten by the system.
old_rules="${ROOT}etc/udev/rules.d/70-vhba.rules"
if [[ -f "${old_rules}" ]]; then
case "$(md5sum ${old_rules})" in
2959b3cf61cfe6e466cc3516a7bc19de* | 1e7a7e5d6d28c811eeec98ec26ed5d28* )
elog
elog "Removing old ${old_rules} ..."
rm -f "${old_rules}" ||
eerror "Failed, please remove ${old_rules} manually."
;;
* )
ewarn
ewarn "The ${old_rules} file from a previous"
ewarn "installation of ${PN} is overriding ${P}'s"
ewarn "udev rules. Unless you had deliberately customized it,"
ewarn "you should remove it."
ewarn
;;
esac
fi
linux-mod_pkg_postinst
}