Name:		 libpenknife++ 
Summary:	 A C++ Utility
Version:	 @VERSION@
Release:	 1
License:	 GPL
Group:       	 Development/Libraries
Source:		 libpenknife++-%{version}.tar.gz
BuildRoot:	 /var/tmp/%{name}-%{version}-root
URL:		 http://linux.thai.net/
Packager:	 Vee Satayamas <virasj@users.sourceforge.net>


%description
A C++ Utility

%package devel
Summary:	Header of libpenknife++ 
Group:       Development/Libraries
Requires:	%{name} = %{version}

%description devel
Header of libpenknife++

%prep
%setup -q -n libpenknife++-%{version}

%build
CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=%{_prefix} \
    --bindir=%{_bindir} --mandir=%{_mandir} \
    --localstatedir=%{_localstatedir} --libdir=%{_libdir} \
    --datadir=%{_datadir} --includedir=%{_includedir} \
    --sysconfdir=%{_sysconfdir} 
make

%install
rm -rf $RPM_BUILD_ROOT

make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
    mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
    localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \
    datadir=$RPM_BUILD_ROOT%{_datadir} \
    includedir=$RPM_BUILD_ROOT%{_includedir} \
    sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)

%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/lib*.so.*

%files devel
%defattr(-, root, root)
%{_libdir}/*a
%{_libdir}/pkgconfig/*.pc
%{_includedir}/penknife++
