mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
as per the coding style guide: https://projects.gentoo.org/qa/policy-guide/ebuild-format.html#pg0101 if it previously used [ ${PV} ... ] it uses [[ ${PV} ... ]] now if it previously used [[ ${PV} = b ]] or [ ${PV} = b ], it uses [[ ${PV} == b ]] now the changes were generated using these two commands: ``` find -name '*.ebuild' -exec sed -i -E \ 's|([^[])\[+(\s+)(\S*\$\S*PV\S*)(\s+)(\S+)(\s+)(\S+)(\s+)\]+([^]])|\1\[\[\2\3\4\5\6\7\8\]\]\9|g' \ {} \+ find -name '*.ebuild' -exec sed -i -E \ 's|\[(\s+)(\S*\$\S*PV\S*)(\s+)==?(\s+)(\S+)(\s+)\]|\[\1\2\3==\4\5\6\]|g' \ {} \+ ``` this is aimed to be a series of commits meant to replace all instance of POSIX [ ... ] to bash's [[ ... ]], to make guru up to date with the coding style guide this process is divided up into a series of commits in order to make review and testing more easy Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org> Part-of: https://codeberg.org/gentoo/guru/pulls/6 Signed-off-by: Michał Górny <mgorny@gentoo.org>
74 lines
1.5 KiB
Bash
74 lines
1.5 KiB
Bash
# Copyright 1999-2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# Autogenerated by pycargoebuild 0.14.0
|
|
|
|
EAPI=8
|
|
|
|
inherit cargo optfeature shell-completion
|
|
|
|
DESCRIPTION="Easily and securely share files from the command line"
|
|
HOMEPAGE="https://timvisee.com/projects/ffsend/"
|
|
|
|
if [[ "${PV}" == "9999" ]]; then
|
|
inherit git-r3
|
|
EGIT_REPO_URI="https://github.com/timvisee/ffsend.git"
|
|
else
|
|
SRC_URI="
|
|
https://github.com/timvisee/ffsend/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
|
https://github.com/beatussum/gentoo-tarballs/releases/download/latest/${P}-crates.tar.xz
|
|
"
|
|
|
|
KEYWORDS="~amd64"
|
|
fi
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
# Dependent crate licenses
|
|
LICENSE+=" Apache-2.0 BSD-2 BSD ISC MIT MPL-2.0 Unicode-DFS-2016"
|
|
|
|
SLOT="0"
|
|
|
|
DOCS=(
|
|
res/
|
|
CONTRIBUTING.md
|
|
README.md
|
|
SECURITY.md
|
|
)
|
|
|
|
src_unpack() {
|
|
patch_cargo_file()
|
|
{
|
|
pushd "${S}" &>> /dev/null || die
|
|
eapply "${FILESDIR}/${PN}-bump-traitobject.patch"
|
|
popd &>> /dev/null || die
|
|
}
|
|
|
|
if [[ "${PV}" == "9999" ]]; then
|
|
git-r3_src_unpack
|
|
patch_cargo_file
|
|
cargo_live_src_unpack
|
|
else
|
|
cargo_src_unpack
|
|
patch_cargo_file
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
einstalldocs
|
|
cargo_src_install
|
|
|
|
newbashcomp contrib/completions/ffsend.bash ffsend
|
|
dofishcomp contrib/completions/ffsend.fish
|
|
dozshcomp contrib/completions/_ffsend
|
|
|
|
exeinto /usr/share/nautilus-script
|
|
doexe contrib/util/nautilus/firefox-send
|
|
}
|
|
|
|
pkg_postinst() {
|
|
optfeature "the Nautilus script support" \
|
|
"gnome-base/nautilus" \
|
|
"gnome-extra/zenity"
|
|
}
|