summaryrefslogtreecommitdiff
blob: 203e7809a3d40193935b375116562fdab0379082 (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
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

DESCRIPTION="eselect module for rust"
HOMEPAGE="https://github.com/jauhien/eselect-rust"
SRC_URI="https://github.com/jauhien/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~ppc64 x86"

RDEPEND="app-admin/eselect"

pkg_preinst() {
	if has_version 'app-eselect/eselect-rust' ; then
		eselect rust unset
	fi
}

pkg_postinst() {
	if has_version 'dev-lang/rust' || has_version 'dev-lang/rust-bin' ; then
		eselect rust update --if-unset
	fi
}

pkg_prerm() {
	eselect rust unset
}