[med-svn] [libncl] 01/02: Set proper sonameversion

Andreas Tille tille at debian.org
Thu Jan 7 14:46:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository libncl.

commit c5cf2d29f7151ae3507b84c09c62bbaa593e33e2
Author: Andreas Tille <tille at debian.org>
Date:   Thu Jan 7 15:43:08 2016 +0100

    Set proper sonameversion
---
 debian/changelog                        |   3 +-
 debian/control                          |   4 +-
 debian/d-shlibmove                      | 296 --------------------------------
 debian/libncl-dev.install               |   5 -
 debian/libncl.install                   |   2 -
 debian/patches/series                   |   1 +
 debian/patches/set_soname_version.patch |  27 +++
 debian/rules                            |   3 +-
 8 files changed, 33 insertions(+), 308 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3b7e436..2bdd421 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,5 @@
 libncl (2.1.18+dfsg-1) UNRELEASED; urgency=low
 
   * Initial release (Closes: #<bug>)
-  TODO: d-shlibs issue
 
- -- Andreas Tille <tille at debian.org>  Sat, 24 Oct 2015 08:47:31 +0200
+ -- Andreas Tille <tille at debian.org>  Thu, 07 Jan 2016 15:41:27 +0100
diff --git a/debian/control b/debian/control
index f09fa3d..26d5a96 100644
--- a/debian/control
+++ b/debian/control
@@ -24,7 +24,7 @@ Description: tools to deal with NEXUS files
  phylogenetic programs such as Paup, MrBayes, Mesquite, and MacClade use
  this format.
 
-Package: libncl
+Package: libncl1
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends},
@@ -43,7 +43,7 @@ Architecture: any
 Section: libdevel
 Depends: ${shlibs:Depends},
          ${misc:Depends},
-         libncl (= ${binary:Version})
+         libncl1 (= ${binary:Version})
 Description: NEXUS Class Library
  The NEXUS Class Library is a C++ library for parsing NEXUS files.
  .
diff --git a/debian/d-shlibmove b/debian/d-shlibmove
deleted file mode 100755
index c124e38..0000000
--- a/debian/d-shlibmove
+++ /dev/null
@@ -1,296 +0,0 @@
-#!/bin/bash
-exit 0
-#   d-shlibmove -- move shared library files around for Debian packaging
-#   Copyright (C) 2002, 2005 Junichi Uekawa
-#
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-# 2002 Apr 23. Created.
-#   automatic packaging of libtool-created library packages.
-
-# from d-shlibs package
-
-set -e
-set -o pipefail
-
-eval "$(dpkg-architecture -s)"
-
-getname() {
-echo getname
-set -x
-	local SONAMELIBNAME
-	local SONAMEVERSION
-	local SONAME
-	SONAME="$1"
-	SONAMELIBNAME=${SONAME/%.so*}
-	SONAMEVERSION=${SONAME/#*.so.}
-	case "$SONAMELIBNAME" in
-	  *[0-9])
-		RETURN="$SONAMELIBNAME-$SONAMEVERSION"
-		;;
-	  *)
-		RETURN="$SONAMELIBNAME$SONAMEVERSION"
-		;;
-	esac
-set +x
-}
-
-readlibnameinfo() {
-echo readlibnameinfo
-set -x
-	LIBNAME="$1"
-
-	if [ -z "$1" ] || ! echo "$1" | grep ".so$" > /dev/null; then
-		echo "$0: [$1] is not a valid shared library file name" >&2
-		exit 1;
-	fi
-
-	if [ ! -h "$1" ]; then
-		echo "$0: expected [$1] to be a symlink, but it is not" >&2
-		exit 1;
-	fi
-
-	SONAME=$(set -o pipefail; "$DEB_HOST_GNU_TYPE-objdump" -p "$LIBNAME" \
-	| sed -n 's/^.*SONAME *//p')
-	getname "$SONAME"
-	SONAMEPKGNAME=$(echo "$RETURN" | tr '[:upper:]_' '[:lower:]-')
-	PK=$(basename "$1" | sed 's/\.so$//')
-	PK_LOWER=$(echo "$PK" | tr '[:upper:]_' '[:lower:]-')
-	REALSO=$(readlink -f "$LIBNAME")
-set +x
-}
-
-check_line() {
-	local PKGNAME="$1"
-	local ENTRYLINE="$2"
-
-	if ! awk '/^Package:.*'"$PKGNAME"'/,/^$/{print}' "$CONTROL" \
-	| perl -0 -pe 's/\n[ \t]+/ /g' \
-	| grep "$ENTRYLINE" > /dev/null; then
-		echo "E: line [$ENTRYLINE] not found in $CONTROL section for $PKGNAME"
-		# set this error signifier to true
-		CHECK_ERROR=true
-	fi
-}
-
-
-echo "Library package automatic movement utility"
-
-CONTROL=debian/control
-
-execscript=$(tempfile)
-INSTALLFILE_SHLPKG=$(tempfile)
-INSTALLFILE_DEVPKG=$(tempfile)
-cat > "$execscript" <<EOF
-set -e
-EOF
-
-EXTRALIBS=()
-SUFFIX=
-DEVSUFFIX=
-TRANSITIONSUFFIX=
-
-DOIT=no
-DEVUNVERSIONED=no
-IGNORELIBDEP=no
-INCLUDEA=yes
-INCLUDELA=yes
-MULTIARCH=no
-while [ -n "$1" ]; do
-	case "$1" in
-	  --moveshl)
-		echo "$2 $3" >> "$INSTALLFILE_SHLPKG"
-		shift; shift; shift;
-		;;
-	  --movedev)
-		echo "$2 $3" >> "$INSTALLFILE_DEVPKG"
-		shift; shift; shift;
-		;;
-	  --movedevdoc)
-		echo "$2 usr/share/doc/\${PKGDEV}" >> "$INSTALLFILE_DEVPKG"
-		shift; shift;
-		;;
-	  --commit)
-		DOIT=yes
-		shift;
-		;;
-	  --multiarch)
-		MULTIARCH=yes
-		shift;
-		;;
-	  --extralib)
-		EXTRALIBS+=("$2")
-		shift; shift;
-		;;
-	  --shlibs-local)
-		shift;
-		SHLIBSLOCALVER="$1";
-		shift;
-		;;
-	  --suffix)
-		shift;
-		SUFFIX="$1";
-		shift;
-		;;
-	  --devsuffix)
-		shift;
-		DEVSUFFIX="$1";
-		shift;
-		;;
-	  --devunversioned)
-		DEVUNVERSIONED=yes
-		shift;;
-	  --ignorelibdep)
-		IGNORELIBDEP=yes
-		shift;;
-	  --c102)
-		TRANSITIONSUFFIX="c102"
-		shift;;
-	  --ldbl)
-		TRANSITIONSUFFIX="ldbl"
-		shift;;
-	  --v5)
-		TRANSITIONSUFFIX="v5"
-		shift;;
-	  --include-a)
-		INCLUDEA=yes
-		shift;;
-	  --exclude-a)
-		INCLUDEA=no
-		shift;;
-	  --include-la)
-		INCLUDELA=yes
-		shift;;
-	  --exclude-la)
-		INCLUDELA=no
-		shift;;
-	  --override)
-		OVERRIDE[${#OVERRIDE[@]}]="$2"
-		shift; shift;;
-	  --|*)
-		break;
-		;;
-	esac
-done
-
-# path/libxxxx.so.yyy.zz.zz
-# ------------------------- REALSO (actual .so filename that is linked to)
-#      -------------- SONAME
-#      -------    --- SONAMEPKGNAME (lowercased for package name)
-# --------------- $1
-#      ---------- PK
-#      ---------- PK_LOWER (lowercased for package name)
-
-DEVLIB_TO_CHECK=()
-for extralib in "${EXTRALIBS[@]}"; do
-	readlibnameinfo "$extralib"
-	DEVLIB_TO_CHECK+=("$extralib")
-	if [ "$INCLUDEA" = "yes" ]; then
-		echo "$(dirname "$extralib")/$PK.a usr/lib" >> "$INSTALLFILE_DEVPKG"
-	fi
-	if [ "$INCLUDELA" = "yes" ]; then
-		echo "$(dirname "$extralib")/$PK.la usr/lib || true" >> "$INSTALLFILE_DEVPKG"
-	fi
-	echo "$(dirname "$extralib")/$PK.so usr/lib" >> "$INSTALLFILE_DEVPKG"
-	echo "$(dirname "$REALSO")/$SONAME usr/lib" >> "$INSTALLFILE_SHLPKG"
-	echo "$REALSO usr/lib" >> "$INSTALLFILE_SHLPKG"
-done
-
-DEVLIB_TO_CHECK+=("$1")
-readlibnameinfo "$1"
-if [ "$DEVUNVERSIONED" = "yes" ]; then
-	PKGDEV="$PK_LOWER$DEVSUFFIX-dev"
-else
-	PKGDEV="$SONAMEPKGNAME$DEVSUFFIX-dev"
-fi
-PKGSHL="$SONAMEPKGNAME$SUFFIX$TRANSITIONSUFFIX"
-
-INSTALLDIR="install -d -m 755"
-echo "$INSTALLDIR debian/$PKGDEV/usr/lib" >> "$execscript"
-echo "$INSTALLDIR debian/$PKGSHL/usr/lib" >> "$execscript"
-if [ "$INCLUDEA" = "yes" ]; then
-	echo "mv $(dirname "$1")/$PK.a debian/$PKGDEV/usr/lib" >> "$execscript"
-fi
-if [ "$INCLUDELA" = "yes" ]; then
-	echo "mv $(dirname "$1")/$PK.la debian/$PKGDEV/usr/lib || true" >> "$execscript"
-fi
-echo "mv $(dirname "$1")/$PK.so debian/$PKGDEV/usr/lib" >> "$execscript"
-echo "mv $(dirname "$REALSO")/$SONAME debian/$PKGSHL/usr/lib" >> "$execscript"
-if [ "$(dirname "$REALSO")/$SONAME" != "$REALSO" ]; then
-	echo "mv $REALSO debian/$PKGSHL/usr/lib" >> "$execscript"
-fi
-if [ -n "$SHLIBSLOCALVER" ]; then
-	echo "echo \"$SONAMELIBNAME $SONAMEVERSION $PKGSHL (>= $SHLIBSLOCALVER)\" >> debian/shlibs.local" >> "$execscript"
-fi
-
-d-devlibdeps "${OVERRIDE[@]/#/--override=}" "debian/$PKGDEV.substvars" "${DEVLIB_TO_CHECK[@]}"
-
-#do some definition for the file.
-echo "PKGDEV=$PKGDEV" >> "$execscript"
-echo "PKGSHL=$PKGSHL" >> "$execscript"
-
-#do the extra files
-while read A B; do
-	echo "$INSTALLDIR debian/$PKGSHL/$B" >> "$execscript"
-	echo "mv $A debian/$PKGSHL/$B" >> "$execscript"
-done < "$INSTALLFILE_SHLPKG"
-if [ "$INCLUDELA" = "no" ]; then
-	sed -i -e "/^.*\.la usr\/lib || true$/d" "$INSTALLFILE_DEVPKG"
-fi
-while read A B; do
-	echo "$INSTALLDIR debian/$PKGDEV/$B" >> "$execscript"
-	echo "mv $A debian/$PKGDEV/$B" >> "$execscript"
-done < "$INSTALLFILE_DEVPKG"
-
-if [ "$MULTIARCH" = "yes" ]; then
-	sed -i -e "s/usr\/lib\( || true\)\?$/usr\/lib\/$DEB_HOST_MULTIARCH\1/" "$execscript"
-fi
-
-cat "$execscript"
-
-# check the syntax of the control file.
-CHECK_ERROR=false
-
-if ! [ "$DEVUNVERSIONED" = "yes" ]; then
-	check_line "$PKGDEV" "Provides:.*$PK_LOWER-dev"
-	check_line "$PKGDEV" "Conflicts:.*$PK_LOWER-dev"
-fi
-check_line "$PKGSHL" "Section: libs"
-if [ -n "$SUFFIX" ]; then
-	check_line "$PKGSHL" "Conflicts: $SONAMEPKGNAME"
-fi
-if [ -n "$TRANSITIONSUFFIX" ]; then
-	check_line "$PKGSHL" "Conflicts: $SONAMEPKGNAME$SUFFIX"
-fi
-check_line "$PKGDEV" "Section: \(devel\|libdevel\)"
-if ! [ "$IGNORELIBDEP" = "yes" ]; then
-	check_line "$PKGDEV" "Depends:.*$PKGSHL"
-fi
-check_line "$PKGSHL" "Depends:.*[$]{shlibs:Depends}"
-
-if [ "$CHECK_ERROR" = "true" ]; then
-	echo "Error occurred, aborting" >&2
-	exit 1
-fi
-
-if [ "$DOIT" = "yes" ]; then
-	sh "$execscript"
-else
-	echo "Dry-run. If you are satisfied, run with --commit"
-	exit 2
-fi
-rm -f "$execscript" "$INSTALLFILE_DEVPKG" "$INSTALLFILE_SHLPKG"
-
-exit 0
diff --git a/debian/libncl-dev.install b/debian/libncl-dev.install
deleted file mode 100755
index d06cea8..0000000
--- a/debian/libncl-dev.install
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/dh-exec
-debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/libncl.so	/usr/lib/${DEB_HOST_MULTIARCH}/
-debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/*.a		/usr/lib/${DEB_HOST_MULTIARCH}/
-debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig	/usr/lib/${DEB_HOST_MULTIARCH}/
-debian/tmp/usr/include					/usr
diff --git a/debian/libncl.install b/debian/libncl.install
deleted file mode 100755
index 4af90d5..0000000
--- a/debian/libncl.install
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/dh-exec
-debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/*[0-9].so	/usr/lib/${DEB_HOST_MULTIARCH}
diff --git a/debian/patches/series b/debian/patches/series
index 9239351..d4d6e17 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix_rpath_issue.patch
+set_soname_version.patch
diff --git a/debian/patches/set_soname_version.patch b/debian/patches/set_soname_version.patch
new file mode 100644
index 0000000..9f03037
--- /dev/null
+++ b/debian/patches/set_soname_version.patch
@@ -0,0 +1,27 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 07 Jan 2016 15:41:27 +0100
+Description: Set proper sonameversion
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,10 @@ AC_PREREQ(2.57)
+ #	Directory that contains install-sh and other auxiliary files
+ AC_CONFIG_AUX_DIR([config])
+ 
++#shared library versioning
++GENERIC_LIBRARY_VERSION=1:0:0
++AC_SUBST(GENERIC_LIBRARY_VERSION)
++
+ ################################################################################
+ #	According to (http://www.mail-archive.com/autoconf@gnu.org/msg14232.html)
+ #		this macro should be after AC_INIT but before AM_INIT_AUTOMAKE
+--- a/ncl/Makefile.am
++++ b/ncl/Makefile.am
+@@ -1,6 +1,6 @@
+ lib_LTLIBRARIES = libncl.la
+ libncl_ladir = $(includedir)/ncl
+-libncl_la_LDFLAGS = -release @PACKAGE_VERSION@
++libncl_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION)
+ 
+ 
+ libncl_la_HEADERS = \
diff --git a/debian/rules b/debian/rules
index efdcd9f..3004993 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,8 @@ override_dh_clean:
 
 override_dh_install:
 	dh_install
-	bash debian/d-shlibmove --commit \
+	# bash debian/
+	d-shlibmove --commit \
 		    --multiarch \
 		    --devunversioned \
 		    --movedev "debian/tmp/usr/include/ncl/*.h" usr/include/ncl \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libncl.git



More information about the debian-med-commit mailing list