Name: <<< name package will have in rpm db >>>
Version: <<< version number of sources >>>
Release: <<< release number of the rpm build >>>
BuildArch: noarch
Source0: <<< path to source files.
NOTE: source files must be packed in a directory in this format %{name}-%{version} then tarred and gzipped >>>
License: GPL
Group: Development/Tools
Buildroot: %{_tmppath}/%{name}-root
%description
<<< description as seen from rpm -qi >>>
%prep
%setup -q
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/<<< directory in the rpm repo >>>
…
install -m 755 <<< script in the source build >>> $RPM_BUILD_ROOT/<<< destination in the rpm repo >>>
…
%post
<<< post install script here >>>
%postun
<<< post uninstall script here >>>
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
<<< list of files/directories in the package here >>>





