utt/app/dist/tarball/Makefile
pawelk adb4c8d65b Przygotowana dystrybujca tarball. Czesciowo przetestowane.
git-svn-id: svn://atos.wmid.amu.edu.pl/utt@45 e293616e-ec6a-49c2-aa92-f4a8b91c5d16
2008-05-08 09:48:30 +00:00

49 lines
1.1 KiB
Makefile

# This makefile allows build tarball distribution for utt.
#
# Some variables
#
DIR=$(shell pwd)
# Directory with utt binaries
ifndef UTT_DIST_DIR
UTT_DIST_DIR=${DIR}
endif
# Where put result
ifndef UTT_DIST_OUTPUT
UTT_DIST_OUTPUT=${DIR}
endif
# Common info about version and release
_UTT_VER=$(shell cat ../common/version.def)
_UTT_REL=$(shell cat ../common/release.def)
# Temp vars
_TARBALL_ROOT=$(DIR)/utt-$(_UTT_VER).$(_UTT_REL)
_TAR_FILE_NAME=utt.$(_UTT_VER)_$(_UTT_REL).tar.gz
#defualt task
.PHONY: default
default:
@echo Build directory: ${UTT_DIST_DIR}
@echo Output directory for tarball: ${UTT_DIST_OUTPUT}
mkdir -p ${_TARBALL_ROOT}
cp -fr ${UTT_DIST_DIR}/* ${_TARBALL_ROOT}
@# we add some extra files
@# config files
mkdir -p ${_TARBALL_ROOT}/cnf
mv ${_TARBALL_ROOT}/etc/utt/*.conf ${_TARBALL_ROOT}/cnf/
${DIR}/prepare_conf.sh ${_TARBALL_ROOT}/cnf ${_TARBALL_ROOT}/etc/utt
rm -rf ${_TARBALL_ROOT}/cnf
cp ./INSTALL ${_TARBALL_ROOT}/
cp ./Makefile.tarball ${_TARBALL_ROOT}/Makefile
cp ../files/* ${_TARBALL_ROOT}/
tar -czf ${UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt*
rm -rf ${_TARBALL_ROOT}