blob: 6b4066c6c6a99317cea851c7273c752f4245fb9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
PYTHON_COMPAT=( python3_{10..12} )
inherit desktop distutils-r1 optfeature xdg
MY_PN="WoeUSB-ng"
DESCRIPTION="Create a Windows USB stick installer from an iso image (rewrite of WoeUSB)"
HOMEPAGE="https://github.com/WoeUSB/WoeUSB-ng"
SRC_URI="https://github.com/WoeUSB/WoeUSB-ng/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="gui"
RDEPEND="
!sys-boot/woeusb
app-arch/p7zip
sys-apps/util-linux
sys-block/parted
sys-boot/grub:2
sys-fs/dosfstools
sys-fs/ntfs3g[ntfsprogs]
$(python_gen_cond_dep '
dev-python/termcolor[${PYTHON_USEDEP}]
gui? ( dev-python/wxpython:4.0[${PYTHON_USEDEP}] )
')
"
PATCHES=(
"${FILESDIR}"/${P}-fix-pkg-discovery.patch
"${FILESDIR}"/${P}-skip-postinstall.patch
)
src_prepare() {
distutils-r1_src_prepare
python_fix_shebang WoeUSB
# fix hardcoded org.freedesktop.policykit.exec.path
sed -i "s|/usr/local/bin|${EPREFIX}/usr/bin|" \
miscellaneous/com.github.woeusb.woeusb-ng.policy \
WoeUSB/utils.py || die
}
src_install() {
distutils-r1_src_install
if use gui; then
dobin WoeUSB/woeusbgui
insinto /usr/share/polkit-1/actions
doins miscellaneous/com.github.woeusb.woeusb-ng.policy
doicon -s 256 WoeUSB/data/woeusb-logo.png
make_desktop_entry woeusbgui WoeUSB-ng woeusb-logo Utility
fi
}
pkg_postinst() {
xdg_pkg_postinst
optfeature "Legacy PC bootmode support" "sys-boot/grub:2[grub_platforms_pc]"
}
|