File libsmi.spec of Package libsmi

#
# spec file for package libsmi (Version 0.4.5)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           libsmi
BuildRequires:  wget
Version:        0.4.5
Release:        1.<RELEASE91>
AutoReqProv:    on
Group:          System/Libraries
License:        X11/MIT
Url:            http://www.ibr.cs.tu-bs.de/projects/libsmi
Summary:        A Library to Access SMI MIB Information
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-no_redef.diff
Patch1:         libsmi-CVE-2010-2891.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The purpose of libsmi is to

* Give network management applications a concise programmer-friendly
   interface to access MIB module information

* Separate the knowledge on SMI from the main parts of management
   applications

* Allow addition of new kinds of MIB repositories without the need to
adapt applications that make use of libsmi



Authors:
--------
    Frank Strauss <strauss@ibr.cs.tu-bs.de>

%package devel
License:        X11/MIT
Summary:        libsmi header files and static libraries
Group:          Development/Libraries/C and C++
Requires:       libsmi glibc-devel

%description devel
This package contains the header files and static libraries of package
libsmi.



Authors:
--------
    Frank Strauss <strauss@ibr.cs.tu-bs.de>

%prep
%setup -q
%patch0
%patch1

%build
libtoolize --force
autoreconf --force --install
CFLAGS="$RPM_OPT_FLAGS -Wall" \
CXXFLAGS="$RPM_OPT_FLAGS -Wall -fmessage-length=0" \
	./configure \
	--mandir=%{_mandir} \
	--prefix=%{_prefix} \
	--sysconfdir=%{_sysconfdir} \
	--libdir=%{_libdir} \
	--infodir=%{_infodir} \
	--enable-smi \
	--enable-sming \
	--with-mibdir=%{_datadir}/mibs
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%post
%{run_ldconfig}

%postun
%{run_ldconfig}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc ANNOUNCE COPYING ChangeLog README THANKS TODO doc/*.txt
%doc %{_mandir}/man?/*
%{_libdir}/libsmi.so.*
%{_bindir}/*
%{_datadir}/mibs
%{_datadir}/pibs

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/libsmi.a
%{_libdir}/libsmi.la
%{_libdir}/libsmi.so
%{_libdir}/pkgconfig/libsmi.pc
%{_datadir}/aclocal/libsmi.m4

%changelog
openSUSE Build Service is sponsored by