Skip to content
Snippets Groups Projects
Verified Commit b024d9bf authored by Jeremy Soller's avatar Jeremy Soller
Browse files

WIP: add pkgar support

parent e1654fdc
No related branches found
No related tags found
No related merge requests found
......@@ -60,3 +60,7 @@
path = patches/jobserver-rs
url = https://gitlab.redox-os.org/redox-os/jobserver-rs.git
branch = redox
[submodule "pkgar"]
path = pkgar
url = https://gitlab.redox-os.org/redox-os/pkgar.git
branch = master
......@@ -15,15 +15,17 @@ export PREPARE_COPY=1
if [ ! "$(uname -s)" = "Redox" ]
then
function docgen {
CC=cc cargo run --release --manifest-path "$ROOT/docgen/Cargo.toml" --bin docgen -- "$@"
}
function pkg {
CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- $@
CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- "$@"
}
function docgen {
CC=cc cargo run --release --manifest-path "$ROOT/docgen/Cargo.toml" --bin docgen -- $@
function pkgar {
CC=cc cargo run --release --manifest-path "$ROOT/pkgar/Cargo.toml" --bin pkgar -- "$@"
}
fi
function usage {
......@@ -423,6 +425,33 @@ function op {
unstage)
rm -rfv stage
;;
pkg)
if [ ! -e "${ROOT}/build/secret.key" ]
then
mkdir -p "${ROOT}/build"
pkgar \
keygen \
--secret "${ROOT}/build/secret.key" \
--public "${ROOT}/build/public.key"
fi
pkgar \
create \
--secret "${ROOT}/build/secret.key" \
--file stage.pkg \
stage
if command -v pigz > /dev/null
then
pigz --force stage.pkg
else
echo "Install pigz for increased performance"
gzip --force recipes/jeremy/stage.pkg
fi
;;
unpkg)
rm -fv stage.pkg stage.pkg.gz
;;
tar)
echo "name = \"$1\"" > "stage.toml"
echo "version = \"$(op $1 version)\"" >> "stage.toml"
......
Subproject commit 6855ee50a3beda271975aebce50196ebdb75d442
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment