Index: dist/spec/Makefile
===================================================================
--- dist/spec/Makefile	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
+++ dist/spec/Makefile	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
@@ -0,0 +1,26 @@
+# this makefile will build rpm
+
+DIR=$(shell pwd)
+
+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:
+	if test -d ${_RPM_FROOT}; then rm -fr ${_RMP_FROOT}; fi
+	mkdir -p ${_UTT_ROOT}
+	cp -rf ${UTT_DIST_DIR}/* ${_UTT_ROOT}/
+	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
+
+	cp ../files/* ${_UTT_ROOT}/
+	cd ${_RPM_FROOT}; rpmbuild -bb ${DIR}/utt.spec
+	
+	rm -rf ${_RPM_FROOT}
+	
Index: dist/spec/README
===================================================================
--- dist/spec/README	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
+++ dist/spec/README	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
@@ -0,0 +1,16 @@
+This directory contains files necessary to produce rpm package.
+
+First, you must have variable UTT_DIST_DIR defined properly.
+This variable should be defined by main Makefile.
+
+To create rpm file, just write:
+make
+
+The created package should appears in default RPM directory.
+(in my computer it is /usr/src/redhat/RPMS/$arch/ directory)
+
+To determine the rpm output directory, execute:
+rpm --showrc | grep _rmpdir
+
+You need access privilage to this directory to create rmp.
+
Index: dist/spec/utt.spec
===================================================================
--- dist/spec/utt.spec	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
+++ dist/spec/utt.spec	(revision 5f4d9c3b32eea7b6643a751aa75bdb05b7d41576)
@@ -0,0 +1,81 @@
+#
+# Default RPM header.
+#
+# START_RPM_STD_HEADER:
+
+
+#
+# RPM properties
+#
+%define _this_product     UAM Text Tools
+%define _this_summary	  Some tools for text processing
+%define _this_name        utt
+%define _this_version	  %(cat ../../common/version.def)
+%define _this_release	  %(cat ../../common/release.def)
+%define _this_copyright   Adam Mickiewicz University, Poland
+
+#
+# Default RPM header.
+#
+# END_RPM_STD_HEADER:
+# --------------------------------------------------------------------
+
+Summary:     %_this_summary
+Name:        %_this_name
+Version:     %_this_version
+Release:     %_this_release
+#Copyright:   %_this_copyright
+License:	GPL
+Group:       Development/Tools
+URL:         http://utt.amu.edu.pl
+Vendor:      Adam Mickiewicz University
+BuildRoot:	%(pwd)
+#BuildArch: 	 i586
+# requirements for utt application
+#AutoReq: no
+#AutoReqProv: no
+
+#Requires: 	 glibc >= 2.1.3
+#Requires: 	 libgcc1 >= 3.0
+#Requires: 	 libgcc >= 3.0
+#Requires:    libstdc++6 >= 3.4.1
+#Requires:    libstdc++ >= 3.4.1
+
+%description
+%(cat ../../common/description.def)
+
+%description -l pl
+%(cat ../../common/description.pl.def)
+
+
+# -------------------------------------------------------------
+# preparing sources for compilation
+%prep
+
+# source compilation
+%build
+
+# rpm building
+%install
+
+# cleaning after rpm build
+%clean
+
+# -------------------------------------------------------------
+#before installation
+%pre
+
+#after installation
+%post
+# we need to create utt.conf file
+
+#before uninstallation
+%preun
+
+#after uninstallation
+%postun
+
+# -------------------------------------------------------------
+%files
+%defattr(-,root,root)
+/*
