File libieee1284.spec of Package libieee1284

# spec file for package libieee1284
# Copyright (c) 2013 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

Name:           libieee1284
BuildRequires:  fdupes
BuildRequires:  python-devel
# bug437293
%ifarch ppc64
Obsoletes:      libieee1284-64bit
Summary:        A Library for Interfacing IEEE 1284-Compatible Devices
License:        GPL-2.0+ and MIT
Group:          System/Libraries
Version:        0.2.11
Release:        0
# Source0 is the main source
# Source1 is the documentation
Source2:        baselibs.conf
Patch1:         libieee1284-strict-aliasing.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This library is intended to be used by applications that need to
communicate with (or at least identify) devices that are attached via a
parallel port.

For Linux, there are some wrinkles in communicating with devices on
parallel ports (see /usr/share/doc/packages/libieee1284/README). The
aim of this library is to take all the worry about these wrinkles from
the application.  It figures out which method is appropriate for the
currently running kernel.  For instance, if the application wants to
know the device ID of a device on a particular port, it asks the
library for the the device ID.	The library then figures out if it is
available via /proc (in any of the possible locations) and, if not,
tries asking the device itself.  If /dev/parport0 is not available for
use, it tries ioperm; if that fails, it tries /dev/port.  The
application does not have to care.

%package devel
Requires:       %{name} = %{version}
Summary:        Development files for libieee1284
Group:          Development/Libraries/C and C++

%description devel
Development files for libieee1284, a Library for Interfacing IEEE
1284-Compatible Devices.

%setup -q
%patch1 -p1
# copy the documentation into the BUILD directory
cp %{SOURCE1} .

# set our preferred architecture-specific flags for the compiler and linker
%configure --disable-static --with-pic
make %{?_smp_mflags}

# run a self-test ... its not doing anything, so leave it out
# make check 

make install DESTDIR=${RPM_BUILD_ROOT}
# remove pointless libtool .la file
rm ${RPM_BUILD_ROOT}/%{_libdir}/
# remove useless .a and .la files of python module
rm ${RPM_BUILD_ROOT}/%{_libdir}/python%{py_ver}/site-packages/
# create symbolic links to the actual library
ln -sf ${RPM_BUILD_ROOT}/%{_libdir}/
ln -sf ${RPM_BUILD_ROOT}/%{_libdir}/
%fdupes -s $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files devel
%doc interface.pdf

openSUSE Build Service is sponsored by