Index: app/dist/spec/Makefile
===================================================================
--- app/dist/spec/Makefile	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
+++ app/dist/spec/Makefile	(revision b2647ded51d1c3f8e4a856396ea16c7afd54b9e6)
@@ -3,13 +3,21 @@
 DIR=$(shell pwd)
 
-ifndef _UTT_DIST_DIR
-	_UTT_DIST_DIR=${DIR}
+ifndef UTT_DIST_DIR
+	UTT_DIST_DIR=${DIR}
 endif
 
-
+_RPM_FROOT=${DIR}/rmp_root
+_UTT_ROOT=${_RPM_FROOT}/usr/local
 # default task
 .PHONY: rpm
 rpm:
-	cd ${_UTT_DIST_DIR}; rpmbuild -bb ${DIR}/utt.spec
+	if test -d ${_RPM_FROOT}; then rm -fr ${_RMP_FROOT}; fi
+	mkdir -p ${_UTT_ROOT}
+	cp -rf ${UTT_DIST_DIR}/* ${_UTT_ROOT}/
+	cp ../common/utt_make_config.pl ${_UTT_ROOT}/bin/
+	chmod 755 ${_UTT_ROOT}/bin/utt_make_config.pl
+	cp ../files/* ${_UTT_ROOT}/
+	cd ${_RPM_FROOT}; rpmbuild -bb ${DIR}/utt.spec
 	
-
+	rm -rf ${_RPM_FROOT}
+	
