initial import
This commit is contained in:
parent
df03ebb683
commit
02877c2d24
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/smc-tools-1.0.0.tar.gz
|
12
smc-tools-1.0.0-arm.patch
Normal file
12
smc-tools-1.0.0-arm.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up smc-tools-1.0.0/Makefile.arm smc-tools-1.0.0/Makefile
|
||||
--- smc-tools-1.0.0/Makefile.arm 2018-01-08 11:58:05.000000000 +0100
|
||||
+++ smc-tools-1.0.0/Makefile 2018-01-08 11:57:47.000000000 +0100
|
||||
@@ -19,6 +19,8 @@ ifeq ($(ARCH),i686)
|
||||
ARCH64=0
|
||||
else ifeq ($(ARCH),s390)
|
||||
ARCH64=0
|
||||
+else ifeq ($(ARCH),armv7l)
|
||||
+ARCH64=0
|
||||
else
|
||||
ARCH64=1
|
||||
endif
|
22
smc-tools-1.0.0-glibc.patch
Normal file
22
smc-tools-1.0.0-glibc.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -up smc-tools-1.0.0/ld_pre_smc.c.glibc smc-tools-1.0.0/ld_pre_smc.c
|
||||
--- smc-tools-1.0.0/ld_pre_smc.c.glibc 2018-01-10 11:00:25.000000000 +0100
|
||||
+++ smc-tools-1.0.0/ld_pre_smc.c 2018-01-10 11:01:42.000000000 +0100
|
||||
@@ -20,8 +20,8 @@
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <search.h>
|
||||
+#include <gnu/lib-names.h>
|
||||
|
||||
-#define LIBC_PATH "libc.so.6"
|
||||
#define DLOPEN_FLAG RTLD_LAZY
|
||||
|
||||
#ifndef AF_SMC
|
||||
@@ -97,7 +97,7 @@ static void initialize(void)
|
||||
{
|
||||
set_debug_mode("SMC_DEBUG");
|
||||
|
||||
- dl_handle = dlopen(LIBC_PATH,DLOPEN_FLAG);
|
||||
+ dl_handle = dlopen(LIBC_SO,DLOPEN_FLAG);
|
||||
if (!dl_handle)
|
||||
dbg_msg(stderr, "dlopen failed: %s\n", dlerror());
|
||||
GET_FUNC(socket);
|
27
smc-tools-1.0.0-ldflags.patch
Normal file
27
smc-tools-1.0.0-ldflags.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -up smc-tools-1.0.0/Makefile.ldflags smc-tools-1.0.0/Makefile
|
||||
--- smc-tools-1.0.0/Makefile.ldflags 2017-03-31 12:52:46.000000000 +0200
|
||||
+++ smc-tools-1.0.0/Makefile 2018-01-10 10:04:08.000000000 +0100
|
||||
@@ -49,6 +51,7 @@ endif
|
||||
all: smc_run ld_pre_smc.so ld_pre_smc32.so smcss smc_pnet
|
||||
|
||||
CFLAGS := -Wall -I include -O3 -g
|
||||
+LDFLAGS :=
|
||||
|
||||
ifeq ($(ARCH),s390x)
|
||||
MACHINE_OPT32="-m31"
|
||||
@@ -62,13 +65,13 @@ smc_run: smc_run.in
|
||||
|
||||
ld_pre_smc.so: ld_pre_smc.c
|
||||
${CC} ${CFLAGS} -fPIC -c ld_pre_smc.c
|
||||
- ${CC} -shared ld_pre_smc.o -ldl -Wl,-z,defs -o ld_pre_smc.so
|
||||
+ ${CC} ${LDFLAGS} -shared ld_pre_smc.o -ldl -Wl,-z,defs -o ld_pre_smc.so
|
||||
|
||||
ld_pre_smc32.so: ld_pre_smc.c
|
||||
ifeq ($(ARCH64),1)
|
||||
ifeq ($(STUFF_32BIT),1)
|
||||
${CC} ${CFLAGS} -fPIC -c ${MACHINE_OPT32} ld_pre_smc.c -o ld_pre_smc32.o
|
||||
- ${CC} -shared ld_pre_smc32.o ${MACHINE_OPT32} -ldl -o ld_pre_smc32.so
|
||||
+ ${CC} ${LDFLAGS} -shared ld_pre_smc32.o ${MACHINE_OPT32} -ldl -o ld_pre_smc32.so
|
||||
else
|
||||
$(warning "Warning: Skipping 31/32-bit library build because 31/32-bit \
|
||||
build tools are unavailable. SMC-R will not support 31 and 32 bit TCP \
|
22
smc-tools-1.0.0-no-strip.patch
Normal file
22
smc-tools-1.0.0-no-strip.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -up smc-tools-1.0.0/Makefile.no-strip smc-tools-1.0.0/Makefile
|
||||
--- smc-tools-1.0.0/Makefile.no-strip 2018-01-08 11:40:38.000000000 +0100
|
||||
+++ smc-tools-1.0.0/Makefile 2018-01-08 11:40:53.000000000 +0100
|
||||
@@ -105,14 +105,14 @@ smc_pnet: smc_pnet.c smc.h
|
||||
|
||||
install:
|
||||
install -d -m755 $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man7 $(DESTDIR)$(MANDIR)/man8
|
||||
- install -s $(INSTALL_FLAGS_BIN) ld_pre_smc.so $(DESTDIR)$(LIBDIR)
|
||||
+ install $(INSTALL_FLAGS_BIN) ld_pre_smc.so $(DESTDIR)$(LIBDIR)
|
||||
ifeq ($(STUFF_32BIT),1)
|
||||
install -d -m755 $(DESTDIR)$(LIBDIR32)
|
||||
- install -s $(INSTALL_FLAGS_BIN) ld_pre_smc32.so $(DESTDIR)$(LIBDIR32)/ld_pre_smc.so
|
||||
+ install $(INSTALL_FLAGS_BIN) ld_pre_smc32.so $(DESTDIR)$(LIBDIR32)/ld_pre_smc.so
|
||||
endif
|
||||
install $(INSTALL_FLAGS_BIN) smc_run $(DESTDIR)$(BINDIR)
|
||||
- install -s $(INSTALL_FLAGS_BIN) smcss $(DESTDIR)$(BINDIR)
|
||||
- install -s $(INSTALL_FLAGS_BIN) smc_pnet $(DESTDIR)$(BINDIR)
|
||||
+ install $(INSTALL_FLAGS_BIN) smcss $(DESTDIR)$(BINDIR)
|
||||
+ install $(INSTALL_FLAGS_BIN) smc_pnet $(DESTDIR)$(BINDIR)
|
||||
install $(INSTALL_FLAGS_MAN) af_smc.7 $(DESTDIR)$(MANDIR)/man7
|
||||
install $(INSTALL_FLAGS_MAN) smc_run.8 $(DESTDIR)$(MANDIR)/man8
|
||||
install $(INSTALL_FLAGS_MAN) smc_pnet.8 $(DESTDIR)$(MANDIR)/man8
|
57
smc-tools.spec
Normal file
57
smc-tools.spec
Normal file
@ -0,0 +1,57 @@
|
||||
Name: smc-tools
|
||||
Version: 1.0.0
|
||||
Release: 2%{?dist}
|
||||
Summary: Shared Memory Communication Tools
|
||||
|
||||
License: EPL
|
||||
URL: https://www.ibm.com/developerworks/linux/linux390/smc-tools.html
|
||||
Source0: https://public.dhe.ibm.com/software/dw/linux390/ht_src/%{name}-%{version}.tar.gz
|
||||
# don't strip binaries
|
||||
Patch0: %{name}-1.0.0-no-strip.patch
|
||||
# treat armv7 as 32-bit
|
||||
Patch1: %{name}-1.0.0-arm.patch
|
||||
# use distro LDFLAGS
|
||||
Patch2: %{name}-1.0.0-ldflags.patch
|
||||
# let glibc define libc SO
|
||||
Patch3: %{name}-1.0.0-glibc.patch
|
||||
|
||||
BuildRequires: libnl3-devel
|
||||
|
||||
|
||||
%description
|
||||
The Shared Memory Communication Tools (smc-tools) package enables usage of SMC
|
||||
sockets in Linux.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
|
||||
%build
|
||||
%make_build CFLAGS="-Iinclude %{optflags}" LDFLAGS="%{__global_ldflags}"
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.smctools
|
||||
%{_bindir}/smc_pnet
|
||||
%{_bindir}/smc_run
|
||||
%{_bindir}/smcss
|
||||
%{_libdir}/ld_pre_smc.so
|
||||
%{_mandir}/man7/af_smc.7*
|
||||
%{_mandir}/man8/smc_pnet.8*
|
||||
%{_mandir}/man8/smc_run.8*
|
||||
%{_mandir}/man8/smcss.8*
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 10 2018 Dan Horák <dan@danny.cz> - 1.0.0-2
|
||||
- use make macro
|
||||
- comment patches
|
||||
- use distro LDFLAGS in build
|
||||
|
||||
* Mon Jan 8 2018 Dan Horák <dan@danny.cz> - 1.0.0-1
|
||||
- initial Fedora version
|
Loading…
Reference in New Issue
Block a user