fix shared library generation

This commit is contained in:
Tom Callaway 2016-02-12 09:39:35 -05:00
parent 3ceba545e7
commit 983855ffce
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,36 @@
diff -up libsrtp-1.5.4/Makefile.in.sharedfix libsrtp-1.5.4/Makefile.in
--- libsrtp-1.5.4/Makefile.in.sharedfix 2016-02-02 14:56:49.000000000 -0500
+++ libsrtp-1.5.4/Makefile.in 2016-02-12 09:38:18.228208296 -0500
@@ -84,12 +84,14 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsrtp.pc
endif
-SHAREDLIBVERSION = 1
+SHAREDLIBMINIVER = 1
+SHAREDLIBVERSION = $(SHAREDLIBMINIVER).0.0
ifeq (linux,$(findstring linux,@host@))
SHAREDLIB_DIR = $(libdir)
-SHAREDLIB_LDFLAGS = -shared -Wl,-soname,$@
SHAREDLIBSUFFIXNOVER = so
SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBVERSION)
+SHAREDLIBMINISUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBMINIVER)
+SHAREDLIB_LDFLAGS = -shared -Wl,-soname,libsrtp.$(SHAREDLIBMINISUFFIX)
else ifeq (mingw,$(findstring mingw,@host@))
SHAREDLIB_DIR = $(bindir)
SHAREDLIB_LDFLAGS = -shared -Wl,--out-implib,libsrtp.dll.a
@@ -148,6 +150,7 @@ libsrtp.$(SHAREDLIBSUFFIX): $(srtpobj) $
$(CC) -shared -o $@ $(SHAREDLIB_LDFLAGS) \
$^ $(LDFLAGS) $(LIBS)
if [ -n "$(SHAREDLIBVERSION)" ]; then \
+ ln -sfn $@ libsrtp.$(SHAREDLIBMINISUFFIX); \
ln -sfn $@ libsrtp.$(SHAREDLIBSUFFIXNOVER); \
fi
@@ -274,6 +277,7 @@ install:
$(INSTALL) -d $(DESTDIR)$(SHAREDLIB_DIR); \
cp libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/; \
ln -sfn libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp.$(SHAREDLIBSUFFIXNOVER); \
+ ln -sfn libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp.$(SHAREDLIBMINISUFFIX); \
fi
if [ "$(pkgconfig_DATA)" != "" ]; then \
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir); \

View File

@ -2,7 +2,7 @@
Name: libsrtp
Version: 1.5.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: An implementation of the Secure Real-time Transport Protocol (SRTP)
Group: System Environment/Libraries
License: BSD
@ -12,6 +12,8 @@ Source0: https://github.com/cisco/libsrtp/archive/v%{version}.tar.gz
Source1: libsrtp.pc
# Universal config.h
Source2: config.h
# Fix shared lib so ldconfig doesn't complain
Patch0: libsrtp-1.5.4-shared-fix.patch
Patch1: libsrtp-srtp_aes_encrypt.patch
Patch2: libsrtp-sha1-name-fix.patch
Patch3: libsrtp-fix-name-collision-on-MIPS.patch
@ -33,6 +35,7 @@ developing applications that use %{name}.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .sharedfix
%patch1 -p1 -b .srtp_aes_encrypt
%patch2 -p1 -b .sha1-name-fix
%patch3 -p1 -b .mips-name-fix
@ -78,6 +81,9 @@ cp -a %{SOURCE2} %{buildroot}%{_includedir}/%{shortname}/config.h
%{_libdir}/*.so
%changelog
* Fri Feb 12 2016 Tom Callaway <spot@fedoraproject.org> - 1.5.4-2
- fix shared lib generation to silence ldconfig
* Thu Feb 11 2016 Tom Callaway <spot@fedoraproject.org> - 1.5.4-1
- update to 1.5.4
- fix MIPS name collision (bz1305950 ) Thanks to Michal Toman