New package: libsrtp-1.4.4

This commit is contained in:
ojab 2013-04-21 22:28:15 +04:00
parent bd7e85b5f6
commit 7adc656ddd
5 changed files with 130 additions and 0 deletions

View File

@ -1230,3 +1230,4 @@ libdotconf.so.0 dotconf-1.3_1
libspeechd.so.2 speech-dispatcher-0.8_1
libre2.so.0 re2-20130115_1
libminizip.so.1 minizip-1.2.7_1
libsrtp.so.0 libsrtp-1.4.4_1

1
srcpkgs/libsrtp-devel Symbolic link
View File

@ -0,0 +1 @@
libsrtp/

View 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/

View File

@ -0,0 +1,75 @@
diff -up srtp/Makefile.in.shared srtp/Makefile.in
--- Makefile.in.shared 2010-05-21 13:45:35.000000000 -0400
+++ 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;

39
srcpkgs/libsrtp/template Normal file
View File

@ -0,0 +1,39 @@
# Template build file for 'libsrtp'.
pkgname=libsrtp
version=1.4.4
revision=1
build_style=gnu-configure
wrksrc=srtp
short_desc="Library implementing SRTP, the Secure Real-time Transport Protocol"
long_desc="libsrtp is a library implementing Secure RTP, the Secure Real-time
Transport Protocol. RTP is used for Voice over IP (VoIP) as well as audio and
video streaming; SRTP adds confidentialtiy and authentication."
maintainer="ojab <ojab@ojab.ru>"
license="BSD"
homepage="http://sourceforge.net/projects/srtp/"
checksum=ac91a00c4eed0c111a94dfa5295a32af82cdd26c1c7f58f317b1062f0beb923b
#Use fedora's cvs checkout for the good
distfiles="http://pkgs.fedoraproject.org/repo/pkgs/libsrtp/srtp-1.4.4-20101004cvs.tar.bz2/160479555f5e95027ad318605c1c670c/srtp-1.4.4-20101004cvs.tar.bz2"
XBPS_CFLAGS+=" -fPIC"
post_install() {
vinstall ${FILESDIR}/libsrtp.pc 644 usr/lib/pkgconfig
ln -sf libsrtp.so.0.0.0 ${DESTDIR}/usr/lib/libsrtp.so
ln -sf libsrtp.so.0.0.0 ${DESTDIR}/usr/lib/libsrtp.so.0
}
libsrtp_package() {
pkg_install() {
vmove all
}
}
libsrtp-devel_package() {
short_desc="${short_desc} -- development files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
}
}