Avindra Goolcharan
768de23fb4
OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/rusty_v8?expand=0&rev=1
33 lines
578 B
Bash
33 lines
578 B
Bash
#!/bin/sh
|
|
set -euo pipefail
|
|
|
|
# packaging helper to workaround:
|
|
# https://github.com/rust-lang/cargo/issues/7058
|
|
|
|
wd="$(mktemp -d /tmp/revendor.XXXXX)"
|
|
|
|
# take what we need into the build
|
|
cp vendor*xz $wd
|
|
|
|
cd $wd
|
|
|
|
echo -n "Extracting vendor..."
|
|
tar xf vendor*xz
|
|
echo "done"
|
|
|
|
echo -n "Ejecting winapi bloat... "
|
|
rm -fr vendor/winapi*gnu*/lib/*.a
|
|
echo "done"
|
|
|
|
# remake tarball
|
|
echo -n "Compressing archive... "
|
|
tar -cf - vendor/ | xz -9 -c - > vendor-merged.tar.xz
|
|
echo "done"
|
|
|
|
cd -
|
|
|
|
echo -n "Replacing tarball... "
|
|
cp $wd/vendor-merged.tar.xz vendor.tar.xz
|
|
rm -fr $wd
|
|
echo "ok"
|