template flavor support (#828)

Set TEMPLATE_FLAVOR variable to select template to build. That type will
be appended to template name.
Actual configuration can vary on template distribution, but generally
config files with suffix "_${TEMPLATE_FLAVOR}" will be used.
This commit is contained in:
Marek Marczykowski-Górecki 2014-05-13 04:40:09 +02:00
parent 26663e2a58
commit a77a635016
3 changed files with 17 additions and 5 deletions

View File

@ -4,6 +4,9 @@ endif
#TODO: build template name somehow smarter
TEMPLATE_NAME := $${DIST/fc/fedora-}-x64
ifdef TEMPLATE_FLAVOR
TEMPLATE_NAME := $(TEMPLATE_NAME)-$(TEMPLATE_FLAVOR)
endif
VERSION := $(shell cat version)
TIMESTAMP := $(shell date -u +%Y%m%d%H%M)

View File

@ -67,7 +67,9 @@ echo "--> Creating the Apps Menu templates..."
echo "--> Choosing appmenus whitelists..."
rm -f appmenus
if [ -d "appmenus_$DIST" ]; then
if [ -d "appmenus_${DIST}_${TEMPLATE_FLAVOR}" ]; then
ln -s "appmenus_${DIST}_${TEMPLATE_FLAVOR}" appmenus
elif [ -d "appmenus_$DIST" ]; then
ln -s "appmenus_$DIST" appmenus
else
ln -s "appmenus_generic" appmenus

View File

@ -1,12 +1,19 @@
#!/bin/sh
echo "--> Preparing environment..."
mount -t proc proc mnt/proc
if [ -r "$SCRIPTSDIR/packages_${DIST}.list" ]; then
if [ -n "${TEMPLATE_FLAVOR}" ]; then
PKGLISTFILE="$SCRIPTSDIR/packages_${DIST}_${TEMPLATE_FLAVOR}.list"
if ! [ -r "${PKGLISTFILE}" ]; then
echo "ERROR: ${PKGLISTFILE} does not exists!"
exit 1
fi
elif [ -r "$SCRIPTSDIR/packages_${DIST}.list" ]; then
PKGLISTFILE="$SCRIPTSDIR/packages_${DIST}.list"
else
PKGLISTFILE="$SCRIPTSDIR/packages.list"
fi
echo "--> Preparing environment..."
mount -t proc proc mnt/proc
export PKGGROUPS=$(cat $PKGLISTFILE)
export YUM0=$PWD/yum_repo_qubes