Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/vhba/
Date: Tue, 05 Mar 2019 14:29:16
Message-Id: 1551796138.ed3054bc58aa5136cdf11571f091ed1a8914a5fd.mgorny@gentoo
1 commit: ed3054bc58aa5136cdf11571f091ed1a8914a5fd
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 5 14:06:26 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 5 14:28:58 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed3054bc
7
8 sys-fs/vhba: Bump to 20190302
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-fs/vhba/Manifest | 1 +
13 sys-fs/vhba/vhba-20190302.ebuild | 81 ++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 82 insertions(+)
15
16 diff --git a/sys-fs/vhba/Manifest b/sys-fs/vhba/Manifest
17 index 376b247206d..8385f6fcba2 100644
18 --- a/sys-fs/vhba/Manifest
19 +++ b/sys-fs/vhba/Manifest
20 @@ -1 +1,2 @@
21 DIST vhba-module-20170610.tar.bz2 15622 BLAKE2B 7556f13dba719779a8c9c2acb03c51f9f4b33153b46146109cd3387094a9e3ca2ad9750e4564139696c2a417a5aad347c32a33eeb7b69594477efc2ceab0e12e SHA512 bf27a6a7a6aabf6c1a4c1f16b1a08dce460ee675ea53b141c6db8edf0637dffa900e03b9141f9f1a672fcd8f84e6f2be86a07e1f78bc5667a7a7669d45f1f687
22 +DIST vhba-module-20190302.tar.bz2 15708 BLAKE2B 4a6f1f22e893597e50e78fa06e1296079b600ad6b2cf7b319267ef44d1ff07795f2aca22541993a7fc57d15550297e71046ce4147226d0731aa2b4d691dd5299 SHA512 6df59112b9b0597ce98de85744acd8158dbc015841740649fa3538fec32f1d7cbf4e489062998cc13dc85a1b3558bcffc2ea65285e17ee5b3f1c0a7d49cd6a38
23
24 diff --git a/sys-fs/vhba/vhba-20190302.ebuild b/sys-fs/vhba/vhba-20190302.ebuild
25 new file mode 100644
26 index 00000000000..54053993481
27 --- /dev/null
28 +++ b/sys-fs/vhba/vhba-20190302.ebuild
29 @@ -0,0 +1,81 @@
30 +# Copyright 1999-2019 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI="6"
34 +
35 +inherit eutils linux-mod udev
36 +
37 +MY_P=vhba-module-${PV}
38 +DESCRIPTION="Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite"
39 +HOMEPAGE="http://cdemu.org"
40 +SRC_URI="mirror://sourceforge/cdemu/${MY_P}.tar.bz2"
41 +
42 +LICENSE="GPL-2+"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~hppa ~x86"
45 +IUSE=""
46 +
47 +RDEPEND="virtual/udev"
48 +DEPEND="${RDEPEND}
49 + virtual/pkgconfig"
50 +
51 +S=${WORKDIR}/${MY_P}
52 +MODULE_NAMES="vhba(block:${S})"
53 +BUILD_TARGETS=modules
54 +
55 +pkg_setup() {
56 + CONFIG_CHECK="~BLK_DEV_SR ~CHR_DEV_SG"
57 + check_extra_config
58 + BUILD_PARAMS="KDIR=${KV_OUT_DIR}"
59 + linux-mod_pkg_setup
60 +}
61 +
62 +src_prepare() {
63 + # Avoid "make jobserver unavailable" warning and -Werror problems
64 + sed -e '/ccflags/s/-Werror$/-Wall/' \
65 + -i Makefile || die "sed failed"
66 +
67 + eapply_user
68 +}
69 +
70 +src_install() {
71 + dodoc AUTHORS ChangeLog README
72 + linux-mod_src_install
73 +
74 + einfo "Generating udev rules ..."
75 + dodir "$(get_udevdir)"/rules.d
76 + cat > "${D}/$(get_udevdir)"/rules.d/69-vhba.rules <<-EOF || die
77 + # do not edit this file, it will be overwritten on update
78 + #
79 + KERNEL=="vhba_ctl", SUBSYSTEM=="misc", TAG+="uaccess"
80 + EOF
81 +}
82 +
83 +pkg_postinst() {
84 + # Older versions of vhba installed their rule file in /etc/udev/rules.d,
85 + # which overrides rules in /lib/udev/rules.d. We remove the old file
86 + # automatically if it is identical to the default one installed by
87 + # vhba-1.2.1 or 20101015-r1. Note that the comment at the top of the rules
88 + # file states that it can be automatically overwritten by the system.
89 + old_rules="${ROOT}etc/udev/rules.d/70-vhba.rules"
90 + if [[ -f "${old_rules}" ]]; then
91 + case "$(md5sum ${old_rules})" in
92 + 2959b3cf61cfe6e466cc3516a7bc19de* | 1e7a7e5d6d28c811eeec98ec26ed5d28* )
93 + elog
94 + elog "Removing old ${old_rules} ..."
95 + rm -f "${old_rules}" ||
96 + eerror "Failed, please remove ${old_rules} manually."
97 + ;;
98 + * )
99 + ewarn
100 + ewarn "The ${old_rules} file from a previous"
101 + ewarn "installation of ${PN} is overriding ${P}'s"
102 + ewarn "udev rules. Unless you had deliberately customized it,"
103 + ewarn "you should remove it."
104 + ewarn
105 + ;;
106 + esac
107 + fi
108 +
109 + linux-mod_pkg_postinst
110 +}