packages: srtp/srtp-shared.patch, srtp/srtp.spec, srtp/libsrtp.pc (NEW) - u...

glen glen at pld-linux.org
Thu Jan 6 12:13:47 CET 2011


Author: glen                         Date: Thu Jan  6 11:13:47 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 1.4.4, add .pc support from fedora

---- Files affected:
packages/srtp:
   srtp-shared.patch (1.2 -> 1.3) , srtp.spec (1.5 -> 1.6) , libsrtp.pc (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/srtp/srtp-shared.patch
diff -u packages/srtp/srtp-shared.patch:1.2 packages/srtp/srtp-shared.patch:1.3
--- packages/srtp/srtp-shared.patch:1.2	Thu Aug 24 19:23:39 2006
+++ packages/srtp/srtp-shared.patch	Thu Jan  6 12:13:42 2011
@@ -96,9 +96,20 @@
  	for a in * .* */*; do if [ -f "$$a~" ] ; then rm $$a~; fi; done;
  	rm -f `find . -name "*.[ch]~*~"`
  	rm -rf latex
---- srtp/Makefile.in.orig	2006-03-17 22:00:46.000000000 +0100
-+++ srtp/Makefile.in	2006-07-21 20:44:16.620367000 +0200
-@@ -36,9 +36,9 @@
+--- srtp-1.4.4/Makefile.in~	2010-05-21 20:45:35.000000000 +0300
++++ srtp-1.4.4/Makefile.in	2011-01-06 13:10:25.617052634 +0200
+@@ -7,8 +7,8 @@
+ #
+ # runtest       runs test applications 
+ # test		builds test applications
+-# libcrypt.a	static library implementing crypto engine
+-# libsrtp.a	static library implementing srtp
++# libcrypt.la	library implementing crypto engine
++# libsrtp.la	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
+@@ -38,9 +38,9 @@
  CPPFLAGS= @CPPFLAGS@
  CFLAGS	= @CFLAGS@
  LIBS	= @LIBS@
@@ -110,8 +121,12 @@
  
  RANLIB	= @RANLIB@
  INSTALL	= @INSTALL@
-@@ -67,51 +67,52 @@
- %.o: %.c
+@@ -66,54 +66,55 @@
+ 
+ # implicit rules for object files and test apps
+ 
+-%.o: %.c
++%.lo: %.c
  	$(COMPILE) -c $< -o $@
  
 +%.lo: %.c
@@ -134,7 +149,7 @@
 -hashes  = crypto/hash/null_auth.o crypto/hash/sha1.o \
 -          crypto/hash/hmac.o crypto/hash/auth.o # crypto/hash/tmmhv2.o 
 +hashes  = crypto/hash/null_auth.lo crypto/hash/sha1.lo \
-+          crypto/hash/hmac.lo crypto/hash/auth.lo # crypto/hash/tmmhv2.lo
++          crypto/hash/hmac.lo crypto/hash/auth.lo # crypto/hash/tmmhv2.lo 
  
 -replay  = crypto/replay/rdb.o crypto/replay/rdbx.o               \
 -          crypto/replay/ut_sim.o 
@@ -145,7 +160,7 @@
 +math    = crypto/math/datatypes.lo crypto/math/stat.lo
  
 -ust     = crypto/ust/ust.o 
-+ust     = crypto/ust/ust.lo
++ust     = crypto/ust/ust.lo 
  
 -rng     = crypto/rng/$(RNG_OBJS) crypto/rng/prng.o crypto/rng/ctr_prng.o
 +rng     = crypto/rng/$(RNG_OBJS) crypto/rng/prng.lo crypto/rng/ctr_prng.lo
@@ -163,8 +178,8 @@
 -# libsrtp.a (implements srtp processing)
 +# libsrtp.la (implements srtp processing)
  
--srtpobj = srtp/srtp.o 
-+srtpobj = srtp/srtp.lo 
+-srtpobj = srtp/srtp.o srtp/ekt.o
++srtpobj = srtp/srtp.lo srtp/ekt.lo
  
 -libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi)
 -	ar cr libsrtp.a $^
@@ -172,12 +187,13 @@
 +libsrtp.la: $(srtpobj) $(cryptobj) $(gdoi)
 +	libtool --mode=link --tag=CC $(CC) -o $@ $^ -rpath $(libdir)
  
- # libcryptomath.a contains general-purpose routines that are used to
+-# libcryptomath.a contains general-purpose routines that are used to
++# libcryptomath.la 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 
-+cryptomath = crypto/math/math.lo crypto/math/gf2_8.lo
++cryptomath = crypto/math/math.lo crypto/math/gf2_8.lo 
  
 -libcryptomath.a: $(cryptomath)
 -	ar cr libcryptomath.a $(cryptomath)
@@ -187,20 +203,32 @@
  
  
  # test applications 
-@@ -124,10 +125,10 @@
- testapp = $(crypto_testapp) test/srtp_driver$(EXE) test/replay_driver$(EXE) \
- 	  test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE)
+@@ -127,19 +128,19 @@
+ 	  test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \
+ 	  test/dtls_srtp_driver$(EXE)
  
 -$(testapp): libsrtp.a
 +$(testapp): libsrtp.la
  
- test/rtpw$(EXE): test/rtpw.c test/rtp.c
+ test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c
+-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
++	libtool --mode=link --tag=CC $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ 
+ test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c
+-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
++	libtool --mode=link --tag=CC $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ 
+ test/rdbx_driver$(EXE): test/rdbx_driver.c test/getopt_s.c
+-	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
++	libtool --mode=link --tag=CC $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
+ 
+ test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c
 -	$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
 +	libtool --mode=link --tag=CC $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
  
  test: $(testapp)
  	@echo "Build done. Please run '$(MAKE) runtest' to run self tests."
-@@ -151,8 +152,8 @@
+@@ -163,8 +164,8 @@
  
  # in the tables/ subdirectory, we use libcryptomath instead of libsrtp
  
@@ -211,20 +239,27 @@
  
  # the target 'plot' runs the timing test (test/srtp_driver -t) then
  # uses gnuplot to produce plots of the results - see the script file
-@@ -184,15 +185,15 @@
+@@ -194,19 +195,19 @@
+ 	fi
+ 	$(INSTALL) -d $(DESTDIR)$(includedir)/srtp
  	$(INSTALL) -d $(DESTDIR)$(libdir)
- 	cp include/*.h $(DESTDIR)$(includedir)/srtp  
- 	cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp
+-	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
++	cp -p $(srcdir)/include/*.h $(DESTDIR)$(includedir)/srtp  
++	cp -p $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
++	if [ "$(srcdir)" != "." ]; then cp -p crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
 +	libtool --mode=install install libsrtp.la $(DESTDIR)$(libdir)
  
  uninstall:
- 	rm -rf $(DESTDIR)$(includedir)/srtp
--	rm -rf $(DESTDIR)$(libdir)/libsrtp.a
-+	rm -rf $(DESTDIR)$(libdir)/libsrtp.*
+ 	rm -f $(DESTDIR)$(includedir)/srtp/*.h
+-	rm -f $(DESTDIR)$(libdir)/libsrtp.a
++	rm -f $(DESTDIR)$(libdir)/libsrtp.*
+ 	-rmdir $(DESTDIR)$(includedir)/srtp
  
  clean:
- 	rm -rf $(cryptobj) $(srtpobj) $(cryptomath) $(table_apps) TAGS \
+ 	rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \
 -        libcryptomath.a libsrtp.a core *.core test/core
 +        libcryptomath.la libsrtp.la core *.core test/core
  	for a in * */* */*/*; do			\

================================================================
Index: packages/srtp/srtp.spec
diff -u packages/srtp/srtp.spec:1.5 packages/srtp/srtp.spec:1.6
--- packages/srtp/srtp.spec:1.5	Mon Jul 28 01:05:28 2008
+++ packages/srtp/srtp.spec	Thu Jan  6 12:13:42 2011
@@ -1,19 +1,30 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	static_libs	# don't build static libraries
+
 Summary:	Open-source implementation of Secure Real-time Transport Protocol
 Summary(pl.UTF-8):	Otwarta implementacja protokołu Secure Real-time Transport Protocol
 Name:		srtp
-Version:	1.4.2
-Release:	3
+Version:	1.4.4
+Release:	1
 License:	BSD
 Group:		Libraries
-Source0:	http://srtp.sourceforge.net/%{name}-%{version}.tgz
-# Source0-md5:	7b0ffbfad9bbaf33d397027e031cb35a
+# Source0:	http://srtp.sourceforge.net/%{name}-%{version}.tgz
+# Upstream 1.4.4 tarball is a bit dated, need to use cvs
+# cvs -d:pserver:anonymous at srtp.cvs.sourceforge.net:/cvsroot/srtp co -P srtp
+# tar cvfj srtp-1.4.4-20101004cvs.tar.bz2 srtp/
+Source0:	%{name}-%{version}-20101004cvs.tar.bz2
+# Source0-md5:	160479555f5e95027ad318605c1c670c
 Patch0:		%{name}-shared.patch
+Source1:	lib%{name}.pc
 URL:		http://srtp.sourceforge.net/srtp.html
 BuildRequires:	autoconf
 BuildRequires:	libtool
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		specflags	-fPIC
+
 %description
 The libSRTP library is an open-source implementation of Secure
 Real-time Transport Protocol (SRTP).
@@ -47,21 +58,32 @@
 Statyczna biblioteka SRTP.
 
 %prep
-%setup -q -n srtp
+%setup -q -n %{name}
 %patch0 -p1
 
 %build
 %{__autoconf}
 %{__autoheader}
-%configure
+%configure \
+	%{?with_static_libs:--disable-static}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
+ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libsrtp.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libsrtp.so
+
+# Install the pkg-config file
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+sed -e "
+	s|@PREFIX@|%{_prefix}|g
+	s|@LIBDIR@|%{_libdir}|g
+	s|@INCLUDEDIR@|%{_includedir}|g
+" < %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libsrtp.pc
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -71,18 +93,22 @@
 %files
 %defattr(644,root,root,755)
 %doc CHANGES LICENSE README TODO
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%attr(755,root,root) %{_libdir}/libsrtp.so.*.*.*
+%ghost %{_libdir}/libsrtp.so.0
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/{crypto_kernel.txt,intro.txt,references.txt,draft-irtf-cfrg-icm-00.txt,libsrtp.pdf}
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
+%attr(755,root,root) %{_libdir}/libsrtp.so
+%{_pkgconfigdir}/libsrtp.pc
+%{_libdir}/libsrtp.la
 %{_includedir}/srtp
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libsrtp.a
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -90,6 +116,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2011/01/06 11:13:42  glen
+- up to 1.4.4, add .pc support from fedora
+
 Revision 1.5  2008/07/27 23:05:28  arekm
 - release 3
 

================================================================
Index: packages/srtp/libsrtp.pc
diff -u /dev/null packages/srtp/libsrtp.pc:1.1
--- /dev/null	Thu Jan  6 12:13:47 2011
+++ packages/srtp/libsrtp.pc	Thu Jan  6 12:13:42 2011
@@ -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/
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/srtp/srtp-shared.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/srtp/srtp.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list