summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-02-09 20:38:04 +0100
committerConrad Kostecki <conikost@gentoo.org>2022-02-09 23:55:07 +0100
commit9bf9feae7b601ce19856aa37bc15c62a966921e6 (patch)
tree336c561acd51a8dacc857880b64969f90919570f /app-misc/kryoflux-dtc
parentapp-misc/graphlcd-base: add 2.0.3 (diff)
downloadgentoo-9bf9feae7b601ce19856aa37bc15c62a966921e6.tar.gz
gentoo-9bf9feae7b601ce19856aa37bc15c62a966921e6.tar.bz2
gentoo-9bf9feae7b601ce19856aa37bc15c62a966921e6.zip
app-misc/kryoflux-dtc: update EAPI 7 -> 8
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-misc/kryoflux-dtc')
-rw-r--r--app-misc/kryoflux-dtc/kryoflux-dtc-2.6-r2.ebuild107
1 files changed, 107 insertions, 0 deletions
diff --git a/app-misc/kryoflux-dtc/kryoflux-dtc-2.6-r2.ebuild b/app-misc/kryoflux-dtc/kryoflux-dtc-2.6-r2.ebuild
new file mode 100644
index 000000000000..171f40acc73a
--- /dev/null
+++ b/app-misc/kryoflux-dtc/kryoflux-dtc-2.6-r2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="kryoflux_${PV}_linux"
+MY_P_WINDOWS="kryoflux_3.00_windows"
+
+inherit desktop udev xdg-utils
+
+DESCRIPTION="KryoFlux Host Software"
+HOMEPAGE="https://www.kryoflux.com"
+SRC_URI="
+ https://www.kryoflux.com/download/${MY_P}.tar.bz2
+ gui? ( https://www.kryoflux.com/download/${MY_P_WINDOWS}.zip )
+"
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="-* amd64 x86"
+LICENSE="SPS"
+SLOT="0"
+IUSE="demos doc fast-firmware gui static"
+
+RDEPEND="
+ dev-libs/spsdeclib
+ virtual/libusb:1
+ virtual/udev
+ gui? ( virtual/jre )
+"
+
+BDEPEND="app-arch/unzip"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="/usr/bin/kryoflux-dtc"
+
+src_unpack() {
+ unpack "${MY_P}".tar.bz2
+
+ if use gui; then
+ unpack "${MY_P_WINDOWS}".zip
+
+ # Extract kryoflux-ui.jar to get a logo for the meny entry
+ unpack "${MY_P_WINDOWS}"/dtc/kryoflux-ui.jar
+ fi
+}
+
+src_install() {
+ newbin dtc/$(usex amd64 x86_64 i686)/$(usex static static dynamic)/dtc kryoflux-dtc
+
+ cat <<-EOF > "${T}"/80-kryoflux.rules || die
+ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="6124", GROUP="floppy", MODE="0660"
+ EOF
+ udev_dorules "${T}"/80-kryoflux.rules
+
+ if use gui; then
+ insinto /usr/share/kryoflux-ui
+ doins "${WORKDIR}"/"${MY_P_WINDOWS}"/dtc/kryoflux-ui.jar
+
+ dosym ../../bin/kryoflux-dtc /usr/share/kryoflux-ui/dtc
+
+ make_wrapper kryoflux-ui "java -jar kryoflux-ui.jar" /usr/share/kryoflux-ui
+
+ newicon "${WORKDIR}"/images/disk.png kryoflux-ui.png
+
+ make_desktop_entry "kryoflux-ui" "KryoFlux UI" kryoflux-ui Development
+
+ dodoc dtc/kryoflux-ui_README.txt
+ fi
+
+ if use fast-firmware; then
+ insinto /lib/firmware
+ doins dtc/firmware_fast/firmware_kf_usb_rosalie.bin
+
+ dodoc dtc/firmware_fast/firmware_fast_README.txt
+ else
+ insinto /lib/firmware
+ doins dtc/firmware_kf_usb_rosalie.bin
+ fi
+
+ if use demos; then
+ dodoc -r g64_demo ipf_demo
+ fi
+
+ if use doc; then
+ dodoc -r docs schematics
+ fi
+
+ local DOCS=( "DONATIONS.txt" "RELEASE.txt" "README.linux" )
+ einstalldocs
+}
+
+pkg_postinst() {
+ elog "If you want to access your Kryoflux without root access,"
+ elog "please add yourself to the floppy group."
+
+ if use fast-firmware; then
+ elog ""
+ elog "You have enabled the fast firmware. Please keep in mind,"
+ elog "that this firmware can cause trouble with older floppy drives."
+ fi
+
+ if use gui; then
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ fi
+}