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: app-misc/kryoflux-dtc/
Date: Fri, 22 Jun 2018 18:49:37
Message-Id: 1529693308.c819a508ae5b25cb0745ceccea8e4e0c1a362d21.mgorny@gentoo
1 commit: c819a508ae5b25cb0745ceccea8e4e0c1a362d21
2 Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
3 AuthorDate: Fri Jun 22 18:38:00 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 22 18:48:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c819a508
7
8 app-misc/kryoflux-dtc: New package
9
10 Closes: https://bugs.gentoo.org/651482
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 app-misc/kryoflux-dtc/Manifest | 2 +
14 app-misc/kryoflux-dtc/kryoflux-dtc-2.6.ebuild | 104 ++++++++++++++++++++++++++
15 app-misc/kryoflux-dtc/metadata.xml | 17 +++++
16 3 files changed, 123 insertions(+)
17
18 diff --git a/app-misc/kryoflux-dtc/Manifest b/app-misc/kryoflux-dtc/Manifest
19 new file mode 100644
20 index 00000000000..e6d215853fe
21 --- /dev/null
22 +++ b/app-misc/kryoflux-dtc/Manifest
23 @@ -0,0 +1,2 @@
24 +DIST kryoflux-ui.jar 2101377 BLAKE2B db9922b9d5787772849d1ef9edae52d64de066f643c471412ed9129307c4ee399ec3a18ebcacd7428ab15eabf5307e916b678831f2fa456cbd7073aa60bbb574 SHA512 66ba81ed1b2a97a0391e513c45b19436f17677e3dfe7c063749e41763658f99a5eb92e5b3312f4151f8fc51bd79502ac11ffd895966117e1d5a9849867aeb957
25 +DIST kryoflux_2.6_linux.tar.bz2 9177658 BLAKE2B 6eb0bc7a166950bfedb32da466c17125a8a7d64e4bc9aa6610c69dd0f98c2fb5187ad19dbaf191b33dcb5a786ec4a1fa9bce2464c3c04eb152e0b9ed7ae770f2 SHA512 9bf700e9c646bad135999eb1fed12c86ff6fbc11a0034b86af7541fb16a4905dd740c706ebb87bf5848f5d80f45699c350a56397df5b6850559c2576d18eef1b
26
27 diff --git a/app-misc/kryoflux-dtc/kryoflux-dtc-2.6.ebuild b/app-misc/kryoflux-dtc/kryoflux-dtc-2.6.ebuild
28 new file mode 100644
29 index 00000000000..de512258d89
30 --- /dev/null
31 +++ b/app-misc/kryoflux-dtc/kryoflux-dtc-2.6.ebuild
32 @@ -0,0 +1,104 @@
33 +# Copyright 1999-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +MY_P="kryoflux_${PV}_linux"
39 +
40 +inherit desktop eutils udev xdg-utils
41 +
42 +DESCRIPTION="KryoFlux Host Software"
43 +HOMEPAGE="https://www.kryoflux.com"
44 +SRC_URI="https://www.kryoflux.com/download/${MY_P}.tar.bz2
45 + gui? ( https://www.kryoflux.com/kryoflux-ui.jar )"
46 +
47 +KEYWORDS="-* ~amd64 ~x86"
48 +LICENSE="SPS"
49 +SLOT="0"
50 +IUSE="demos doc fast-firmware gui static"
51 +
52 +RDEPEND="dev-libs/spsdeclib
53 + virtual/libusb:1
54 + virtual/udev
55 + gui? ( virtual/jre )"
56 +
57 +DEPEND="app-arch/unzip"
58 +
59 +RESTRICT="bindist mirror strip"
60 +
61 +S="${WORKDIR}/${MY_P}"
62 +
63 +QA_PREBUILT="/usr/bin/kryoflux-dtc"
64 +
65 +src_unpack() {
66 + unpack ${MY_P}.tar.bz2
67 +
68 + if use gui; then
69 + # Updated *.jar for compatibility with >= Java 9
70 + cp "${DISTDIR}"/kryoflux-ui.jar "${S}" || die
71 +
72 + # Extract kryoflux-ui.jar to get a logo for the meny entry
73 + unpack kryoflux-ui.jar
74 + fi
75 +}
76 +
77 +src_install() {
78 + newbin dtc/$(usex amd64 x86_64 i686)/$(usex static static dynamic)/dtc kryoflux-dtc
79 +
80 + cat <<-EOF > "${T}"/80-kryoflux.rules || die
81 + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="6124", GROUP="floppy", MODE="0660"
82 + EOF
83 + udev_dorules "${T}"/80-kryoflux.rules
84 +
85 + if use gui; then
86 + insinto /usr/share/kryoflux-ui
87 + doins kryoflux-ui.jar
88 +
89 + dosym ../../bin/kryoflux-dtc /usr/share/kryoflux-ui/dtc
90 +
91 + make_wrapper kryoflux-ui "java -jar kryoflux-ui.jar" /usr/share/kryoflux-ui
92 +
93 + newicon "${WORKDIR}"/images/disk.png kryoflux-ui.png
94 +
95 + make_desktop_entry "kryoflux-ui" "KryoFlux UI" kryoflux-ui Development
96 +
97 + dodoc dtc/kryoflux-ui_README.txt
98 + fi
99 +
100 + if use fast-firmware; then
101 + insinto /lib/firmware
102 + doins dtc/firmware_fast/firmware_kf_usb_rosalie.bin
103 +
104 + dodoc dtc/firmware_fast/firmware_fast_README.txt
105 + else
106 + insinto /lib/firmware
107 + doins dtc/firmware_kf_usb_rosalie.bin
108 + fi
109 +
110 + if use demos; then
111 + dodoc -r g64_demo ipf_demo
112 + fi
113 +
114 + if use doc; then
115 + dodoc -r docs schematics
116 + fi
117 +
118 + local DOCS=( "DONATIONS.txt" "RELEASE.txt" "README.linux" )
119 + einstalldocs
120 +}
121 +
122 +pkg_postinst() {
123 + elog "If you want to access your Kryoflux without root access,"
124 + elog "please add yourself to the floppy group."
125 +
126 + if use fast-firmware; then
127 + elog ""
128 + elog "You have enabled the fast firmware. Please keep in mind,"
129 + elog "that this firmware can cause trouble with older floppy drives."
130 + fi
131 +
132 + if use gui; then
133 + xdg_desktop_database_update
134 + xdg_mimeinfo_database_update
135 + fi
136 +}
137
138 diff --git a/app-misc/kryoflux-dtc/metadata.xml b/app-misc/kryoflux-dtc/metadata.xml
139 new file mode 100644
140 index 00000000000..c95657a7f86
141 --- /dev/null
142 +++ b/app-misc/kryoflux-dtc/metadata.xml
143 @@ -0,0 +1,17 @@
144 +<?xml version="1.0" encoding="UTF-8"?>
145 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
146 +<pkgmetadata>
147 + <maintainer type="person">
148 + <email>ck+gentoo@××××××××.de</email>
149 + <name>Conrad Kostecki</name>
150 + </maintainer>
151 + <maintainer type="project">
152 + <email>proxy-maint@g.o</email>
153 + <name>Proxy Maintainers</name>
154 + </maintainer>
155 + <use>
156 + <flag name="demos">Install example floppy game files.</flag>
157 + <flag name="fast-firmware">Install fast firmware instead of slow firmware.</flag>
158 + <flag name="gui">Install the Kryoflux GUI</flag>
159 + </use>
160 +</pkgmetadata>