initial import
This commit is contained in:
parent
405432b257
commit
3d77a95b61
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
|||||||
|
/srtp-1.4.4-20101004cvs.tar.bz2
|
75
libsrtp-1.4.4-shared.patch
Normal file
75
libsrtp-1.4.4-shared.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
diff -up srtp/Makefile.in.shared srtp/Makefile.in
|
||||||
|
--- srtp/Makefile.in.shared 2010-05-21 13:45:35.000000000 -0400
|
||||||
|
+++ srtp/Makefile.in 2010-10-04 15:53:29.132116130 -0400
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
# runtest runs test applications
|
||||||
|
# test builds test applications
|
||||||
|
# libcrypt.a static library implementing crypto engine
|
||||||
|
-# libsrtp.a static library implementing srtp
|
||||||
|
+# libsrtp.so shared library implementing srtp
|
||||||
|
# clean removes objects, libs, and executables
|
||||||
|
# distribution cleans and builds a .tgz
|
||||||
|
# tags builds etags file from all .c and .h files
|
||||||
|
@@ -97,13 +97,13 @@ kernel = crypto/kernel/crypto_kernel.o
|
||||||
|
|
||||||
|
cryptobj = $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(replay)
|
||||||
|
|
||||||
|
-# libsrtp.a (implements srtp processing)
|
||||||
|
+# libsrtp (implements srtp processing)
|
||||||
|
|
||||||
|
srtpobj = srtp/srtp.o srtp/ekt.o
|
||||||
|
|
||||||
|
-libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi)
|
||||||
|
- ar cr libsrtp.a $^
|
||||||
|
- $(RANLIB) libsrtp.a
|
||||||
|
+libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
|
||||||
|
+ $(COMPILE) -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,$@.0 -z noexecstack -o $@.0.0.0 $^
|
||||||
|
+ ln -s $@.0.0.0 $@
|
||||||
|
|
||||||
|
# libcryptomath.a contains general-purpose routines that are used to
|
||||||
|
# generate tables and verify cryptoalgorithm implementations - this
|
||||||
|
@@ -127,19 +127,19 @@ testapp = $(crypto_testapp) test/srtp_dr
|
||||||
|
test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \
|
||||||
|
test/dtls_srtp_driver$(EXE)
|
||||||
|
|
||||||
|
-$(testapp): libsrtp.a
|
||||||
|
+$(testapp): libsrtp.so
|
||||||
|
|
||||||
|
test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c
|
||||||
|
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
|
||||||
|
+ $(COMPILE) $(LDFLAGS) -o $@ test/rtpw.c test/rtp.c test/getopt_s.c $(LIBS) $(SRTPLIB)
|
||||||
|
|
||||||
|
test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c
|
||||||
|
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
|
||||||
|
+ $(COMPILE) $(LDFLAGS) -o $@ test/srtp_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
|
||||||
|
|
||||||
|
test/rdbx_driver$(EXE): test/rdbx_driver.c test/getopt_s.c
|
||||||
|
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
|
||||||
|
+ $(COMPILE) $(LDFLAGS) -o $@ test/rdbx_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
|
||||||
|
|
||||||
|
test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c
|
||||||
|
- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
|
||||||
|
+ $(COMPILE) $(LDFLAGS) -o $@ test/dtls_srtp_driver.c test/getopt_s.c $(LIBS) $(SRTPLIB)
|
||||||
|
|
||||||
|
test: $(testapp)
|
||||||
|
@echo "Build done. Please run '$(MAKE) runtest' to run self tests."
|
||||||
|
@@ -197,16 +197,16 @@ install:
|
||||||
|
cp $(srcdir)/include/*.h $(DESTDIR)$(includedir)/srtp
|
||||||
|
cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
|
||||||
|
if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
|
||||||
|
- if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
|
||||||
|
+ if [ -f libsrtp.so.0.0.0 ]; then cp libsrtp.so.0.0.0 $(DESTDIR)$(libdir)/; fi
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(includedir)/srtp/*.h
|
||||||
|
- rm -f $(DESTDIR)$(libdir)/libsrtp.a
|
||||||
|
+ rm -f $(DESTDIR)$(libdir)/libsrtp.so*
|
||||||
|
-rmdir $(DESTDIR)$(includedir)/srtp
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
|
||||||
|
- libcryptomath.a libsrtp.a core *.core test/core
|
||||||
|
+ libcryptomath.a libsrtp.so* core *.core test/core
|
||||||
|
for a in * */* */*/*; do \
|
||||||
|
if [ -f "$$a~" ] ; then rm -f $$a~; fi; \
|
||||||
|
done;
|
14
libsrtp.pc
Normal file
14
libsrtp.pc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
prefix=@PREFIX@
|
||||||
|
exec_prefix=@PREFIX@
|
||||||
|
libdir=@LIBDIR@
|
||||||
|
includedir=@INCLUDEDIR@
|
||||||
|
|
||||||
|
Name: libsrtp
|
||||||
|
Description: Secure Real-time Transport Protocol library
|
||||||
|
Version: 1.4.4
|
||||||
|
URL: http://srtp.sourceforge.net
|
||||||
|
Requires:
|
||||||
|
Conflicts:
|
||||||
|
Libs: -L${libdir} -lsrtp
|
||||||
|
Libs.private:
|
||||||
|
Cflags: -I${includedir}/srtp/
|
80
libsrtp.spec
Normal file
80
libsrtp.spec
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
%global shortname srtp
|
||||||
|
%global cvsver 20101004cvs
|
||||||
|
|
||||||
|
Name: lib%{shortname}
|
||||||
|
Version: 1.4.4
|
||||||
|
Release: 1.%{cvsver}%{?dist}
|
||||||
|
Summary: An implementation of the Secure Real-time Transport Protocol (SRTP)
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
License: BSD
|
||||||
|
URL: http://srtp.sourceforge.net
|
||||||
|
# Upstream 1.4.4 tarball is a bit dated, need to use cvs
|
||||||
|
# cvs -d:pserver:anonymous@srtp.cvs.sourceforge.net:/cvsroot/srtp co -P srtp
|
||||||
|
# tar cvfj srtp-1.4.4-20101004cvs.tar.bz2 srtp/
|
||||||
|
Source0: %{shortname}-%{version}-%{cvsver}.tar.bz2
|
||||||
|
# Pkgconfig goodness
|
||||||
|
Source1: libsrtp.pc
|
||||||
|
# Seriously. Who doesn't do shared libs these days?
|
||||||
|
# And how does Chromium always manage to find these projects and use them?
|
||||||
|
Patch0: libsrtp-1.4.4-shared.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package provides an implementation of the Secure Real-time
|
||||||
|
Transport Protocol (SRTP), the Universal Security Transform (UST), and
|
||||||
|
a supporting cryptographic kernel.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: pkgconfig
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{shortname}
|
||||||
|
%patch0 -p1 -b .shared
|
||||||
|
|
||||||
|
# Fix end-of-line encoding
|
||||||
|
sed -i 's/\r//g' doc/draft-irtf-cfrg-icm-00.txt
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS="%{optflags} -fPIC"
|
||||||
|
%configure --disable-static
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=%{buildroot}
|
||||||
|
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||||
|
pushd %{buildroot}%{_libdir}
|
||||||
|
ln -sf libsrtp.so.0.0.0 libsrtp.so
|
||||||
|
ln -sf libsrtp.so.0.0.0 libsrtp.so.0
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Install the pkg-config file
|
||||||
|
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
|
||||||
|
install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
|
||||||
|
# Fill in the variables
|
||||||
|
sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
|
||||||
|
sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
|
||||||
|
sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc CHANGES LICENSE README TODO VERSION doc/*.txt doc/*.pdf
|
||||||
|
%{_libdir}/*.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_includedir}/%{shortname}/
|
||||||
|
%{_libdir}/pkgconfig/libsrtp.pc
|
||||||
|
%{_libdir}/*.so
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Oct 4 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 1.4.4-1.20101004cvs
|
||||||
|
- initial package
|
Loading…
Reference in New Issue
Block a user