File libica-1_3_9.spec of Package libica-1_3_9

#
# spec file for package libica-1_3_9 (Version 1.3.9)
#
# 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:           libica-1_3_9
BuildRequires:  gcc-c++ openssl-devel
Summary:        An Interface Library for the ICA Device Driver
Version:        1.3.9
Release:        9
License:        IBM PL
Group:          Hardware/Other
Source:         libica-%{version}.tar.bz2
Source1:        libica-SuSE.tar.bz2
Source2:        baselibs.conf
# cvs -d :pserver:anoncvs@www-124.ibm.com:/usr/cvs/icadd \
#    export -rHEAD -d . include/linux/icaioctl.h
# or e.g. http://www-124.ibm.com/developerworks/oss/cvs/icadd/~checkout~/include/linux/icaioctl.h?rev=1.2
Source3:        icaioctl.h
Source4:        README.SUSE
Source5:        sysconfig.z90crypt
Patch1:         libica-z90crypt_h-license.patch
Patch2:         libica-buildfix.patch
Url:            http://oss.software.ibm.com/developerworks/opensource/libica
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq %insserv_prereq
# bug437293
%ifarch ppc64
Obsoletes:      libica-64bit
%endif
#
Obsoletes:      libica < 1.3.9
Provides:       libica = 1.3.9

%description
This package contains the interface library routines used by IBM
modules to interface with the IBM eServer Cryptographic Accelerator
(ICA).



%prep
%setup -n libica-%{version}
%setup -n libica-%{version} -T -D -a 1
%patch1 -p1
%patch2

%build
mkdir -p include/linux/
cp %{S:3} include/linux/
#./autoversion
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -I./include"
export CPPFLAGS="$RPM_OPT_FLAGS -I./include"
./configure --libdir=%_libdir --mandir=%_mandir --prefix=%_prefix
export CFLAGS=
export CPPFLAGS=
make

%install
mkdir -p $RPM_BUILD_ROOT/usr/include
make INSROOT=$RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT bindir=%_bindir install
cp -p include/ica_api.h $RPM_BUILD_ROOT/usr/include
%ifarch s390 s390x
cp -a SuSE/* $RPM_BUILD_ROOT
install -D %{S:5} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.z90crypt
%endif
cp -a $RPM_SOURCE_DIR/README.SUSE .

%post
/sbin/ldconfig
%ifarch s390 s390x
%{fillup_and_insserv -n z90crypt}
%endif

%preun
%stop_on_removal

%postun
%{insserv_cleanup}

%files
%defattr(-, root, root)
%doc README.SUSE
%ifarch s390 s390x
/etc/init.d/z90crypt
/usr/sbin/rcz90crypt
%attr(0644,root,root) /var/adm/fillup-templates/sysconfig.z90crypt
%{_bindir}/icainfo
%endif
%{_libdir}/libica.*
%{_libdir}/libica-*
%attr(0644,root,root) /usr/include/ica_api.h

%changelog
openSUSE Build Service is sponsored by