* debian/libapt-inst1.5.symbols:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 2 May 2012 17:20:56 +0000 (19:20 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 2 May 2012 17:20:56 +0000 (19:20 +0200)
  - use the correct library name the symbols header

debian/changelog
debian/libapt-inst1.5.symbols
prepare-release

index 34d6991..d77de1b 100644 (file)
@@ -24,8 +24,10 @@ apt (0.9.3) unstable; urgency=low
   * edsp/edspsystem.cc:
     - check with RealFileExists for scenario file as otherwise a directory
       like one provided with RootDir triggers the usage of EDSP
+  * debian/libapt-inst1.5.symbols:
+    - use the correct library name the symbols header
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 23 Apr 2012 22:02:58 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 02 May 2012 19:18:51 +0200
 
 apt (0.9.2) unstable; urgency=low
 
index cade099..8fcd29a 100644 (file)
@@ -1,4 +1,4 @@
-libapt-inst.so.1.4 libapt-inst1.4 #MINVER#
+libapt-inst.so.1.5 libapt-inst1.5 #MINVER#
 * Build-Depends-Package: libapt-pkg-dev
  (c++)"ExtractTar::Done(bool)@Base" 0.8.0
  (c++)"ExtractTar::Go(pkgDirStream&)@Base" 0.8.0
index e02157b..fd98c48 100755 (executable)
@@ -4,6 +4,23 @@ VERSION=$(dpkg-parsechangelog | sed -n -e '/^Version:/s/^Version: //p')
 DISTRIBUTION=$(dpkg-parsechangelog | sed -n -e '/^Distribution:/s/^Distribution: //p')
 
 if [ "$1" = 'pre-export' ]; then
+       libraryversioncheck() {
+               LIBRARY="$1"
+               VERSION="$2"
+               if [ ! -e "debian/${LIBRARY}${VERSION}.symbols" ]; then
+                  echo >&2 "Library ${LIBRARY} in version ${VERSION} has no symbols file! (maybe forgot to rename?)"
+                  exit 1
+               fi
+               if [ "$(head -n1 "debian/${LIBRARY}${VERSION}.symbols")" != "${LIBRARY}.so.${VERSION} ${LIBRARY}${VERSION} #MINVER#" ]; then
+                  echo >&2 "Library ${LIBRARY}${VERSION} has incorrect version in symbol header! (»$(head -n1 "debian/${LIBRARY}${VERSION}.symbols")«)"
+                  exit 2
+               fi
+       }
+
+       libraryversioncheck 'libapt-pkg' "$(awk -v ORS='.' '/^\#define APT_PKG_M/ {print $3}' apt-pkg/init.h | sed 's/\.$//')"
+       libraryversioncheck 'libapt-inst' "$(egrep '^MAJOR=' apt-inst/makefile |cut -d '=' -f 2)"
+
+
        if [ "$DISTRIBUTION" = 'sid' ]; then
                echo >&2 '»sid« is not a valid distribution. Replace it with »unstable« for you'
                sed -i -e 's/) sid; urgency=/) unstable; urgency=/' debian/changelog