summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-03-26 18:33:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-03-26 18:33:03 +0100
commitc4037d4978ddc1ee82cee398d01089d1f0649804 (patch)
tree8b7bc6b29589ea2a6e024c623866f9332a6088db
parent9b480fa23428c386a76fb8d4992a51a90508b36e (diff)
port vhba to dkms framework
-rw-r--r--sys-fs/vhba/Manifest1
-rw-r--r--sys-fs/vhba/vhba-20140928-r1000.ebuild51
-rw-r--r--sys-kernel/vhba-dkms/Manifest1
-rw-r--r--sys-kernel/vhba-dkms/files/dkms.conf7
-rw-r--r--sys-kernel/vhba-dkms/vhba-dkms-20140928.ebuild46
5 files changed, 106 insertions, 0 deletions
diff --git a/sys-fs/vhba/Manifest b/sys-fs/vhba/Manifest
new file mode 100644
index 00000000..a2591419
--- /dev/null
+++ b/sys-fs/vhba/Manifest
@@ -0,0 +1 @@
+DIST vhba-module-20140928.tar.bz2 15571 SHA256 45f56e4972b5aa7175903307901ca42d29da6fc8f92ab4c47007f53bc5bb55a2 SHA512 efa61b2ac44a015582f99affa4c26e4b6ccdd1506a7f14626c08833c4ffff300d128dd4e9040d83d5a51064b0bc9f95397c3cdfec7197c53c3d6f1a97953f779 WHIRLPOOL 4b96bb5010b8ab892db09f7e8f36fc67107533dd4d6beea6d5b89e6076c44ee969bee5d3b646b4ca5b1f0f6af446096fd892ab0970b8d6893fe4730f3eb18c07
diff --git a/sys-fs/vhba/vhba-20140928-r1000.ebuild b/sys-fs/vhba/vhba-20140928-r1000.ebuild
new file mode 100644
index 00000000..095949e8
--- /dev/null
+++ b/sys-fs/vhba/vhba-20140928-r1000.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit user 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
+ sys-kernel/vhba-dmks-${PN}"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup cdemu
+}
+
+src_prepare() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog README
+ einfo "Generating udev rules ..."
+ dodir "$(get_udevdir)"/rules.d
+ cat > "${D}/$(get_udevdir)"/rules.d/70-vhba.rules <<-EOF || die
+ # do not edit this file, it will be overwritten on update
+ #
+ KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemu"
+ EOF
+}
+
+pkg_postinst() {
+ elog "Don't forget to add your user to the cdemu group if you want to"
+ elog "be able to use virtual cdemu devices."
+}
diff --git a/sys-kernel/vhba-dkms/Manifest b/sys-kernel/vhba-dkms/Manifest
new file mode 100644
index 00000000..a2591419
--- /dev/null
+++ b/sys-kernel/vhba-dkms/Manifest
@@ -0,0 +1 @@
+DIST vhba-module-20140928.tar.bz2 15571 SHA256 45f56e4972b5aa7175903307901ca42d29da6fc8f92ab4c47007f53bc5bb55a2 SHA512 efa61b2ac44a015582f99affa4c26e4b6ccdd1506a7f14626c08833c4ffff300d128dd4e9040d83d5a51064b0bc9f95397c3cdfec7197c53c3d6f1a97953f779 WHIRLPOOL 4b96bb5010b8ab892db09f7e8f36fc67107533dd4d6beea6d5b89e6076c44ee969bee5d3b646b4ca5b1f0f6af446096fd892ab0970b8d6893fe4730f3eb18c07
diff --git a/sys-kernel/vhba-dkms/files/dkms.conf b/sys-kernel/vhba-dkms/files/dkms.conf
new file mode 100644
index 00000000..d9fe0c26
--- /dev/null
+++ b/sys-kernel/vhba-dkms/files/dkms.conf
@@ -0,0 +1,7 @@
+PACKAGE_NAME="vhba-dkms"
+PACKAGE_VERSION="20140928"
+MAKE[0]="make KVER=$kernelver"
+MAKE[0]="make KV_FULL=$kernelver"
+BUILT_MODULE_NAME[0]="vhba"
+DEST_MODULE_LOCATION[0]="/block"
+AUTOINSTALL="YES"
diff --git a/sys-kernel/vhba-dkms/vhba-dkms-20140928.ebuild b/sys-kernel/vhba-dkms/vhba-dkms-20140928.ebuild
new file mode 100644
index 00000000..dfbdd932
--- /dev/null
+++ b/sys-kernel/vhba-dkms/vhba-dkms-20140928.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+MY_P=vhba-module-${PV}
+DESCRIPTION="Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite sources"
+HOMEPAGE="http://cdemu.org"
+SRC_URI="mirror://sourceforge/cdemu/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+IUSE=""
+
+DEPEND="sys-kernel/dkms"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e '/ccflags/s/-Werror$/-Wall/' \
+ -i Makefile || die "sed failed"
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ cp "${FILESDIR}/dkms.conf" "${S}" || die
+ dodir /usr/src/${P}
+ insinto /usr/src/${P}
+ doins -r "${S}"/*
+}
+
+pkg_postinst() {
+ dkms add ${PN}/${PV}
+}
+
+pkg_postrm() {
+ dkms remove ${PN}/${PV} --all
+}
+