forked from pool/alacritty
Avindra Goolcharan
717b0e3264
OBS-URL: https://build.opensuse.org/package/show/X11:terminals/alacritty?expand=0&rev=35
41 lines
668 B
Bash
41 lines
668 B
Bash
#!/bin/sh
|
|
set -euo pipefail
|
|
|
|
# packaging helper to workaround:
|
|
# https://github.com/rust-lang/cargo/issues/7058
|
|
|
|
wd="/tmp/revendor"
|
|
|
|
if [[ -d "$wd" ]]; then
|
|
echo -n "Removing previous ws ($wd)... "
|
|
rm -fr $wd
|
|
echo "done"
|
|
fi
|
|
|
|
mkdir -p $wd
|
|
|
|
# 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"
|