Index: app/dist/spec/Makefile
===================================================================
--- app/dist/spec/Makefile	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
+++ app/dist/spec/Makefile	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
@@ -0,0 +1,15 @@
+# this makefile will build rpm
+
+DIR=$(shell pwd)
+
+ifndef _UTT_DIST_DIR
+	_UTT_DIST_DIR=${DIR}
+endif
+
+
+# default task
+.PHONY: rpm
+rpm:
+	cd ${_UTT_DIST_DIR}; rpmbuild -bb ${DIR}/utt.spec
+	
+
Index: app/dist/spec/README
===================================================================
--- app/dist/spec/README	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
+++ app/dist/spec/README	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
@@ -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: app/dist/spec/utt.spec
===================================================================
--- app/dist/spec/utt.spec	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
+++ app/dist/spec/utt.spec	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
@@ -0,0 +1,106 @@
+#
+# 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
+
+#
+# We need some paths
+#
+# Directory with utt binaries
+%define _UTT_DIST_DIR	%(pwd)
+#Root directory in which utt will be installed
+%define _UTT_DIR		/usr/local/%_this_name
+#Directory for rpm
+%define _RPM_ROOT	%_UTT_DIST_DIR/../rpm_root
+
+#
+# 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:   %_RPM_ROOT
+#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
+%__mkdir_p $RPM_BUILD_ROOT%_UTT_DIR
+cp -fr %_UTT_DIST_DIR/* $RPM_BUILD_ROOT%_UTT_DIR/
+
+
+# cleaning after rpm build
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+# -------------------------------------------------------------
+#before installation
+%pre
+
+
+#after installation
+%post
+# we need to create utt.conf file
+%_UTT_DIR/create_utt_config.pl
+rm -f %_UTT_DIR/create_utt_config.pl
+# we need to create links in /usr/local/bin
+find %_UTT_DIR/bin/ -type f -exec ln -f {} /usr/local/bin \;
+
+
+#before uninstallation
+%preun
+# we delete links from /usr/local/bin
+for fn in `find %_UTT_DIR/bin/ -type f -exec basename {} \;`; do rm -f /usr/local/bin/$fn; done
+
+
+#after uninstallation
+%postun
+# we remove all extra files
+rm -fr %_UTT_DIR
+
+# -------------------------------------------------------------
+%files
+%defattr(-,root,root)
+/*
