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

Summary: The Atlas protocol C++ implementation
Name: %{name}
Version: %{version}
Release: %{release}
License: LGPL
Group: System Environment/Libraries
URL: http://www.worldforge.org/dev/eng/libraries/atlas_cpp
Packager: Al Riddoch <alriddoch@googlemail.com>
Vendor: WorldForge
Distribution: Mason
Source: Atlas-C++-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%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 -n Atlas-C++-%{version}

%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 AUTHORS COPYING

%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_libdir}/lib*.a
%{_libdir}/pkgconfig/*
%{_includedir}/*
%doc NEWS README THANKS ChangeLog TODO HACKING ROADMAP
