qubes-linux-template-builder/build_template_rpm

29 lines
789 B
Plaintext
Raw Normal View History

#!/bin/sh
NAME=$1
set -e
if [ x$NAME = x ] ; then
2015-08-04 02:51:47 +00:00
echo "usage $0 <template_name>"
exit 1
fi
# handle appmenus whitelists from DispVM build
if [ -d qubeized_images/$NAME/untrusted_appmenus ]; then
srcdir="qubeized_images/$NAME/untrusted_appmenus"
mkdir -p appmenus-$$
rm -f appmenus
ln -s appmenus-$$ appmenus
for f in whitelisted-appmenus.list vm-whitelisted-appmenus.list netvm-whitelisted-appmenus.list; do
grep '^[a-zA-Z0-9.()_-]\+.desktop$' $srcdir/$f > appmenus/$f
done
trap "rm -rf appmenus-$$ appmenus" EXIT
fi
rpmbuild --target noarch \
--define "template_name $NAME" \
--define "DIST $DIST" \
--define "_topdir $PWD/rpmbuild" \
2011-11-09 15:43:21 +00:00
--define "_tmppath $PWD/rpmbuild/tmp" \
-bb templates.spec