Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-packages/blob/main/debian/build-deb.sh # omega-packages aien-dev/omega-packages Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-packages / debian / build-deb.sh` 25 lines ยท 1247 bytes Raw Blame History 1 #!/bin/sh 2 # build-deb.sh OMC OUTDIR -- package an already hash-checked omc (scripts/omc-from-seed.sh) as 3 # OUTDIR/omc_-1_arm64.deb. Binary package only, assembled with dpkg-deb; the build itself 4 # is the seed chain, which needs no compiler, so there is no debhelper source package. 5 set -eu 6 here=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) 7 . "$here/pins.env" 8 [ $# -eq 2 ] || { echo "usage: build-deb.sh OMC OUTDIR" >&2; exit 2; } 9 omc=$1 out=$2 10 got=$(sha256sum "$omc" | cut -d' ' -f1) 11 [ "$got" = "$OMC_SHA256" ] || { echo "FAIL omc sha256 $got, pinned $OMC_SHA256" >&2; exit 1; } 12 ver=$OMC_VERSION-1 13 mkdir -p "$out" 14 root=$(mktemp -d) 15 trap 'rm -rf "$root"' EXIT 16 install -Dm0755 "$omc" "$root/usr/bin/omc" 17 install -Dm0644 "$here/LICENSE" "$root/usr/share/doc/omc/copyright" 18 install -Dm0644 "$here/examples/hello.om" "$root/usr/share/doc/omc/examples/hello.om" 19 mkdir -p "$root/DEBIAN" 20 size=$(du -sk "$root/usr" | cut -f1) 21 sed -e "s/@VERSION@/$ver/" -e "s/@SIZE@/$size/" -e "s/@COMMIT@/$OMEGA_MV_COMMIT/" \ 22 -e "s/@OMC_SHA256@/$OMC_SHA256/" "$here/debian/control.in" > "$root/DEBIAN/control" 23 deb=$out/omc_${ver}_arm64.deb 24 SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-0} dpkg-deb --root-owner-group -Zxz --build "$root" "$deb" >/dev/null 25 echo "$deb"