From 92f9e16154e29d9a90917ebfc13ad0fd52f02ffe Mon Sep 17 00:00:00 2001 From: Denis Reva Date: Sun, 22 Sep 2024 14:40:55 +0500 Subject: [PATCH] sys-fs/dwarfs-bin: add 0.10.1 Signed-off-by: Denis Reva --- sys-fs/dwarfs-bin/Manifest | 2 + sys-fs/dwarfs-bin/dwarfs-bin-0.10.1.ebuild | 67 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 sys-fs/dwarfs-bin/dwarfs-bin-0.10.1.ebuild diff --git a/sys-fs/dwarfs-bin/Manifest b/sys-fs/dwarfs-bin/Manifest index b16395d5f4..871b24ab24 100644 --- a/sys-fs/dwarfs-bin/Manifest +++ b/sys-fs/dwarfs-bin/Manifest @@ -1,2 +1,4 @@ +DIST dwarfs-bin-0.10.1-amd64.tar.xz 7342460 BLAKE2B c9e4b053d8f6082a31007d394333693e4ba1c999bd797affa5f1bdcc5e28c834db664952c8ec0c29a94ed98b111df369ddd321f434beecd486d25c9580d2b497 SHA512 850bf3f1747e0bcb9fe458a691036bf3eca4ed6bd44c00033e34ae25f07a38c35905947fc407b65caa41ebe2662ec1474368cfe338df234447bafab50d54a850 +DIST dwarfs-bin-0.10.1-arm64.tar.gz 6427628 BLAKE2B 656bbf5cc9b0faa82560bc6589d4d7ea4837966abfd1fa46c5f07470e87769ed4864d0895ef8d1cf6d800cee8e6d1ac70fd704f0bca516ffaa9e29202889ec7a SHA512 15de8bd5f6ee073f4a9d540929ab210fc9faf163a5dc5271abbaac67c81b402a0b11748fc0c80c65a9804744671eb4498f03634733ba1d15c1d5133b4150e33b DIST dwarfs-bin-0.9.10-amd64.tar.xz 8076224 BLAKE2B c2ed06683c5bb1989a6c3d9381514c750274cae9ba9fed7eedb96fd6a6202f09e14df1a45362a570b5f112e15e472ddf7e9bc368ad70a848aecf3b09bc94402a SHA512 9633f59fa1afdc9ebe8260ce6d29b78fbb6b2c5905edf8884b2e6b608c1c04fdcb1b464d4842e0e75eb5e16d766bf8aaf6f890b7aa1fae8cb7127309e7f2c49a DIST dwarfs-bin-0.9.10-arm64.tar.gz 7044940 BLAKE2B a893efa702423a5cfbe87117fe0674e8cba33bdaef95535ef6779e096d58c5002cd672c6e6ae378ae9f5641a19eb4b5e601e929a1bd1b4416208910ef80507ed SHA512 e32e9693a825335b311e454c5556decf8ccd74ce872cd4d61f2243e1fb000950436bb1b7336bf4341cd26820b9ffe6d383b2d2425329ba3ceac78fb415a1edf2 diff --git a/sys-fs/dwarfs-bin/dwarfs-bin-0.10.1.ebuild b/sys-fs/dwarfs-bin/dwarfs-bin-0.10.1.ebuild new file mode 100644 index 0000000000..8b117c98fb --- /dev/null +++ b/sys-fs/dwarfs-bin/dwarfs-bin-0.10.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Static version of a fast very high compression read-only FUSE file system" +HOMEPAGE="https://github.com/mhx/dwarfs" +SRC_URI=" + amd64? ( https://github.com/mhx/dwarfs/releases/download/v${PV}/dwarfs-${PV}-Linux-x86_64-clang.tar.xz -> ${P}-amd64.tar.xz ) + arm64? ( https://github.com/mhx/dwarfs/releases/download/v${PV}/dwarfs-${PV}-Linux-aarch64-clang.tar.xz -> ${P}-arm64.tar.gz ) +" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm64" + +RDEPEND=" + ${PYTHON_DEPS} + sys-fs/fuse:3 +" +DEPEND=" + ${RDEPEND} +" +QA_PREBUILT=" + opt/dwarfs-bin/bin/* + opt/dwarfs-bin/sbin/* +" + +src_unpack() { + if use amd64; then + S="${WORKDIR}/dwarfs-${PV}-Linux-x86_64-clang" + elif use arm64; then + S="${WORKDIR}/dwarfs-${PV}-Linux-aarch64-clang" + fi + + default +} + +src_prepare() { + default + einfo "Removing legacy fuse2-related stuff..." + rm sbin/dwarfs2 sbin/mount.dwarfs2 || die + einfo "Done." +} + +src_install(){ + mkdir -p "${ED}/opt/${PN}" || die + mv "${S}"/* "${ED}/opt/${PN}" || die + + for file in "${ED}/opt/${PN}/bin"/*; do + dosym "../${PN}/bin/$(basename "${file}")" "/opt/bin/$(basename "${file}")" + done + for file in "${ED}/opt/${PN}/sbin"/*; do + dosym "../${PN}/sbin/$(basename "${file}")" "/opt/bin/$(basename "${file}")" + done + + newenvd - "90${P}" <<-_EOF_ + MANPATH="${EPREFIX}/opt/${PN}/share/man" + _EOF_ +} + +pkg_postinst(){ + elog "You may find more information in the" + elog "${HOMEPAGE}" + elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md" + elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md" +}