diff options
author | Takuya Wakazono <pastalian46@gmail.com> | 2024-11-24 15:52:43 +0900 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-27 23:38:57 +0000 |
commit | a1f25dcfe6740a4066137e1d9360ff23ac272e9f (patch) | |
tree | 3dc992cb56395dd6a4486d0a3bdb77053eb2143d /sys-boot | |
parent | app-laptop/tiny-dfr: Add 0.3.3 (diff) | |
download | gentoo-a1f25dcfe6740a4066137e1d9360ff23ac272e9f.tar.gz gentoo-a1f25dcfe6740a4066137e1d9360ff23ac272e9f.tar.bz2 gentoo-a1f25dcfe6740a4066137e1d9360ff23ac272e9f.zip |
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>
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/woeusb-ng/Manifest | 1 | ||||
-rw-r--r-- | sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-fix-pkg-discovery.patch | 28 | ||||
-rw-r--r-- | sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-skip-postinstall.patch | 13 | ||||
-rw-r--r-- | sys-boot/woeusb-ng/metadata.xml | 15 | ||||
-rw-r--r-- | sys-boot/woeusb-ng/woeusb-ng-0.2.12.ebuild | 69 |
5 files changed, 126 insertions, 0 deletions
diff --git a/sys-boot/woeusb-ng/Manifest b/sys-boot/woeusb-ng/Manifest new file mode 100644 index 000000000000..cc515198d1a7 --- /dev/null +++ b/sys-boot/woeusb-ng/Manifest @@ -0,0 +1 @@ +DIST woeusb-ng-0.2.12.tar.gz 219102 BLAKE2B d146697ce4143adc62b489a5dbd09bd2dd02d910a51357a27b1a92663eee279c6fa3bdd39b0f01e46f445cb0170c3b0dbf37ed7fdc442386247ff2acb85791e8 SHA512 3323d1f33f3c009652555ca20827d3ab902a59c21b4e57725ac7efb702c60c8ab8a572f77c7f5e4da91713ea5412811358870d6100e13e5828421645b7464c38 diff --git a/sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-fix-pkg-discovery.patch b/sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-fix-pkg-discovery.patch new file mode 100644 index 000000000000..33d84aa3179b --- /dev/null +++ b/sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-fix-pkg-discovery.patch @@ -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', diff --git a/sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-skip-postinstall.patch b/sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-skip-postinstall.patch new file mode 100644 index 000000000000..3f632d3db67c --- /dev/null +++ b/sys-boot/woeusb-ng/files/woeusb-ng-0.2.12-skip-postinstall.patch @@ -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 + } + ) diff --git a/sys-boot/woeusb-ng/metadata.xml b/sys-boot/woeusb-ng/metadata.xml new file mode 100644 index 000000000000..bbe0695f9f03 --- /dev/null +++ b/sys-boot/woeusb-ng/metadata.xml @@ -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> diff --git a/sys-boot/woeusb-ng/woeusb-ng-0.2.12.ebuild b/sys-boot/woeusb-ng/woeusb-ng-0.2.12.ebuild new file mode 100644 index 000000000000..6b4066c6c6a9 --- /dev/null +++ b/sys-boot/woeusb-ng/woeusb-ng-0.2.12.ebuild @@ -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]" +} |