[libdap] 16/48: rewrite dap-config

Alastair McKinstry mckinstry at moszumanska.debian.org
Sun Jul 5 10:17:08 UTC 2015


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

mckinstry pushed a commit to tag unstable/3.12.0-1
in repository libdap.

commit f11c23f2e430ada31ad2549b332a5764d08e2e72
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Sep 15 05:18:13 2011 +0100

    rewrite dap-config
---
 debian/changelog          |  7 ++++
 debian/control            |  3 +-
 debian/dap-config.pkg     | 88 +++++++++++++++++++++++++++++++++++++++++++++++
 debian/libdap-dev.dirs    |  1 +
 debian/libdap-dev.install |  1 -
 debian/rules              |  1 +
 6 files changed, 98 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f532950..1dd057f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libdap (3.11.1-9) unstable; urgency=low
+
+  * Rewrite dap-config to call pkg-config, to work correctly with 
+    Multiarch. Now depend rather than recommend pkg-config.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 15 Sep 2011 05:16:35 +0100
+
 libdap (3.11.1-8) unstable; urgency=low
 
   * Remove unnecessary ${shlibs:Depends} from -dev package.
diff --git a/debian/control b/debian/control
index 9cdfb9d..bcf2411 100644
--- a/debian/control
+++ b/debian/control
@@ -86,8 +86,7 @@ Section: libdevel
 Architecture: any
 Conflicts: libdnet-dev
 Multi-Arch: same
-Depends: libdap11 ( = ${binary:Version} ), libdapserver7 (=${binary:Version}), libdapclient3 (=${binary:Version}) , ${misc:Depends}, libxml2-dev, libcurl4-gnutls-dev, uuid-dev
-Recommends: pkg-config
+Depends: libdap11 ( = ${binary:Version} ), libdapserver7 (=${binary:Version}), libdapclient3 (=${binary:Version}) , ${misc:Depends}, libxml2-dev, libcurl4-gnutls-dev, uuid-dev, pkg-config
 Description: Development files (headers and static libraries) for libdap
  OPeNDAP provides software that allows you to access data over the internet,
  from programs that weren't originally designed for that purpose, as well
diff --git a/debian/dap-config.pkg b/debian/dap-config.pkg
new file mode 100755
index 0000000..07cfee9
--- /dev/null
+++ b/debian/dap-config.pkg
@@ -0,0 +1,88 @@
+#! /bin/sh
+#
+# Rewrite of dap-config, reading from pkg-config file.
+# This is necessary under Debian, due to multiarch; 
+# dap-config deprecated in favour of pkg-config
+#  - Alastair McKinstry, <mckinstry at debian.org>, 2011-09-15
+
+usage()
+{
+    cat <<EOF
+Usage: dap-config [OPTION]
+
+Available values for OPTION include:
+
+  --help      	display this help message and exit
+  --cc        	C compiler
+  --cxx       	C++ compiler
+  --cflags    	pre-processor and compiler flags
+  --libs      	library linking information for libdap (both clients and servers)
+  --server-libs libraries for servers
+  --client-libs libraries for clients
+  --prefix    	OPeNDAP install prefix
+  --version   	Library version
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+while test $# -gt 0; do
+    case "$1" in
+    # this deals with options in the style
+    # --option=value and extracts the value part
+    # [not currently used]
+    -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) value= ;;
+    esac
+
+    case "$1" in
+    --help)
+	usage 0
+	;;
+
+    --cc)
+	echo "gcc"
+	;;
+
+    --cxx)
+	echo "g++"
+	;;
+
+    --cflags)
+	pkg-config --cflags libdap libdapclient libdapserver
+	;;
+
+    --libs)
+       	pkg-config --libs libdap libdapclient libdapserver
+       	;;
+
+    --server-libs)
+       	pkg-config --libs libdapserver
+       	;;
+
+    --client-libs)
+       	pkg-config --libs libdapclient
+       	;;
+
+    --prefix)
+       	pkg-config --variable=prefix libdap
+       	;;
+
+    --version)
+	pkg-config --modversion libdap
+	;;
+
+    *)
+        echo "unknown option: $1"
+	usage
+	exit 1
+	;;
+    esac
+    shift
+done
+
+exit 0
diff --git a/debian/libdap-dev.dirs b/debian/libdap-dev.dirs
index e74444b..3f80cc6 100644
--- a/debian/libdap-dev.dirs
+++ b/debian/libdap-dev.dirs
@@ -1 +1,2 @@
 usr/include/libdap
+usr/bin
diff --git a/debian/libdap-dev.install b/debian/libdap-dev.install
index 41c4344..865c97b 100644
--- a/debian/libdap-dev.install
+++ b/debian/libdap-dev.install
@@ -3,4 +3,3 @@ usr/lib/*/*.so
 usr/lib/*/*.a
 usr/share/aclocal/libdap.m4
 usr/include/libdap/*
-usr/bin/dap-config
diff --git a/debian/rules b/debian/rules
index e8f2b1e..df596b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,6 +31,7 @@ override_dh_auto_install:
 	dh_link -p libdap-dev     $(LIBDIR)/libdap.so.11.3.0       $(LIBDIR)/libdap.so
 	dh_link -p libdap-dev     $(LIBDIR)/libdapclient.so.3.1.0  $(LIBDIR)/libdapclient.so
 	dh_link -p libdap-dev     $(LIBDIR)/libdapserver.so.7.2.0  $(LIBDIR)/libdapserver.so
+	cp debian/dap-config.pkg  debian/libdap-dev/usr/bin/dap-config
 
 clean:
 	dh clean

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libdap.git



More information about the debian-science-commits mailing list