Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > d1a52e48b7f6641f78663cef6eaf9d43 > files > 3

libspnav-0.2.2-2.mga3.src.rpm

%define lib_major 0
%define develname %mklibname -d %name
%define lib_name %mklibname %{name} %{lib_major}

Name:          libspnav
Version:       0.2.2
Release:       %mkrel 2
Summary:       library to access 3D-input-devices
Group:         System/Libraries
License:       BSD
Url:           http://spacenav.sourceforge.net/
Source0:       http://sourceforge.net/projects/spacenav/files/spacenav%20library%20%28SDK%29/libspnav%200.2.2/libspnav-0.2.2.tar.gz
Patch0:        libspnav-0.2.2-Makefile_in.patch
Buildrequires: libx11-devel

%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
3dxserv, 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 -n %lib_name
Group:         System/Libraries
Summary:       library to access 3D-input-devices
Provides:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description -n %lib_name
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
3dxserv, 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.

%files -n %lib_name
%{_libdir}/libspnav.so.%{lib_major}*

#--------------------------------------------------------------------

%package -n %develname
Group:         Development/C
Summary:       Static libraries and headers for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description -n %develname
libspnav - library to access 3D-input-devices.

This package contains static libraries and header files need for development.

%files -n %develname
%{_includedir}/*.h
%{_libdir}/*.so

#--------------------------------------------------------------------

%prep
%setup -q
%patch0 -p0

%build
sed -i "s/libdir=lib/libdir=%{_lib}/g" configure
%configure2_5x --disable-static
%make

%install
%makeinstall_std

chmod 755 %{buildroot}%{_libdir}/*.so.*
chmod 644 %{buildroot}%{_includedir}/*.h

# Remove static library
rm -f %{buildroot}%{_libdir}/%{name}.a

# Extract library name from makefile
LIBNAME=$(make -f Makefile -f - <<<'lib_so:; @echo $(lib_so)' lib_so)
# Make sure LIBNAME is set and not null
: ${LIBNAME:?"LIBNAME variable could not be set."}

# Create symbolic link for -devel subpackage.
/sbin/ldconfig -n %{buildroot}%{_libdir}
pushd %{buildroot}%{_libdir}
ln -s $LIBNAME %{name}.so
popd


%changelog

* Sat Jan 12 2013 umeabot <umeabot> 0.2.2-2.mga3
+ Revision: 358202
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Oct 05 2011 dmorgan <dmorgan> 0.2.2-1.mga2
+ Revision: 151772
- Add libx11-devel as buildrequires
- Fix main package name
  Add .so file in the devel package ( from fedora )
- Fix devel package name
  Remove .a files
  remove not needed rpm stuffs

  + gil <gil>
    - removed %%post %%postun scripts
    - imported package libspnav