%define name @PACKAGE@
%define version @VERSION@
%define release 1
%define libsuffix @ATLAS_LIB_SUFFIX@

Summary: The Atlas protocol C++ implementation
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: LGPL
Group: System Environment/Libraries
Source: %{name}-%{version}.tar.gz
Requires: libstdc++
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildRequires: libstdc++-devel >= 2.95.2

%description
This library implements the Atlas protocol, for use in client-server
game applications. It is the standard implementation used by games written
by the WorldForge project. This library is suitable for linking to either
clients or servers.

%package devel
Summary: The Atlas protocol C++ implementation library headers and static libs.
Group: Development/Libraries
Requires: %{name} = %{version} libstdc++-devel

%description devel
This library implements the Atlas protocol, for use in client-server
game applications. It is the standard implementation used by games written
by the WorldForge project. This library is suitable for linking to either
clients or servers.

%prep
%setup -q

%build
CXXFLAGS=$RPM_OPT_FLAGS %configure --enable-static
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_libdir}/lib*.so.*
%doc README COPYING AUTHORS THANKS NEWS ChangeLog TODO HACKING ROADMAP

%files devel
%defattr(-,root,root)
%{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_libdir}/lib*.a
%{_libdir}/pkgconfig/*
%{_includedir}/%{name}%{libsuffix}
