File libGoIO2.spec of Package libGoIO2
#
# spec file for package libGoIO2
#
# Copyright (c) 2012 Frank Schütte <fschuett@gymnasium-himmelsthuer.de>
#
# 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 src_name GoIO_SDK
%define VER 53
Name: libGoIO2
Version: 2.54.0
Release: 1.1
Summary: C++ library to interface vernier go computer interfaces
Group: System/Libraries
License: LGPL-2.0-or-later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{src_name}-%{version}.tar.gz
Patch1: goio_udev.patch
Patch2: goio_usbmisc.patch
Patch3: %{name}-narrowing.patch
URL: http://www.vernier.com
BuildRequires: gcc-c++ automake autoconf libtool
Requires: udev
%if 0%{?centos_version}
BuildRequires: libusb1-devel
Requires: libusb1
%else
BuildRequires: libusb-1_0-devel
Requires: libusb-1_0-0
%endif
%description
The Vernier Software GmbH provides quite some computer interfaces
to make measurements for science at school.
This library provides a c++ interface to make use of this computer
interfaces and the available sensors in a user program.
%package devel
Summary: Development files for libGoIO2
Group: Development/Libraries/C and C++
%description devel
%prep
%setup -q -n %{src_name}
%patch -P 1 -p1
%patch -P 2 -p0
%patch -P 3 -p0
%build
export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s
cd src
touch NEWS README AUTHORS ChangeLog
./autogen.sh --prefix=/usr --libdir=/usr/%_lib --sysconfdir=/usr/lib --enable-libusb --enable-handheld --enable-log
make
make dist
%install
cd src
make install DESTDIR=%{buildroot}
cd ..
# remove conflict with cassy package
mv %{buildroot}/usr/lib/udev/rules.d/48-ldusb.rules %{buildroot}/usr/lib/udev/rules.d/48-goio_ldusb.rules
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc src/AUTHORS src/ChangeLog src/README src/COPYING src/NEWS
%dir /usr/lib/udev/rules.d
/usr/lib/udev/rules.d/48-goio_ldusb.rules
/usr/lib/udev/rules.d/vstlibusb.rules
%defattr(755,root,root)
/usr/%_lib/libGoIO.so.2
/usr/%_lib/libGoIO.so.2.0.%{VER}
%files devel
%defattr(-,root,root)
/usr/include/GoIO
/usr/%_lib/pkgconfig
/usr/%_lib/libGoIO.a
/usr/%_lib/libGoIO.la
/usr/%_lib/libGoIO.so
%changelog