diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..25a5efc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ext/rustup"] + path = ext/rustup + url = https://salsa.debian.org/rust-team/rustup.git diff --git a/ext/rustup b/ext/rustup new file mode 160000 index 0000000..c31b781 --- /dev/null +++ b/ext/rustup @@ -0,0 +1 @@ +Subproject commit c31b781f1a50f4aa20c2d1b8f9aa661f1fcd4c40 diff --git a/src/rustup/debian/changelog b/src/rustup/debian/changelog new file mode 100644 index 0000000..7277061 --- /dev/null +++ b/src/rustup/debian/changelog @@ -0,0 +1,5 @@ +rust-rustup (1.21.1-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium + + * Package rustup 1.21.1 from local source using debcargo 2.4.3 + + -- Ximin Luo Mon, 04 May 2020 18:00:06 +0100 diff --git a/src/rustup/debian/copyright b/src/rustup/debian/copyright new file mode 100644 index 0000000..f69bb02 --- /dev/null +++ b/src/rustup/debian/copyright @@ -0,0 +1 @@ +FIXME fill me in using ./copyright.debcargo.hint as a guide diff --git a/src/rustup/debian/copyright.debcargo.hint b/src/rustup/debian/copyright.debcargo.hint new file mode 100644 index 0000000..1559f8a --- /dev/null +++ b/src/rustup/debian/copyright.debcargo.hint @@ -0,0 +1,60 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: rustup +Upstream-Contact: + Daniel Silverstone + Diggory Blake +Source: https://github.com/rust-lang/rustup.rs + +Files: * +Copyright: + FIXME (overlay) UNKNOWN-YEARS Daniel Silverstone + FIXME (overlay) UNKNOWN-YEARS Diggory Blake +License: MIT or Apache-2.0 +Comment: + FIXME (overlay): Since upstream copyright years are not available in + Cargo.toml, they were extracted from the upstream Git repository. This may not + be correct information so you should review and fix this before uploading to + the archive. + +Files: ./LICENSE-MIT +Copyright: 2016 The Rust Project Developers +License: UNKNOWN-LICENSE; FIXME (overlay) +Comment: + FIXME (overlay): These notices are extracted from files. Please review them + before uploading to the archive. + +Files: ./www/fonts/OFL.txt +Copyright: 2011, Raph Levien (firstname.lastname@gmail.com), Copyright (c) 2012, Cyreal (cyreal.org) +License: UNKNOWN-LICENSE; FIXME (overlay) +Comment: + FIXME (overlay): These notices are extracted from files. Please review them + before uploading to the archive. + +Files: debian/* +Copyright: + 2020 Debian Rust Maintainers + 2020 Ximin Luo +License: MIT or Apache-2.0 + +License: Apache-2.0 + Debian systems provide the Apache 2.0 license in + /usr/share/common-licenses/Apache-2.0 + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/src/rustup/debian/debcargo.toml b/src/rustup/debian/debcargo.toml new file mode 100644 index 0000000..451cef3 --- /dev/null +++ b/src/rustup/debian/debcargo.toml @@ -0,0 +1,3 @@ +overlay = "." +uploaders = ["Ximin Luo "] +crate_src_path = "../../../ext/rustup" diff --git a/vars.sh.frag b/vars.sh.frag index 6ab3ead..fae9302 100644 --- a/vars.sh.frag +++ b/vars.sh.frag @@ -55,8 +55,15 @@ CRATE="$1" VER="$2" -PKGNAME=${PKGNAME:-$($DEBCARGO deb-src-name "$CRATE" $VER || abort 1 "couldn't find crate $CRATE")} -PKGBASE=${PKGBASE:-$($DEBCARGO deb-src-name "$CRATE" || abort 1 "couldn't find crate $CRATE")} +if [ -n "$CRATE" -a -z "$VER" ] && grep -q crate_src_path "src/$CRATE/debian/debcargo.toml"; then + # special hack for crate_src_path, could be cleaner... + PKGNAME="$CRATE" + PKGBASE="$CRATE" +else + PKGNAME=${PKGNAME:-$($DEBCARGO deb-src-name "$CRATE" $VER || abort 1 "couldn't find crate $CRATE")} + PKGBASE=${PKGBASE:-$($DEBCARGO deb-src-name "$CRATE" || abort 1 "couldn't find crate $CRATE")} +fi + PKGDIR_REL="src/$PKGNAME" PKGDIR="$PWD/$PKGDIR_REL" BUILDDIR="$PWD/build/$PKGNAME"