#
#spec file for complex number applications
#
%include Solaris.inc
Summary: A program performing the complex number operations.
Name: complex
Version: 2.0
Release: 2
Source: complex-2.0.tar.gz
URL: http://www.opensolaris.org
SUNW_Copyright: %{name}.copyright
#SUNW_BaseDir:            %{_basedir}
#BuildRoot: %{_topdir}/temp
#BuildRoot:               %{_tmppath}/%{name}-%{version}-build
License: Dummy
Vendor: Dummy
Group: Test

%include default-depend.inc

%description
The complex program reformats C code to perform the operations on complex numbers like addition,substraction and multiplication.

%changelog
* Mon May 26 2010 Adil
- 1st Release 

%prep
%setup -q             
#rm -rf $RPM_BUILD_ROOT
#mkdir -p $RPM_BUILD_ROOT/opt/complex/bin
echo "***********************************Inside setup"

%build
make all
echo "************************************Inside build"

%install
#install -Dm 755 complex $RPM_BUILD_ROOT/home/adil/bin/complex
#make DESTDIR=$RPM_BUILD_ROOT complex_install
rm -rf %{buildroot}
make DESTDIR="%{buildroot}" complex_install
rm -rf %{buildroot}%{_datadir}/info
echo "************************************Inside install "

%clean
rm -rf $RPM_BUILD_ROOT

%pre

echo "*************************************inside pre"

%post
echo "Inside post "
cd /opt/complex/bin
echo "*************************************present working dir"
echo `pwd`
cd -

%files
%defattr(-,root,root)
/opt/complex/bin/complex