2010-04-05 22:25:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
NAME=$1
|
|
|
|
|
2015-08-04 02:00:43 +00:00
|
|
|
set -e
|
|
|
|
|
2010-04-05 22:25:37 +00:00
|
|
|
if [ x$NAME = x ] ; then
|
2015-08-04 02:51:47 +00:00
|
|
|
echo "usage $0 <template_name>"
|
|
|
|
exit 1
|
2010-04-05 22:25:37 +00:00
|
|
|
fi
|
|
|
|
|
2015-03-17 14:08:25 +00:00
|
|
|
# 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
|
2015-04-10 15:51:46 +00:00
|
|
|
grep '^[a-zA-Z0-9.()_-]\+.desktop$' $srcdir/$f > appmenus/$f
|
2015-03-17 14:08:25 +00:00
|
|
|
done
|
2015-08-04 02:00:43 +00:00
|
|
|
trap "rm -rf appmenus-$$ appmenus" EXIT
|
2015-03-17 14:08:25 +00:00
|
|
|
fi
|
2013-02-16 15:00:50 +00:00
|
|
|
|
2012-01-27 09:08:34 +00:00
|
|
|
rpmbuild --target noarch \
|
2011-11-09 15:28:37 +00:00
|
|
|
--define "template_name $NAME" \
|
2013-01-25 08:03:51 +00:00
|
|
|
--define "DIST $DIST" \
|
2011-11-09 15:28:37 +00:00
|
|
|
--define "_topdir $PWD/rpmbuild" \
|
2011-11-09 15:43:21 +00:00
|
|
|
--define "_tmppath $PWD/rpmbuild/tmp" \
|
2011-11-09 15:28:37 +00:00
|
|
|
-bb templates.spec
|
2018-05-24 02:03:47 +00:00
|
|
|
|
|
|
|
if [ "0$DISCARD_PREPARED_IMAGE" -eq "1" ]; then
|
|
|
|
rm -rf "qubeized_images/$NAME"
|
|
|
|
fi
|