[SCM] gpac/master: Introduce traditional soname versioning.

ceros-guest at users.alioth.debian.org ceros-guest at users.alioth.debian.org
Fri Oct 29 20:59:12 UTC 2010


The following commit has been merged in the master branch:
commit 8701daa4604bb65631c506604c1ffffe8e197071
Author: Andres Mejia <mcitadel at gmail.com>
Date:   Fri Oct 29 16:58:29 2010 -0400

    Introduce traditional soname versioning.

diff --git a/debian/control b/debian/control
index c1e139b..d53ba6c 100644
--- a/debian/control
+++ b/debian/control
@@ -48,7 +48,7 @@ Description: GPAC Project on Advanced Content - utilities
    - MP4Client (content packaging)
    - Osmo4  (content playing)
 
-Package: libgpac0.4.6-dev0
+Package: libgpac1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -66,7 +66,7 @@ Description: GPAC Project on Advanced Content - shared libraries
 Package: libgpac-dev
 Architecture: any
 Section: libdevel
-Depends: libgpac0.4.6-dev0 (= ${binary:Version}), ${misc:Depends}
+Depends: libgpac1 (= ${binary:Version}), ${misc:Depends}
 Replaces: gpac (<= 0.4.2~rc2-0ubuntu1)
 Description: GPAC Project on Advanced Content - development headers
  The main development goal is to provide a clean (a.k.a. readable by as many
diff --git a/debian/libgpac0.4.6-dev0.install b/debian/libgpac1.install
similarity index 100%
rename from debian/libgpac0.4.6-dev0.install
rename to debian/libgpac1.install
diff --git a/debian/patches/soname-fix.patch b/debian/patches/soname-fix.patch
index 103dd42..564ba18 100644
--- a/debian/patches/soname-fix.patch
+++ b/debian/patches/soname-fix.patch
@@ -2,45 +2,96 @@ Patch to fix SONAME field in library.
 ==========================================================================
 --- a/configure
 +++ b/configure
-@@ -2085,6 +2085,7 @@
+@@ -1714,6 +1714,10 @@
+ 
+ 
+ version=`grep '#define GPAC_VERSION ' $source_path/include/gpac/tools.h | cut -d '"' -f 2`
++version_major=`grep '#define GPAC_VERSION_MAJOR ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
++version_minor=`grep '#define GPAC_VERSION_MINOR ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
++version_micro=`grep '#define GPAC_VERSION_MICRO ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
++soname_version="${version_major}.${version_minor}.${version_micro}"
+ echo ""
+ echo "** System Configuration"
+ echo "Install prefix: $prefix"
+@@ -2043,6 +2047,9 @@
+ fi
+ echo "EXTRALIBS=$extralibs" >> config.mak
+ echo "VERSION=$version" >>config.mak
++echo "VERSION_MAJOR=$version_major" >>config.mak
++echo "VERSION_MINOR=$version_minor" >>config.mak
++echo "VERSION_MICRO=$version_micro" >>config.mak
+ 
+ if test "$use_fixed_point" = "yes"; then
+ echo "#define GPAC_FIXED_POINT" >> $TMPH
+@@ -2085,6 +2092,7 @@
  fi
  
  if test "$win32" = "no" ; then
-+	DYN_LIB_SUFFIX="${DYN_LIB_SUFFIX}.${version}"
++	DYN_LIB_SUFFIX="${DYN_LIB_SUFFIX}.${soname_version}"
  	echo "GPAC_SH_FLAGS=$GPAC_SH_FLAGS" >> config.mak
  	echo "DYN_LIB_SUFFIX=$DYN_LIB_SUFFIX" >> config.mak
  else
 --- a/Makefile
 +++ b/Makefile
-@@ -92,8 +92,8 @@
+@@ -92,8 +92,9 @@
  	$(INSTALL) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(VERSION).$(DYN_LIB_SUFFIX)
  	ln -sf libgpac.$(VERSION).$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
  else
 -	$(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX).$(VERSION)
 -	ln -sf libgpac.$(DYN_LIB_SUFFIX).$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
 +	$(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX)
++	ln -sf libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so.$(VERSION_MAJOR)
 +	ln -sf libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so
  ifeq ($(DESTDIR)$(prefix),$(prefix))
  	ldconfig || true
  endif
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -209,6 +209,9 @@
+@@ -168,7 +168,7 @@
+ EXTRALIBS+=$(GPAC_SH_FLAGS)
+ endif
+ 
+-LD_SONAME="-Wl,-soname,$(LIB)"
++LD_SONAME="-Wl,-soname,libgpac.so.$(VERSION_MAJOR)"
+ ifeq ($(CONFIG_DARWIN), yes)
+ LD_SONAME=
+ endif
+@@ -209,6 +209,10 @@
  	ar cr ../bin/gcc/libgpac_static.a $(OBJS)
  	ranlib ../bin/gcc/libgpac_static.a
  	$(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o ../bin/gcc/$@ $(OBJS) $(EXTRALIBS)
 +ifeq (,$(findstring yes, $(CONFIG_DARWIN) $(CONFIG_WIN32)))
++	ln -sf $@ ../bin/gcc/libgpac.so.$(VERSION_MAJOR)
 +	ln -sf $@ ../bin/gcc/libgpac.so
 +endif
  endif
  
  dep: depend
-@@ -219,7 +222,7 @@
+@@ -219,7 +223,8 @@
  
  clean: 
  	rm -f $(OBJS) ../bin/gcc/$(LIB)
 -	rm -rf ../bin/gcc/libgpac_static.a
-+	rm -rf ../bin/gcc/libgpac_static.a ../bin/gcc/libgpac.so
++	rm -rf ../bin/gcc/libgpac_static.a ../bin/gcc/libgpac.so \
++		../bin/gcc/libgpac.so.$(VERSION_MAJOR)
  
  distclean: clean
  	rm -f Makefile.bak .depend
+--- a/include/gpac/tools.h
++++ b/include/gpac/tools.h
+@@ -57,8 +57,13 @@
+  *
+  *	Macro giving GPAC version expressed as a printable string
+ */
+-/*KEEP SPACE SEPARATORS FOR MAKE / GREP (SEE MAIN MAKEFILE)!!!, and NO SPACE in GPAC_VERSION for proper install*/
+-#define GPAC_VERSION       "0.4.6-DEV"
++/* KEEP SPACE SEPARATORS FOR MAKE / GREP (SEE MAIN MAKEFILE)!!!
++ * SONAME versions must be digits (not strings)
++ */
++#define GPAC_VERSION          "0.4.6-DEV"
++#define GPAC_VERSION_MAJOR    1
++#define GPAC_VERSION_MINOR    0
++#define GPAC_VERSION_MICRO    0
+ 
+ #define GPAC_INTERNAL_REV	"8"
+ #define GPAC_FULL_VERSION       GPAC_VERSION" (internal rev. "GPAC_INTERNAL_REV")"

-- 
gpac packaging



More information about the pkg-multimedia-commits mailing list