File ibmasm.spec of Package ibmasm

#
# spec file for package ibmasm (Version 3.0)
#
# Copyright (c) 2009 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:           ibmasm
BuildRequires:  xorg-x11-devel
License:        GPL v2 or later
Url:            http://www.ibm.com
Group:          System/Kernel
AutoReqProv:    on
Version:        3.0
Release:        180
Summary:        IBM Advanced System Management Drivers
Source:         ibmasm_user_%version.tar.bz2
Source1:        ibmasmrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq %insserv_prereq
Patch1:         ibmasm_sles10_updates.patch
Patch2:         use-rpm-opt-flags.diff
Patch3:         build-fix.diff
Patch4:         ibmasm-gcc_not_ld.patch

%description
This package contains the tools necessary to set up the IBM Advanced
System Management Drivers that are shipped with the SUSE kernel.



Authors:
--------
    IBM

%prep
%setup -q -n ibmasm
%patch1
%patch2
%patch3
%patch4

%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
cd src
make

%install
cd src
make _LIB=/%_lib ROOT=$RPM_BUILD_ROOT install
install %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/ibmasm
mkdir -p $RPM_BUILD_ROOT/usr/sbin/
ln -sf ../../etc/init.d/ibmasm $RPM_BUILD_ROOT/usr/sbin/rcibmasm

%preun
%stop_on_removal ibmasm

%post
%fillup_and_insserv

%postun
%restart_on_update ibmasm
%insserv_cleanup

%files
%defattr(-,root,root)
%dir /var/lib/ibmasm
%doc src/README
/%_lib/libsysSp.so
/usr/bin/evnode
/sbin/ibmsphalt
/sbin/ibmspup
/sbin/ibmspdown
%config /etc/init.d/ibmasm
/usr/sbin/rcibmasm

%changelog
* Fri Jun 19 2009 coolo@novell.com
- disable as-needed for this package as it fails to build with it
* Mon Feb 05 2007 ro@suse.de
- use gcc and not ld to create shared lib
* Tue Jan 16 2007 adrian@suse.de
- use $RPM_OPT_FLAGS for compiling
- fix build, do not use an implicit declare memset() call
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006 adrian@suse.de
- handle xorg.conf file (#144518)
* Tue Dec 13 2005 ro@suse.de
- fix PreReqs (#46477)
* Wed Sep 21 2005 adrian@suse.de
- update to version 3.0 (#86120)
* Thu Apr 29 2004 adrian@suse.de
- mount fs to /var/lib/ibmasm (#38165)
- apply fix for remote usage by IBM (#39616)
* Sat Feb 28 2004 adrian@suse.de
- update to version 2.0
* Thu Jul 31 2003 adrian@suse.de
- restart daemon on update
* Fri May 16 2003 coolo@suse.de
- use BuildRoot
* Tue Oct 15 2002 agruen@suse.se
- added SuSE specific README.TXT from Frederick W Treasure
  <fwtreas@us.ibm.com> (#20784)
* Mon Oct 14 2002 uli@suse.de
- fixed to build on lib64 archs
* Thu Oct 10 2002 agruen@suse.de
- Fix wrong pathname in ibmspup script
- Build ibmsprem2 with X11 support (add required libraries)
* Tue Sep 10 2002 uli@suse.de
- initial package