From a200aa72750c85019e0228005086668894dee10b Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Wed, 18 Jan 2023 16:56:41 -0500 Subject: net-im/conduit: update unpack, add install Signed-off-by: Julien Roy --- net-im/conduit/conduit-0.5.0.ebuild | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'net-im/conduit/conduit-0.5.0.ebuild') diff --git a/net-im/conduit/conduit-0.5.0.ebuild b/net-im/conduit/conduit-0.5.0.ebuild index d33bcac..7086084 100644 --- a/net-im/conduit/conduit-0.5.0.ebuild +++ b/net-im/conduit/conduit-0.5.0.ebuild @@ -705,15 +705,35 @@ src_unpack() { mv "heed-traits" "../heed-traits-0.7.0" || die mv "heed-types" "../heed-types-0.7.2" || die rm "Cargo.toml" || die -} -src_prepare() { - # Conduit uses custom forks or specific commits of Ruma, Reqwest and Heed - # Because of this, Cargo will try to fetch from online. Since we - # unpacked them in src_unpack, we update Cargo.toml to use those instead + # We also need to update Conduit's dependencies to let Cargo know + # that they are available in the local store and don't need to be + # fetched from their git repositoes + cd "${S}" || die sed -i -e 's/^heed.*/heed = \{ version = "0.10.6", optional = true \}/' Cargo.toml || die - sed -i -e 's/^reqwest.*/reqwest = { version = "0.11.9", features = \["rustls-tls-native-roots", "socks"\] }/' Cargo.toml || die - sed -i -e 's/^ruma.*/ruma ={ version = "0.7.4", features = \["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-msc2448", "unstable-exhaustive-types", "ring-compat", "unstable-unspecified" \] }/' Cargo.toml || die + REQWESTFEATURES="features = " + REQWESTFEATURES+="\[\"rustls-tls-native-roots\", \"socks\"\]" + sed -i -e "s/^reqwest.*/reqwest = { version = \"0.11.9\", ${REQWESTFEATURES} }/" Cargo.toml || die + RUMAFEATURES="features = \[" + RUMAFEATURES+="\"compat\", " + RUMAFEATURES+="\"rand\", " + RUMAFEATURES+="\"appservice-api-c\", " + RUMAFEATURES+="\"client-api\", " + RUMAFEATURES+="\"federation-api\", " + RUMAFEATURES+="\"push-gateway-api-c\", " + RUMAFEATURES+="\"state-res\", " + RUMAFEATURES+="\"unstable-msc2448\", " + RUMAFEATURES+="\"unstable-exhaustive-types\", " + RUMAFEATURES+="\"ring-compat\", " + RUMAFEATURES+="\"unstable-unspecified\"" + RUMAFEATURES+="\]" + sed -i -e "s/^ruma.*/ruma = { version = \"0.7.4\", ${RUMAFEATURES} }/" Cargo.toml || die +} + +src_install() { + cargo_src_install - default + dodir "/etc/conduit" + insinto "/etc/conduit" + doins "${FILESDIR}/conduit.toml" } -- cgit v1.2.3