diff --git a/.gitmodules b/.gitmodules index 4157e17199a10839b8ee4f20b6c10969b19bd1e8..7b1c83abe913018442828bbb340fbf739fcb3a34 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = libc-artifacts url = https://github.com/redox-os/libc-artifacts.git branch = master +[submodule "pkgutils"] + path = pkgutils + url = https://github.com/redox-os/pkgutils.git diff --git a/cook.sh b/cook.sh index 5c0ac2914e7d63f03612d10884edef90d6c0304c..b5df2c45b64592e8224878b2b42b207e783191fa 100755 --- a/cook.sh +++ b/cook.sh @@ -195,12 +195,14 @@ function op { rm -rfv stage ;; tar) - pushd stage > /dev/null - tar cfv ../stage.tar . - popd > /dev/null + mkdir -p stage/etc/pkg.d + echo "name = \"$1\"" > "stage/etc/pkg.d/$1.toml" + echo "version = \"$(op $1 version)\"" >> "stage/etc/pkg.d/$1.toml" + echo "target = \"$TARGET\"" >> "stage/etc/pkg.d/$1.toml" + $ROOT/pkgutils/target/release/pkg create stage ;; untar) - rm -rfv stage.tar + rm -rfv stage.tar stage.sig ;; publish) mkdir -p "$REPO" diff --git a/pkgutils b/pkgutils new file mode 160000 index 0000000000000000000000000000000000000000..4cf2e9d216721282a8f2bb82c031ee90ede878f4 --- /dev/null +++ b/pkgutils @@ -0,0 +1 @@ +Subproject commit 4cf2e9d216721282a8f2bb82c031ee90ede878f4 diff --git a/setup.sh b/setup.sh index 3396cacf50a9a0b0ed0701dadf77956eff49728a..795627d99f1f45cc6a56329133dc766da5060e4e 100755 --- a/setup.sh +++ b/setup.sh @@ -4,6 +4,9 @@ set -e echo "Downloading latest libc-artifacts" git submodule update --init --remote libc-artifacts +echo "Downloading latest pkgutils" +git submodule update --init --remote pkgutils + echo "Defaulting to rust nightly" rustup override set nightly echo "Update rust nightly" @@ -21,4 +24,10 @@ then cargo install -f xargo fi +echo "Building pkgutils" +pushd pkgutils +# TODO Change pkgutils to not hard code TARGET +TARGET=x86_64-unknown-redox cargo build --release +popd + echo "cook.sh is ready to use"