From 8a67c4cf2221390f49b76cb0944ab9f61269fcf5 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 18 Jul 2013 14:44:59 +0000 Subject: main/libsrtp: moved from testing --- main/libsrtp/APKBUILD | 47 +++++++++++++++++++++++++++ main/libsrtp/libsrtp-1.4.4-shared.patch | 52 ++++++++++++++++++++++++++++++ testing/libsrtp/APKBUILD | 47 --------------------------- testing/libsrtp/libsrtp-1.4.4-shared.patch | 52 ------------------------------ 4 files changed, 99 insertions(+), 99 deletions(-) create mode 100644 main/libsrtp/APKBUILD create mode 100644 main/libsrtp/libsrtp-1.4.4-shared.patch delete mode 100644 testing/libsrtp/APKBUILD delete mode 100644 testing/libsrtp/libsrtp-1.4.4-shared.patch diff --git a/main/libsrtp/APKBUILD b/main/libsrtp/APKBUILD new file mode 100644 index 0000000000..2043cc1cb9 --- /dev/null +++ b/main/libsrtp/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Natanael Copa +# Maintainer: Natanael Copa +pkgname=libsrtp +pkgver=1.4.4 +pkgrel=0 +pkgdesc="An implementation of the Secure Real-time Transport Protocol (SRTP)" +url="http://srtp.sourceforge.net" +arch="all" +license="BSD" +depends="" +depends_dev="" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-dev" +source="http://downloads.sourceforge.net/project/srtp/srtp/$pkgver/srtp-$pkgver.tgz + libsrtp-1.4.4-shared.patch" + +_builddir="$srcdir"/srtp +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + || return 1 + make || return 1 + make libsrtp.so +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="9b449edb011c934ca97009e7e0566d22 srtp-1.4.4.tgz +9c1a70a44c3a12e693c56251b70cc1bb libsrtp-1.4.4-shared.patch" diff --git a/main/libsrtp/libsrtp-1.4.4-shared.patch b/main/libsrtp/libsrtp-1.4.4-shared.patch new file mode 100644 index 0000000000..43b8843603 --- /dev/null +++ b/main/libsrtp/libsrtp-1.4.4-shared.patch @@ -0,0 +1,52 @@ +--- srtp/Makefile.in ++++ srtp/Makefile.in +@@ -65,11 +65,11 @@ + + + # implicit rules for object files and test apps + + %.o: %.c +- $(COMPILE) -c $< -o $@ ++ $(COMPILE) -fPIC -c $< -o $@ + + %$(EXE): %.c + $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) + + +@@ -103,10 +103,16 @@ + + libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi) + ar cr libsrtp.a $^ + $(RANLIB) libsrtp.a + ++libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi) ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.1 -o libsrtp.so.1.0 $^ ++ ++libsrtp.dylib: $(srtpobj) $(cryptobj) $(gdoi) ++ $(CC) $(LDFLAGS) -dynamiclib -install_name $(libdir)/libsrtp.1.dylib -o libsrtp.1.0.dylib $^ ++ + # libcryptomath.a contains general-purpose routines that are used to + # generate tables and verify cryptoalgorithm implementations - this + # library is not meant to be included in production code + + cryptomath = crypto/math/math.o crypto/math/gf2_8.o +@@ -195,10 +198,20 @@ + $(INSTALL) -d $(DESTDIR)$(includedir)/srtp + $(INSTALL) -d $(DESTDIR)$(libdir) + cp include/*.h $(DESTDIR)$(includedir)/srtp + cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp + if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi ++ if [ -f libsrtp.so.1.0 ]; then \ ++ cp libsrtp.so.1.0 $(DESTDIR)$(libdir)/; \ ++ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so.1; \ ++ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so; \ ++ fi ++ if [ -f libsrtp.1.0.dylib ]; then \ ++ cp libsrtp.1.0.dylib $(DESTDIR)$(libdir)/; \ ++ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.1.dylib; \ ++ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.dylib; \ ++ fi + + uninstall: + rm -rf $(DESTDIR)$(includedir)/srtp + rm -rf $(DESTDIR)$(libdir)/libsrtp.a diff --git a/testing/libsrtp/APKBUILD b/testing/libsrtp/APKBUILD deleted file mode 100644 index 2043cc1cb9..0000000000 --- a/testing/libsrtp/APKBUILD +++ /dev/null @@ -1,47 +0,0 @@ -# Contributor: Natanael Copa -# Maintainer: Natanael Copa -pkgname=libsrtp -pkgver=1.4.4 -pkgrel=0 -pkgdesc="An implementation of the Secure Real-time Transport Protocol (SRTP)" -url="http://srtp.sourceforge.net" -arch="all" -license="BSD" -depends="" -depends_dev="" -makedepends="$depends_dev" -install="" -subpackages="$pkgname-dev" -source="http://downloads.sourceforge.net/project/srtp/srtp/$pkgver/srtp-$pkgver.tgz - libsrtp-1.4.4-shared.patch" - -_builddir="$srcdir"/srtp -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - || return 1 - make || return 1 - make libsrtp.so -} - -package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 -} - -md5sums="9b449edb011c934ca97009e7e0566d22 srtp-1.4.4.tgz -9c1a70a44c3a12e693c56251b70cc1bb libsrtp-1.4.4-shared.patch" diff --git a/testing/libsrtp/libsrtp-1.4.4-shared.patch b/testing/libsrtp/libsrtp-1.4.4-shared.patch deleted file mode 100644 index 43b8843603..0000000000 --- a/testing/libsrtp/libsrtp-1.4.4-shared.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- srtp/Makefile.in -+++ srtp/Makefile.in -@@ -65,11 +65,11 @@ - - - # implicit rules for object files and test apps - - %.o: %.c -- $(COMPILE) -c $< -o $@ -+ $(COMPILE) -fPIC -c $< -o $@ - - %$(EXE): %.c - $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) - - -@@ -103,10 +103,16 @@ - - libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi) - ar cr libsrtp.a $^ - $(RANLIB) libsrtp.a - -+libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi) -+ $(CC) $(LDFLAGS) -shared -Wl,-soname,libsrtp.so.1 -o libsrtp.so.1.0 $^ -+ -+libsrtp.dylib: $(srtpobj) $(cryptobj) $(gdoi) -+ $(CC) $(LDFLAGS) -dynamiclib -install_name $(libdir)/libsrtp.1.dylib -o libsrtp.1.0.dylib $^ -+ - # libcryptomath.a contains general-purpose routines that are used to - # generate tables and verify cryptoalgorithm implementations - this - # library is not meant to be included in production code - - cryptomath = crypto/math/math.o crypto/math/gf2_8.o -@@ -195,10 +198,20 @@ - $(INSTALL) -d $(DESTDIR)$(includedir)/srtp - $(INSTALL) -d $(DESTDIR)$(libdir) - cp include/*.h $(DESTDIR)$(includedir)/srtp - cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp - if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi -+ if [ -f libsrtp.so.1.0 ]; then \ -+ cp libsrtp.so.1.0 $(DESTDIR)$(libdir)/; \ -+ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so.1; \ -+ ln -s libsrtp.so.1.0 $(DESTDIR)$(libdir)/libsrtp.so; \ -+ fi -+ if [ -f libsrtp.1.0.dylib ]; then \ -+ cp libsrtp.1.0.dylib $(DESTDIR)$(libdir)/; \ -+ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.1.dylib; \ -+ ln -s libsrtp.1.0.dylib $(DESTDIR)$(libdir)/libsrtp.dylib; \ -+ fi - - uninstall: - rm -rf $(DESTDIR)$(includedir)/srtp - rm -rf $(DESTDIR)$(libdir)/libsrtp.a -- cgit v1.2.3