File libtprl.spec of Package libtprl
#
# spec file for package libtprl (Version 0.1.2)
#
# norootforbuild
Name: libtprl
BuildRequires: gcc-c++ readline-devel
Url: http://www.thousandparsec.net/
License: LGPL
Group: Development/Libraries/C and C++
Summary: Thousand Parsec Readline Library
Version: 0.1.2
Release: 1
Source0: %{name}-%{version}.tar.bz2
Patch0: libtprl-console.patch
BuildRoot: %{_builddir}/%{name}-root
%description
A wrapper around the readline developed by the Thousand Parsec project.
%package -n %{name}1
Summary: The zlib compression and decompression library
Group: System/Libraries
%description -n %{name}1
A wrapper around the readline developed by the Thousand Parsec project.
%package devel
Group: Development/Libraries/C and C++
Summary: Thousand Parsec Readline Library
Requires: %{name}1 = %{version}
%description devel
The %{name}-devel package contains the header files and static libraries for
building application which use %{name}.
%prep
%setup -q
%patch0 -p0
%build
%if 0%{?mandriva_version} == 2009
echo "It's Mandriva 2009!"
export LDFLAGS="$LDFLAGS -lreadline"
%else
echo "It's not Mandriva 2009"
%endif
%configure
make
find -name lib*.so* | xargs strip
%install
%makeinstall
%clean
rm -rf $RPM_BUILD_ROOT
%post -n %{name}1
/sbin/ldconfig
%postun -n %{name}1
/sbin/ldconfig
%files -n %{name}1
%defattr(-,root,root)
%doc README AUTHORS ChangeLog
%defattr(0755,root,root)
%{_prefix}/lib*/lib*.so.*
%files devel
%defattr(-,root,root)
%{_prefix}/lib*/lib*.so
%{_prefix}/lib*/lib*.*a
%{_prefix}/include/*
%{_prefix}/lib*/pkgconfig/libtprl.pc