mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-boot/woeusb-ng: new package, add 0.2.12
Imported from ::guru. This is a newer project that replaces sys-boot/woeusb. Changes from ::guru: - Fix setuptools warnings - Fix hardcoded org.freedesktop.policykit.exec.path - Add non optional RDEPEND Signed-off-by: Takuya Wakazono <pastalian46@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
19e5d0644b
commit
a1f25dcfe6
1
sys-boot/woeusb-ng/Manifest
Normal file
1
sys-boot/woeusb-ng/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST woeusb-ng-0.2.12.tar.gz 219102 BLAKE2B d146697ce4143adc62b489a5dbd09bd2dd02d910a51357a27b1a92663eee279c6fa3bdd39b0f01e46f445cb0170c3b0dbf37ed7fdc442386247ff2acb85791e8 SHA512 3323d1f33f3c009652555ca20827d3ab902a59c21b4e57725ac7efb702c60c8ab8a572f77c7f5e4da91713ea5412811358870d6100e13e5828421645b7464c38
|
||||
@@ -0,0 +1,28 @@
|
||||
Fix setuptools package discovery issues by using custom discovery.
|
||||
|
||||
```
|
||||
/usr/lib/python3.12/site-packages/setuptools/command/build_py.py:212: _Warning: Package 'WoeUSB.data' is absent from the `packages` configuration.
|
||||
```
|
||||
|
||||
There's an open PR to improve the packaging methods.
|
||||
https://github.com/WoeUSB/WoeUSB-ng/pull/79
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
import shutil
|
||||
import stat
|
||||
|
||||
-from setuptools import setup
|
||||
+from setuptools import setup, find_namespace_packages
|
||||
from setuptools.command.develop import develop
|
||||
from setuptools.command.install import install
|
||||
|
||||
@@ -57,7 +57,7 @@ setup(
|
||||
author_email='jakubmateusz@poczta.onet.pl',
|
||||
license='GPL-3',
|
||||
zip_safe=False,
|
||||
- packages=['WoeUSB'],
|
||||
+ packages=find_namespace_packages(exclude=['doc', 'miscellaneous']),
|
||||
include_package_data=True,
|
||||
scripts=[
|
||||
'WoeUSB/woeusb',
|
||||
@@ -0,0 +1,13 @@
|
||||
Prevent installing files to hardcoded locations.
|
||||
|
||||
There's an open PR to improve the packaging methods.
|
||||
https://github.com/WoeUSB/WoeUSB-ng/pull/79
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -68,6 +68,5 @@ setup(
|
||||
],
|
||||
cmdclass={
|
||||
'develop': PostDevelopCommand,
|
||||
- 'install': PostInstallCommand
|
||||
}
|
||||
)
|
||||
15
sys-boot/woeusb-ng/metadata.xml
Normal file
15
sys-boot/woeusb-ng/metadata.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>pastalian46@gmail.com</email>
|
||||
<name>Takuya Wakazono</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">WoeUSB/WoeUSB-ng</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
69
sys-boot/woeusb-ng/woeusb-ng-0.2.12.ebuild
Normal file
69
sys-boot/woeusb-ng/woeusb-ng-0.2.12.ebuild
Normal file
@@ -0,0 +1,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]"
|
||||
}
|
||||
Reference in New Issue
Block a user