File ois.spec of Package ois

#
# spec file for package ois
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define soname 1_3_0

Name:           ois
Version:        1.3.0
Release:        0
Summary:        Object Oriented Input System
License:        Zlib
Group:          System/Libraries
Url:            http://sourceforge.net/projects/wgois
Source0:        %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM ois-gcc47.patch
Patch0:         %{name}-gcc47.patch
BuildRequires:  dos2unix
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  xorg-x11-devel
Requires:       xorg-x11
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Object Oriented Input System (OIS) is meant to be a cross platform, simple solution for using all kinds of Input Devices (KeyBoards, Mice, Joysticks, etc) and feedback devices (e.g. forcefeedback).

%package -n libOIS-%{soname}
Summary:        Object Oriented Input System development package
Group:          Development/Libraries/C and C++

%description -n libOIS-%{soname}
Object Oriented Input System (OIS) is meant to be a cross platform, simple solution for using all kinds of Input Devices (KeyBoards, Mice, Joysticks, etc) and feedback devices (e.g. forcefeedback).

%package -n libOIS-devel
Summary:        Object Oriented Input System development package
Group:          Development/Libraries/C and C++
Requires:       libOIS-%{soname} = %{version}

%description -n libOIS-devel
Object Oriented Input System (OIS) is meant to be a cross platform, simple solution for using all kinds of Input Devices (KeyBoards, Mice, Joysticks, etc) and feedback devices (e.g. forcefeedback).

%prep
%setup -q -n ois
%patch0 -p1
chmod +x bootstrap
dos2unix ReadMe.txt

%build
./bootstrap
%if 0%{?suse_version} <= 1010
export LDFLAGS="$LDFLAGS -L/usr/X11R6/%{_lib}"
%endif
%configure --disable-static
make %{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/lib*.la

%post -n libOIS-%{soname} -p /sbin/ldconfig
%postun -n libOIS-%{soname} -p /sbin/ldconfig

%files -n libOIS-%{soname}
%defattr(0644,root,root)
%{_libdir}/libOIS-%{version}.so

%files -n libOIS-devel
%defattr(-,root,root)
%doc ReadMe.txt
%{_includedir}/OIS
%{_libdir}/libOIS.so
%{_libdir}/pkgconfig/OIS.pc

%changelog
openSUSE Build Service is sponsored by