File intel-iamt.spec of Package intel-iamt

#
# spec file for package intel-iamt (Version 3.1.0.31)
#
# Copyright (c) 2008 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

BuildRequires:  gcc-c++

Name:           intel-iamt
ExcludeArch:    ia64 ppc ppc64 s390 s390x
License:        BSD 3-Clause
Group:          System/Packages
Summary:        intel-iamt user space package for Intel iAMT
Version:        3.1.0.31
Release:        1
Source0:        lms-%{version}.tar.gz
Source1:        50-udev-default.rules
Patch:          intel-iamt-%{version}.diff
Patch1:         intel-iamt-lms.diff
Patch2:         makefile-in.diff
Patch3:         fix-lms-compilation.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The intel-iamt user space package to support Intel(R) iAMT.



Authors:
--------
    Philip Oswald

%prep
%setup -n LMS-%{version}
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p2
set -- *
mkdir source
mv "$@" source/
mkdir obj

%build
pushd source
./configure
make
popd

%install
pushd source
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d/
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/%name
make install DESTDIR=$RPM_BUILD_ROOT
install -m 644 COPYING $RPM_BUILD_ROOT/usr/share/doc/packages/%name/COPYING
install -m 644 README $RPM_BUILD_ROOT/usr/share/doc/packages/%name/README
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/udev/rules.d/
popd
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
cat >iamt-source.files <<EOF
%%defattr(-, root, root)
%%dir /usr/share/doc/packages/%name
%%dir /etc/udev
%%dir /etc/udev/rules.d
/usr/sbin/lms
/usr/share/doc/packages/%name/*
/etc/init.d/*
/etc/udev/rules.d/*
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files -f iamt-source.files

%changelog
* Thu Sep 25 2008 poswald@novell.com
-Building for SLE11 which required a fix for compilation
* Mon Mar 31 2008 poswald@novell.com
-Added a patch to fix root exploit in Makefil.in
* Thu Dec 06 2007 andavis@novell.com
- Added to PLDP
- Bugzilla 342623