[pkg-boost-commits] r14170 - boost/trunk/debian
smr at alioth.debian.org
smr at alioth.debian.org
Sat Mar 22 16:10:21 UTC 2008
Author: smr
Date: 2008-03-22 16:10:20 +0000 (Sat, 22 Mar 2008)
New Revision: 14170
Added:
boost/trunk/debian/libboost-dbg.postinst
boost/trunk/debian/libboost-dbg.prerm
boost/trunk/debian/libboost-python-dev.postinst
boost/trunk/debian/libboost-python-dev.prerm
boost/trunk/debian/rtupdate
Modified:
boost/trunk/debian/changelog
Log:
Add scripts to add/remove symlinks for link libraries appropriate
for the default Python runtime version.
Modified: boost/trunk/debian/changelog
===================================================================
--- boost/trunk/debian/changelog 2008-03-22 15:53:13 UTC (rev 14169)
+++ boost/trunk/debian/changelog 2008-03-22 16:10:20 UTC (rev 14170)
@@ -32,8 +32,14 @@
debian/rtupdate files, ensure the -py24 and -py25 libraries are
installed and remove those without suffices. Remove unnecessary use
of dh_python.
+ * debian/rtupdate: New. Updates or removes symlinks for link libraries,
+ depending on the default Python runtime version.
+ * debian/libboost-dbg.postinst: New. Call rtupdate to create symlinks.
+ * debian/libboost-python-dev.postinst: New. Call rtupdate to create symlinks.
+ * debian/libboost-dbg.prerm: New. Call rtupdate to remove symlinks.
+ * debian/libboost-python-dev.prerm: New. Call rtupdate to remove symlinks.
- -- Steve M. Robbins <smr at debian.org> Sat, 22 Mar 2008 10:25:19 -0500
+ -- Steve M. Robbins <smr at debian.org> Sat, 22 Mar 2008 11:09:14 -0500
boost (1.34.1-7) unstable; urgency=low
Added: boost/trunk/debian/libboost-dbg.postinst
===================================================================
--- boost/trunk/debian/libboost-dbg.postinst (rev 0)
+++ boost/trunk/debian/libboost-dbg.postinst 2008-03-22 16:10:20 UTC (rev 14170)
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+set -e
+
+update=/usr/share/python/runtime.d/libboost-dbg.rtupdate
+
+which pyversions >/dev/null \
+ && $update rtupdate none $(pyversions -d)
+
+#DEBHELPER#
+
Added: boost/trunk/debian/libboost-dbg.prerm
===================================================================
--- boost/trunk/debian/libboost-dbg.prerm (rev 0)
+++ boost/trunk/debian/libboost-dbg.prerm 2008-03-22 16:10:20 UTC (rev 14170)
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+set -e
+
+update=/usr/share/python/runtime.d/libboost-dbg.rtupdate
+
+$update remove
+
+#DEBHELPER#
+
Added: boost/trunk/debian/libboost-python-dev.postinst
===================================================================
--- boost/trunk/debian/libboost-python-dev.postinst (rev 0)
+++ boost/trunk/debian/libboost-python-dev.postinst 2008-03-22 16:10:20 UTC (rev 14170)
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+set -e
+
+update=/usr/share/python/runtime.d/libboost-python-dev.rtupdate
+
+which pyversions >/dev/null \
+ && $update rtupdate none $(pyversions -d)
+
+#DEBHELPER#
+
Added: boost/trunk/debian/libboost-python-dev.prerm
===================================================================
--- boost/trunk/debian/libboost-python-dev.prerm (rev 0)
+++ boost/trunk/debian/libboost-python-dev.prerm 2008-03-22 16:10:20 UTC (rev 14170)
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+set -e
+
+update=/usr/share/python/runtime.d/libboost-python-dev.rtupdate
+
+$update remove
+
+#DEBHELPER#
+
Added: boost/trunk/debian/rtupdate
===================================================================
--- boost/trunk/debian/rtupdate (rev 0)
+++ boost/trunk/debian/rtupdate 2008-03-22 16:10:20 UTC (rev 14170)
@@ -0,0 +1,73 @@
+#! /bin/sh
+#
+# Update link-library symlinks after a Python default runtime change
+
+set -e
+
+version=1_34_1
+
+die() {
+ echo "$@" >&2
+ exit 1
+}
+
+update_linklibs() {
+ py=$1
+ suf=$2
+
+ cd /usr/lib
+ for thread in "" -mt; do
+ for gcc in gcc41 gcc42; do
+ ln -s -f libboost_python-${gcc}${thread}${debug}-${version}-${py}.${suf} \
+ libboost_python-${gcc}${thread}${debug}-${version}.${suf}
+ done
+ ln -s -f libboost_python${thread}${debug}-${py}.${suf} \
+ libboost_python${thread}${debug}.${suf}
+ done
+}
+
+remove_linklibs() {
+ suf=$1
+
+ cd /usr/lib
+ for thread in "" -mt; do
+ for gcc in gcc41 gcc42; do
+ rm -f libboost_python-${gcc}${thread}${debug}-${version}.${suf}
+ done
+ rm -f libboost_python${thread}${debug}.${suf}
+ done
+}
+
+rtupdate() {
+ case "$1" in
+ python2.4) py=py24 ;;
+ python2.5) py=py25 ;;
+ *) die $0 unknown python version $1 ;;
+ esac
+
+ update_linklibs $py a
+ update_linklibs $py so
+}
+
+remove() {
+ remove_linklibs a
+ remove_linklibs so
+}
+
+
+debug=
+case "$0" in
+ */libboost-dbg.rtupdate) debug=-d ;;
+esac
+
+action="$1"
+shift
+
+case "$action" in
+ pre-rtupdate) ;;
+ post-rtupdate) ;;
+ rtupdate) rtupdate $2 ;;
+ remove) remove ;;
+ *) die "$0 called with unknown argument '$action'" ;;
+esac
+
More information about the pkg-boost-commits
mailing list