###############################################################################
###############################################################################
##
##  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.
##
##  This copyrighted material is made available to anyone wishing to use,
##  modify, copy, or redistribute it subject to the terms and conditions
##  of the GNU General Public License v.2.
##
###############################################################################
###############################################################################
%define vers @VERS@
%define rel @REL@

Name: magma
Version: %{vers}
Release: %{rel}
License: GPL
Group: System Environment/Libraries
Summary: A cluster/lock manager API abstraction library

Source0: %{name}-%{version}-%{release}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
A high level cluster/lock manager API abstraction library.

%package devel
Group: Development/Libraries
Summary: A cluster/lock manager API abstraction library

%description devel
A cluster/lock manager API abstraction static library.

%prep
%setup -q -n %{name}-%{version}-%{release}

%build
./configure --libdir=/lib --slibdir=%{_libdir} --mandir=%{_mandir}
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
/sbin/circleping
/sbin/magma_tool
/sbin/cluster_cmd
/lib/libmagma.so*
/lib/libmagmamsg.so*
/lib/libmagma_nt.so*
/lib/libmagma_nt.so.%{version}

%doc
%{_mandir}/man3/clu_connect.3.gz
%{_mandir}/man3/clu_disconnect.3.gz
%{_mandir}/man3/clu_get_event.3.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/magma-build.h
%{_includedir}/magma.h
%{_includedir}/magmamsg.h
%{_libdir}/libmagma.a
%{_libdir}/libmagmamsg.a
%{_libdir}/libmagma_nt.a
%doc


%changelog
* Mon Jan 26 2005 Lon Hohberger <lhh@redhat.com>
- Move libraries to /lib (static libs in /usr/lib) so that our
programs in /sbin don't require /usr to be mounted.
* Fri Oct 22 2004 Chris Feist <cfeist@redhat.com>
- Various bug fixes and new upstream sources.
* Fri Aug 13 2004 Jon Brassow <jbrassow@redhat.com>
- Various lock and other bug fixes
* Tue Jun 22 2004 Jon Brassow <jbrassow@redhat.com> 
- be sure .so links are also made/included
* Tue Jun 22 2004 Jon Brassow <jbrassow@redhat.com> 
- Don't use hardcoded version numbers in the files section
* Tue Jun 22 2004 Jon Brassow <jbrassow@redhat.com> 
- Fix conflicting types in .h and .c files
* Thu Jun 17 2004 Jon Brassow <jbrassow@redhat.com> 
- Initial build.


