Michal Marek 381a19
#!/bin/bash
Michal Marek 381a19
Michal Marek 381a19
set -x
Michal Marek 381a19
Michal Marek e56149
# Once the brp script is reasonably widespread, we will remove the specfile
Michal Marek e56149
# hack and this script
Michal Marek e56149
if test -x /usr/lib/rpm/brp-suse.d/brp-99-compress-vmlinux; then
Michal Marek e56149
	exit 0
Michal Marek e56149
fi
Michal Marek 381a19
vmlinux=$1
Michal Marek 381a19
if test -e "$vmlinux" -a -e "$vmlinux.gz"; then
Michal Marek 381a19
	# Deliberately not using gzip -n; the vmlinux image has a predictable
Michal Marek 381a19
	# timestamp (bnc#880848#c20)
Michal Marek 381a19
	gzip -k -9 -f "$vmlinux"
Michal Marek 381a19
fi