Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > bf3cbcfd2145544996ea065ac3f11596 > files > 3

libspnav-0.2.2-7.mga5.src.rpm

%define oname spnav

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

Name:          libspnav
Version:       0.2.2
Release:       %mkrel 7
Summary:       library to access 3D-input-devices
Group:         System/Libraries
License:       BSD
Url:           http://spacenav.sourceforge.net/
Source0:       http://download.sourceforge.net/spacenav/%{name}-%{version}.tar.gz
Patch0:        libspnav-0.2.2-Makefile_in.patch
BuildRequires: libx11-devel
Obsoletes:     spnav < 0.2.2-4

%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
Obsoletes:     %{_lib}libspnav0 < 0.2.2-3

%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:      %lib_name = %{version}-%{release}
Provides:      %{oname}-devel = %{version}-%{release}
Provides:      lib%{oname} = %{version}-%{release}
Obsoletes:     %{_lib}libspnav-devel < 0.2.2-3

%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.
pushd %{buildroot}%{_libdir}
  ln -s $LIBNAME %{name}.so
popd


%changelog
* Wed Oct 15 2014 umeabot <umeabot> 0.2.2-7.mga5
+ Revision: 749856
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.2.2-6.mga5
+ Revision: 681796
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 0.2.2-5.mga4
+ Revision: 527557
- Mageia 4 Mass Rebuild

* Sun Jun 09 2013 wally <wally> 0.2.2-4.mga4
+ Revision: 441219
- add virtual provides to devel pkg
- obsolete old src.rpm which was imported with a different name

* Sun Jun 09 2013 wally <wally> 0.2.2-3.mga4
+ Revision: 441211
- fix pkg names
- clean .spec a bit

* 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


* Wed Jul 13 2011 gil <gil> 0.2.2-0.%%mkrel
- initial rpm