diff --git a/libhbaapi-2.2.9-dl-linking.patch b/libhbaapi-2.2.9-dl-linking.patch new file mode 100644 index 0000000..e491fca --- /dev/null +++ b/libhbaapi-2.2.9-dl-linking.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 7d41812..27501c1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6,6 +6,8 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign]) + AC_PROG_CC + AC_PROG_LIBTOOL + ++AC_CHECK_LIB(dl, dlopen) ++ + AC_CONFIG_FILES([Makefile HBAAPI.pc]) + AC_OUTPUT + diff --git a/libhbaapi-2.2.9-portspeed.patch b/libhbaapi-2.2.9-portspeed.patch new file mode 100644 index 0000000..304514b --- /dev/null +++ b/libhbaapi-2.2.9-portspeed.patch @@ -0,0 +1,44 @@ +From e135ff849b6538814096401d1b40159091505d14 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 17 Sep 2014 06:03:14 +0000 +Subject: [PATCH] libhbaapi: Add new HBA_PORTSPEED definitions. + +These extend the defined port speed API out to 40 GBit/sec, matching the +FDMI values from the latest FC-GS-7 draft. + +Signed-off-by: Chris Leech +Signed-off-by: Vasu Dev +--- + hbaapi.h | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/hbaapi.h b/hbaapi.h +index 58098e0..b94703b 100644 +--- a/hbaapi.h ++++ b/hbaapi.h +@@ -229,11 +229,17 @@ typedef HBA_UINT32 HBA_PORTSTATE; + + + typedef HBA_UINT32 HBA_PORTSPEED; +-#define HBA_PORTSPEED_UNKNOWN 0 /* Unknown - transceiver incable +- * of reporting */ +-#define HBA_PORTSPEED_1GBIT 1 /* 1 GBit/sec */ +-#define HBA_PORTSPEED_2GBIT 2 /* 2 GBit/sec */ +-#define HBA_PORTSPEED_10GBIT 4 /* 10 GBit/sec */ ++#define HBA_PORTSPEED_UNKNOWN 0x0000 /* Unknown - transceiver incable ++ * of reporting */ ++#define HBA_PORTSPEED_1GBIT 0x0001 /* 1 GBit/sec */ ++#define HBA_PORTSPEED_2GBIT 0x0002 /* 2 GBit/sec */ ++#define HBA_PORTSPEED_10GBIT 0x0004 /* 10 GBit/sec */ ++#define HBA_PORTSPEED_4GBIT 0x0008 /* 4 GBit/sec */ ++#define HBA_PORTSPEED_8GBIT 0x0010 /* 8 GBit/sec */ ++#define HBA_PORTSPEED_16GBIT 0x0020 /* 16 GBit/sec */ ++#define HBA_PORTSPEED_32GBIT 0x0040 /* 32 GBit/sec */ ++#define HBA_PORTSPEED_20GBIT 0x0080 /* 20 GBit/sec */ ++#define HBA_PORTSPEED_40GBIT 0x0100 /* 40 GBit/sec */ + #define HBA_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ + + +-- +1.9.3 + diff --git a/libhbaapi-2.2.9.tar.gz b/libhbaapi-2.2.9.tar.gz new file mode 100644 index 0000000..0c39887 Binary files /dev/null and b/libhbaapi-2.2.9.tar.gz differ diff --git a/libhbaapi.spec b/libhbaapi.spec new file mode 100644 index 0000000..71380f4 --- /dev/null +++ b/libhbaapi.spec @@ -0,0 +1,52 @@ +Name: libhbaapi +Version: 2.2.9 +Release: 1 +Summary: SNIA HBAAPI library +License: SNIA +URL: http://open-fcoe.org/ +Source0: %{name}-%{version}.tar.gz + +BuildRequires: automake libtool +Patch0: libhbaapi-2.2.9-dl-linking.patch +Patch1: libhbaapi-2.2.9-portspeed.patch + +%description +SNIA HBAAPI library + +%package devel +Summary: Header files for libsodium +Requires: %{name} = %{version}-%{release} pkgconfig + +%description devel +Header files for libsodium + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +./bootstrap.sh +%configure --disable-static +%make_build + + +%install +%make_install +%delete_la_and_a + +%ldconfig_scriptlets + +%files +%defattr(-,root,root) +%license COPYING +%config(noreplace) %{_sysconfdir}/hba.conf +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root) +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +* Tue Feb 11 2020 openEuler Buildteam - 2.2.9-1 +- Package init