Summary:	3Dconnexion device driver and SDK
Name:		libspnav
Version:	0.2.3
Release:	1%{?_dist_release}
License:	BSD
Group: System Environment/Libraries
URL: http://spacenav.sourceforge.net/

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

Patch0:	libspnav-0.2.3-lib_links.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: libX11-devel

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
The libspnav library is provided as a replacement of the magellan library.
It provides a cleaner, and more orthogonal interface. libspnav supports
both the original X11 protocol for communicating with the driver, and the
new alternative non-X protocol. Programs that choose to use the X11
protocol, are automatically compatible with either the free spacenavd 
driver or the official dxserv, as if they were using the magellan SDK.

Also, libspnav provides a magellan API wrapper on top of the new API.
So, any applications that were using the magellan library, can switch to
libspnav without any changes. And programmers that are familliar with the
magellan API can continue using it with a free library without the
restrictions of the official SDK.


%package	devel
Summary:	Development files for %{name}
Group:		Development/Libraries

Requires:	%{name} = %{version}-%{release}

%description devel
This package contains development files for %{name}.


%prep
%setup -q
%patch0 -p1 -b .link

%build
%ifarch x86_64
sed -i "s|libdir=lib|libdir=lib64|" configure
%endif
%configure 

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name "*.a" -delete
find $RPM_BUILD_ROOT -type f -name "*.la" -delete

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc README
%{_libdir}/libspnav.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libspnav.so
%{_includedir}/spnav.h
%{_includedir}/spnav_config.h
%{_includedir}/spnav_magellan.h


%changelog
* Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.3-1
- initial build
