[sblim-smis-hba] Import

vcrhonek vcrhonek at fedoraproject.org
Tue Jan 25 11:24:32 UTC 2011


commit 0471566fa56389eda56e3b8e827e97492d91d309
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Tue Jan 25 12:24:09 2011 +0100

    Import

 .gitignore                              |    1 +
 sblim-smis-hba-1.0.0-include.patch      |   12 ++++
 sblim-smis-hba-1.0.0-no-testsuite.patch |   65 ++++++++++++++++++
 sblim-smis-hba.spec                     |  109 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 5 files changed, 188 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0405e6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sblim-smis-hba-1.0.0.tar.bz2
diff --git a/sblim-smis-hba-1.0.0-include.patch b/sblim-smis-hba-1.0.0-include.patch
new file mode 100644
index 0000000..9700731
--- /dev/null
+++ b/sblim-smis-hba-1.0.0-include.patch
@@ -0,0 +1,12 @@
+diff -up sblim-1/sblim-smis-hba-1.0.0/src/Linux_CommonHBA.h_old sblim-1/sblim-smis-hba-1.0.0/src/Linux_CommonHBA.h
+--- sblim-1/sblim-smis-hba-1.0.0/src/Linux_CommonHBA.h_old	2009-09-01 15:22:39.000000000 +0200
++++ sblim-1/sblim-smis-hba-1.0.0/src/Linux_CommonHBA.h	2009-12-21 14:35:33.000000000 +0100
+@@ -33,7 +33,7 @@
+ /* ---------------------------------------------------------------------------*/
+ 
+ #include <time.h>
+-#include <sys/hbaapi.h>
++#include <hbaapi.h>
+ 
+ #define HBA_MAX_DEV_NAME        30
+ #define DEVICEID_SIZE           256
diff --git a/sblim-smis-hba-1.0.0-no-testsuite.patch b/sblim-smis-hba-1.0.0-no-testsuite.patch
new file mode 100644
index 0000000..ef3bb97
--- /dev/null
+++ b/sblim-smis-hba-1.0.0-no-testsuite.patch
@@ -0,0 +1,65 @@
+diff -up sblim-smis-hba-1.0.0/Makefile.am_old sblim-smis-hba-1.0.0/Makefile.am
+--- sblim-smis-hba-1.0.0/Makefile.am_old	2009-09-01 15:22:40.000000000 +0200
++++ sblim-smis-hba-1.0.0/Makefile.am	2009-11-18 17:49:13.000000000 +0100
+@@ -151,61 +151,3 @@ preuninstall:
+ 
+ dist-hook:
+ 	test -d "$(distdir)" &&	rm -rf `find $(distdir) -type d -name CVS`
+-
+-#
+-# Automake instructions for ./test subdir
+-#
+-#EXTRA_DIST+=test README.TEST
+-if TESTSUITE
+-testsuitedir=@TESTSUITEDIR@
+-testsuitesystemdir=@TESTSUITEDIR@/system/linux
+-testsuitecimdir=@TESTSUITEDIR@/cim
+-testsuite_SCRIPTS=test/test-sblim-hba.sh
+-testsuitesystem_DATA= \
+-	test/system/linux/Linux_FCCard.system \
+-	test/system/linux/Linux_FCControlledBy.system \
+-	test/system/linux/Linux_FCDeviceSAPImplementation.system \
+-	test/system/linux/Linux_FCElementSoftwareIdentity.system \
+-	test/system/linux/Linux_FCElementStatisticalData.system \
+-	test/system/linux/Linux_FCHostedAccessPoint.system \
+-	test/system/linux/Linux_FCInstalledSoftwareIdentity.system \
+-	test/system/linux/Linux_FCLogicalDisk.system \
+-	test/system/linux/Linux_FCPortController.system \
+-	test/system/linux/Linux_FCPortStatistics.system \
+-	test/system/linux/Linux_FCPort.system \
+-	test/system/linux/Linux_FCProduct.system \
+-	test/system/linux/Linux_FCRealizes.system \
+-	test/system/linux/Linux_FCSCSIProtocolEndpoint.system \
+-	test/system/linux/Linux_FCSoftwareIdentity_Driver.system \
+-	test/system/linux/Linux_FCSoftwareIdentity_Firmware.system \
+-	test/system/linux/Linux_FCSoftwareIdentity.system \
+-	test/system/linux/Linux_FCSystemDevice_LogicalDevice.system \
+-	test/system/linux/Linux_FCSystemDevice.system
+-
+-#testsuitesystem_SCRIPTS=
+-testsuitecim_DATA= \
+-	test/cim/Linux_FCCard.cim \
+-	test/cim/Linux_FCControlledBy.cim \
+-	test/cim/Linux_FCDeviceSAPImplementation.cim \
+-	test/cim/Linux_FCElementSoftwareIdentity.cim \
+-	test/cim/Linux_FCElementStatisticalData.cim \
+-	test/cim/Linux_FCHostedAccessPoint.cim \
+-	test/cim/Linux_FCInstalledSoftwareIdentity.cim \
+-	test/cim/Linux_FCLogicalDisk.cim \
+-	test/cim/Linux_FCPort.cim \
+-	test/cim/Linux_FCPortController.cim \
+-	test/cim/Linux_FCPortStatistics.cim \
+-	test/cim/Linux_FCProduct.cim \
+-	test/cim/Linux_FCRealizes.cim \
+-	test/cim/Linux_FCSCSIProtocolEndpoint.cim \
+-	test/cim/Linux_FCSoftwareIdentity.cim \
+-	test/cim/Linux_FCSoftwareIdentity_Driver.cim \
+-	test/cim/Linux_FCSoftwareIdentity_Firmware.cim \
+-	test/cim/Linux_FCSystemDevice.cim \
+-	test/cim/Linux_FCSystemDevice_LogicalDevice.cim
+-
+-runtest: install
+-	cd $(DESTDIR)$(TESTSUITEDIR) &&	./test-sblim-hba.sh
+-
+-#doc_DATA+=README.TEST
+-endif
diff --git a/sblim-smis-hba.spec b/sblim-smis-hba.spec
new file mode 100644
index 0000000..464ff35
--- /dev/null
+++ b/sblim-smis-hba.spec
@@ -0,0 +1,109 @@
+%global tog_pegasus_version 2:2.5.1
+%global provider_dir %{_libdir}/cmpi/
+
+Name:           sblim-smis-hba
+Version:        1.0.0
+Release:        1%{?dist}
+Summary:        SBLIM SMIS HBA HDR Providers
+
+Group:          Applications/System
+License:        EPL
+URL:            http://sblim.wiki.sourceforge.net/
+Source0:        http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
+
+# Patch0: upstream tarball doesn't contain testsuite but default Makefile is going to build it
+Patch0:         sblim-smis-hba-1.0.0-no-testsuite.patch
+Patch1:         sblim-smis-hba-1.0.0-include.patch
+
+BuildRequires:  sblim-cmpi-devel, sblim-tools-libra-devel, sblim-cmpi-base-devel
+BuildRequires:  libhbaapi-devel
+BuildRequires:  autoconf, automake, libtool
+BuildRequires:  tog-pegasus-devel >= %{tog_pegasus_version}, curl-devel, perl, libsysfs-devel
+BuildRequires:  binutils-devel, autoconf, automake, libtool, flex, bison
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+Requires:       tog-pegasus
+Requires:       sblim-cmpi-base
+
+%description
+SMI-S standards based HBA CMPI Providers.
+
+%prep
+%setup -q
+%patch0 -p1 -b .no-testsuite
+%patch1 -p2 -b .include
+autoreconf
+# ltmain.sh is old, create new one
+rm -f ltmain.sh
+libtoolize --force
+
+
+%build
+%configure \
+   TESTSUITEDIR=%{_datadir}/sblim-testsuite \
+   CIMSERVER=pegasus \
+   PROVIDERDIR=%{provider_dir} \
+   LDFLAGS="-L${RPM_BUILD_ROOT}%{_libdir}/cmpi";
+# workaround libtool issue
+sed -i -e '/not ending/ s/.*/true/' libtool
+# do not use smp_flags!
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+# remove unused libtool files
+rm -f $RPM_BUILD_ROOT/%{_libdir}/*a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING README
+%{_datadir}/%{name}
+%{_libdir}/cmpi/libcmpiLinux_Common.so*
+%{_libdir}/cmpi/libcmpiLinux_ECTP_Provider.so*
+%{_libdir}/cmpi/libcmpiSMIS_HBA_HDR_Provider.so*
+
+%global HBA_SCHEMA %{_datadir}/%{name}/Linux_SMIS_HBA_HDR.mof %{_datadir}/%{name}/Linux_SMIS_ECTP.mof
+%global HBA_REGISTRATION %{_datadir}/%{name}/Linux_SMIS_HBA_HDR.reg %{_datadir}/%{name}/Linux_SMIS_ECTP.reg
+
+%pre
+# If upgrading, deregister old version
+if [ $1 -gt 1 ]
+then
+  %{_datadir}/%{name}/provider-register.sh -d \
+        -r %{HBA_REGISTRATION} -m %{HBA_SCHEMA} > /dev/null 2>&1 || :;
+fi
+
+%post
+# Register Schema and Provider - this is higly provider specific
+%{_datadir}/%{name}/provider-register.sh \
+        -r %{HBA_REGISTRATION} -m %{HBA_SCHEMA} > /dev/null 2>&1 || :;
+/sbin/ldconfig
+
+%preun
+# Deregister only if not upgrading 
+if [ $1 -eq 0 ]
+then
+  %{_datadir}/%{name}/provider-register.sh -d \
+        -r %{HBA_REGISTRATION} -m %{HBA_SCHEMA} > /dev/null 2>&1 || :;
+fi
+
+%postun
+if [ $1 -eq 0 ]
+then
+  /sbin/ldconfig
+fi
+
+
+%changelog
+* Thu Jan 20 2011 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.0.0-1
+- Initial support
+
diff --git a/sources b/sources
index e69de29..0909311 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9bdcba6f2192d39d5000a0707ed5abc1  sblim-smis-hba-1.0.0.tar.bz2


More information about the scm-commits mailing list