makedeb


rustc 1.80.0-1


The Rust programming language toolchain

Click here to go back to the commit logs for rustc.

Commit:


Hash: a6cd5782c14e7929f6ac23859fa8907c5091c7b5

Message: Create meta packages for 'rustc' toolsuite Having just 'provides' and 'conflicts' entries doesn't appear to be covering all use cases, builds in the Prebuilt-MPR show that 'apt-get satisfy cargo' won't install our rustc package, but will instead prefer the system's native package. This solves this by creating packages for everything that Debian has Rust packages for, and just requiring our 'rustc' package in order for it to be installed.

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 0e3bf3b..6a726fb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,20 @@
 generated-by = makedeb
 pkgname = rustc
+pkgname = cargo
+pkgname = libstd-rust-dev
+pkgname = rust-all
+pkgname = rust-clippy
+pkgname = rust-doc
+pkgname = rust-gdb
+pkgname = rust-lldb
+pkgname = rust-src
+pkgname = rustfmt
 pkgbase = rustc
 pkgdesc = The Rust programming language toolchain
-pkgrel = 1
+pkgrel = 2
 pkgver = 1.61.0
 url = https://www.rust-lang.org
 arch = any
-conflicts = cargo
-conflicts = libstd-rust-dev
-conflicts = rust-all
-conflicts = rust-clippy
-conflicts = rust-doc
-conflicts = rust-gdb
-conflicts = rust-lldb
-conflicts = rust-src
-conflicts = rustfmt
 makedepends = g++>=5.1
 makedepends = python3
 makedepends = make>=3.81
@@ -26,15 +26,6 @@ makedepends = libssl-dev
 makedepends = pkg-config
 options = !strip
 options = !lto
-provides = cargo
-provides = libstd-rust-dev=1.61.0
-provides = rust-all=1.61.0
-provides = rust-clippy=1.61.0
-provides = rust-doc=1.61.0
-provides = rust-gdb=1.61.0
-provides = rust-lldb=1.61.0
-provides = rust-src=1.61.0
-provides = rustfmt=1.61.0
 source = https://static.rust-lang.org/dist/rustc-1.61.0-src.tar.gz
 source = config.toml
 sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index c6d0eb3..ccd8925 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,19 @@
 # Maintainer: Hunter Wittenborn <hunter@hunterwittenborn.com>
-pkgname=rustc
+pkgbase=rustc
+pkgname=(
+    'rustc'
+    'cargo'
+    'libstd-rust-dev'
+    'rust-all'
+    'rust-clippy'
+    'rust-doc'
+    'rust-gdb'
+    'rust-lldb'
+    'rust-src'
+    'rustfmt'
+)
 pkgver=1.61.0
-pkgrel=1
+pkgrel=2
 pkgdesc='The Rust programming language toolchain'
 arch=('any')
 makedepends=(
@@ -15,34 +27,6 @@ makedepends=(
     'libssl-dev'
     'pkg-config'
 )
-# Debian has all the packages for Rust packaged as separate packages. That's
-# not how Rust itself distributes everything though, and quite frankly I
-# prefer how Rust does it too, so we're sticking with that.
-#
-# Likewise, we have to make sure this package properly replaces all of
-# the needed packages.
-conflicts=(
-    'cargo'
-    'libstd-rust-dev'
-    'rust-all'
-    'rust-clippy'
-    'rust-doc'
-    'rust-gdb'
-    'rust-lldb'
-    'rust-src'
-    'rustfmt'
-)
-provides=(
-    'cargo'
-    "libstd-rust-dev=${pkgver}"
-    "rust-all=${pkgver}"
-    "rust-clippy=${pkgver}"
-    "rust-doc=${pkgver}"
-    "rust-gdb=${pkgver}"
-    "rust-lldb=${pkgver}"
-    "rust-src=${pkgver}"
-    "rustfmt=${pkgver}"
-)
 url='https://www.rust-lang.org'
 options=('!strip' '!lto')
 
@@ -60,9 +44,54 @@ build() {
     python3 x.py --config "${srcdir}/config.toml" build -j "$(nproc)"
 }
 
-package() {
+package_rustc() {
     cd "rustc-${pkgver}-src/"
     DESTDIR="${pkgdir}" python3 x.py --config "${srcdir}/config.toml" install -j "$(nproc)"
 }
 
+package_cargo() {
+    pkgdesc='Transitional package - cargo -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_libstd-rust-dev() {
+    pkgdesc='Transitional package - libstd-rust-dev -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rust-all() {
+    pkgdesc='Transitional package - rust-all -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rust-clippy() {
+    pkgdesc='Transitional package - rust-clippy -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rust-doc() {
+    pkgdesc='Transitional package - rust-doc -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rust-gdb() {
+    pkgdesc='Transitional package - rust-gdb -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rust-lldb() {
+    pkgdesc='Transitional package - rust-lldb -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rust-src() {
+    pkgdesc='Transitional package - rust-src -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
+package_rustfmt() {
+    pkgdesc='Transitional package - rustfmt -> rustc'
+    depends=("rustc=${pkgver}-${pkgrel}")
+}
+
 # vim: set sw=4 expandtab: