Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 630

kvm-83-164.el5_5.30.src.rpm

#!/bin/bash

set -e

name="$1"
if [ -z "$name" ];then
	echo "Usage: $0 kvm-<version>" >&2
	exit 1
fi
tmp="$(mktemp -d)"
tar -C "$tmp" -zxf "$name.tar.gz"
pushd "$tmp/$name"

# 1) Remove crypto code
rm -f qemu/aes.c qemu/aes.h qemu/d3des.c qemu/d3des.h qemu/tests/sha1.c

# 2) Remove pre-built binaries
rm -rf qemu/pc-bios/*

popd

tar -C "$tmp" -zcf "${name}-stripped.tar.gz" "$name"