File isapnp.spec of Package isapnp

#
# spec file for package isapnp
#
# Copyright (c) 2011 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/
#

Name:           isapnp
License:        GPL-2.0+
Group:          Hardware/Other
BuildRequires:  automake
BuildRequires:  flex
PreReq:         %fillup_prereq %insserv_prereq
Version:        1.26
Release:        0
Summary:        An ISA Plug and Play Configuration Utility
Source:         isapnptools-%{version}.tar.bz2
Source1:        boot.isapnp
Source2:        README.SuSE
Patch:          isapnp-1.26-powerpc.diff
Patch2:         isapnp-autotools.diff
Patch3:         isapnp-codecleanup.diff
Patch4:         isapnp-static_nonstatic_mix.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64

%description
Two programs--one allows the dumping of resource data and generation of
a skeleton configuration file, the other configures ISA PnP hardware
using a configuration file.

For more information, refer to:
/usr/share/doc/packages/isapnp/README.SuSE



Authors:
--------
    Peter Fox <fox@roestock.demon.co.uk>

%package devel
Summary:        ISA PnP library and headers
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Provides:       isapnp:/usr/include/isapnp/pnp.h

%description devel
This package contains all that's needed to develop programs that use
libisapnp.



Authors:
--------
    Peter Fox <fox@roestock.demon.co.uk>

%prep
%setup -q -n isapnptools-%{version}
chmod u+x src/*
%patch
%patch2
%patch3
%patch4

%build
%define warn_flags -W -Wall -Wstrict-prototypes -Wno-unused-parameter
rm -f acconfig.h
autoreconf --force --install
export CFLAGS="%{optflags} %{warn_flags}"
./configure --mandir=%{_mandir} --prefix=/ --includedir=/usr/include --libdir=%_libdir
touch src/isapnp_main.l
make all

%install
rm -rf %{buildroot}
cp %SOURCE2 .
make DESTDIR=%{buildroot} install-strip
install -d %{buildroot}/etc/init.d
install -m 744 %SOURCE1 %{buildroot}/etc/init.d/boot.isapnp

%post
%{fillup_and_insserv -y boot.isapnp}

%postun
%{insserv_cleanup}

%files
%defattr(-,root,root)
/sbin/isapnp
/sbin/pnpdump
%config /etc/init.d/boot.isapnp
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.SuSE
%doc doc/isapnpfaq.txt
%doc %{_mandir}/man5/*.5.gz
%doc %{_mandir}/man8/*.8.gz

%files devel
%defattr(-,root,root)
/usr/include/isapnp
%_libdir/libisapnp.a

%changelog