From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/etc/installer/pkg/Distribution.xml | 88 ++++++++++++++++++++++++++++++++++ src/etc/installer/pkg/postinstall | 26 ++++++++++ 2 files changed, 114 insertions(+) create mode 100644 src/etc/installer/pkg/Distribution.xml create mode 100755 src/etc/installer/pkg/postinstall (limited to 'src/etc/installer/pkg') diff --git a/src/etc/installer/pkg/Distribution.xml b/src/etc/installer/pkg/Distribution.xml new file mode 100644 index 000000000..077ee1751 --- /dev/null +++ b/src/etc/installer/pkg/Distribution.xml @@ -0,0 +1,88 @@ + + + The Rust Compiler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rustc.pkg + cargo.pkg + rust-docs.pkg + rust-std.pkg + + rls.pkg + + rust-analysis.pkg + uninstall.pkg + + diff --git a/src/etc/installer/pkg/postinstall b/src/etc/installer/pkg/postinstall new file mode 100755 index 000000000..fb035a486 --- /dev/null +++ b/src/etc/installer/pkg/postinstall @@ -0,0 +1,26 @@ +#!/bin/sh + +source_dir="$(dirname "$0")" +dest_dir="$2" +package_id="$INSTALL_PKG_SESSION_ID" + +if [ -z "$source_dir" ]; then + exit 1 +fi +if [ -z "$dest_dir" ]; then + exit 1 +fi +if [ -z "$package_id" ]; then + exit 1 +fi + +if [ "$package_id" = "org.rust-lang.uninstall" ]; then + if [ ! -e "$dest_dir/lib/rustlib/uninstall.sh" ]; then + exit 1 + fi + sh "$dest_dir/lib/rustlib/uninstall.sh" +else + sh "$source_dir/install.sh" --prefix="$dest_dir" +fi + +exit 0 -- cgit v1.2.3