summaryrefslogtreecommitdiff
path: root/dev-util/cargo-pgrx/cargo-pgrx-0.12.7.ebuild
blob: 229c1f4bb0a89cb63b166614ebec7f083c7df99e (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
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CRATES=""

DESCRIPTION="pgrx: A Rust framework for creating Postgres extensions"
HOMEPAGE="https://github.com/pgcentralfoundation/pgrx/"

inherit cargo

MY_PV="${PV/alpha/alpha.}"
MY_PV="${MY_PV/_/-}"
SRC_URI="
	https://github.com/pgcentralfoundation/pgrx/archive/refs/tags/v${MY_PV}.tar.gz -> pgrx-${PV}.tar.gz
"
SRC_URI+=" https://github.com/gentoo-crate-dist/${PN#cargo-}/releases/download/v${PV}/${P#cargo-}-crates.tar.xz"

S=${WORKDIR}/pgrx-${MY_PV}/cargo-pgrx
LICENSE="MIT"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB"
SLOT="0"

KEYWORDS="~amd64"

RESTRICT="test" # needs custom setup

src_unpack() {
	cargo_src_unpack
	mkdir -p "${WORKDIR}"/pgrx-${PV}/.pgrx
	export PGRX_HOME="${WORKDIR}"/pgrx-${PV}/.pgrx
}