2008-03-11 14:02:41 +01:00
|
|
|
# this makefile will build rpm
|
|
|
|
|
|
|
|
DIR=$(shell pwd)
|
|
|
|
|
2008-03-17 11:35:12 +01:00
|
|
|
ifndef UTT_DIST_DIR
|
|
|
|
UTT_DIST_DIR=${DIR}
|
2008-03-11 14:02:41 +01:00
|
|
|
endif
|
|
|
|
|
2008-03-17 11:35:12 +01:00
|
|
|
_RPM_FROOT=${DIR}/rmp_root
|
|
|
|
_UTT_ROOT=${_RPM_FROOT}/usr/local
|
2008-03-11 14:02:41 +01:00
|
|
|
# default task
|
|
|
|
.PHONY: rpm
|
|
|
|
rpm:
|
2008-03-17 11:35:12 +01:00
|
|
|
if test -d ${_RPM_FROOT}; then rm -fr ${_RMP_FROOT}; fi
|
|
|
|
mkdir -p ${_UTT_ROOT}
|
|
|
|
cp -rf ${UTT_DIST_DIR}/* ${_UTT_ROOT}/
|
2008-05-09 08:49:43 +02:00
|
|
|
mkdir -p ${_UTT_ROOT}/cnf
|
|
|
|
mv ${_UTT_ROOT}/etc/utt/*.conf ${_UTT_ROOT}/cnf/
|
|
|
|
${DIR}/../common/prepare_conf.sh ${_UTT_ROOT}/cnf ${_UTT_ROOT}/etc/utt \\\/usr\\\/local
|
|
|
|
rm -rf ${_UTT_ROOT}/cnf
|
|
|
|
|
2008-03-17 11:35:12 +01:00
|
|
|
cp ../files/* ${_UTT_ROOT}/
|
|
|
|
cd ${_RPM_FROOT}; rpmbuild -bb ${DIR}/utt.spec
|
|
|
|
|
|
|
|
rm -rf ${_RPM_FROOT}
|
2008-03-11 14:02:41 +01:00
|
|
|
|