summaryrefslogtreecommitdiff
path: root/net-misc/ffsend/ffsend-0.2.77.ebuild
blob: f77ca9011d41a267c27dfb938db8bff4af145d3d (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
70
71
72
73
# 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"
}