[cpl-plugin-hawki] 28/39: Create scripts and install during build; download calib on calib pkg install

Ole Streicher olebole-guest at alioth.debian.org
Mon Sep 16 19:36:15 UTC 2013


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

olebole-guest pushed a commit to branch debian
in repository cpl-plugin-hawki.

commit d05a5fde36aae5e5edd45d3e944903e020e5a2f9
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Sep 13 15:26:54 2013 +0200

    Create scripts and install during build; download calib on calib pkg install
---
 debian/cpl-plugin-calib.postinst.in |   22 ++++++++++++++++++++++
 debian/cpl-plugin-calib.prerm.in    |    7 +++++++
 debian/cpl-plugin.install.in        |    3 +++
 debian/cpl-plugin.install.template  |    1 -
 debian/rules                        |   14 ++++++++++++++
 5 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/debian/cpl-plugin-calib.postinst.in b/debian/cpl-plugin-calib.postinst.in
new file mode 100644
index 0000000..fdd8a39
--- /dev/null
+++ b/debian/cpl-plugin-calib.postinst.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+PIPELINE=__PIPELINE__
+VERSION=__VERSION__
+
+KIT=${PIPELINE}-kit-${VERSION}
+CALIB=${PIPELINE}-calib-${VERSION}
+URL=ftp://ftp.eso.org/pub/dfs/pipelines/${PIPELINE}/${KIT}.tar.gz
+TAR=${KIT}/${CALIB}.tar.gz
+COMPONENTS="${CALIB}/cal"
+TARGETDIR="/usr/share/cpl-plugins/${PIPELINE}"
+
+if [ "$1" = "configure" ] ; then
+    mkdir -p ${TARGETDIR}
+    wget -O- ${URL} | \
+    tar xzO ${TAR} | \
+    tar xzC ${TARGETDIR} ${COMPONENTS}  --strip-components=1
+fi
+
+#DEBHELPER#
diff --git a/debian/cpl-plugin-calib.prerm.in b/debian/cpl-plugin-calib.prerm.in
new file mode 100644
index 0000000..520a9fd
--- /dev/null
+++ b/debian/cpl-plugin-calib.prerm.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+rm -rfd /usr/share/cpl-plugins/__PIPELINE__/cal/
+
+#DEBHELPER#
diff --git a/debian/cpl-plugin.install.in b/debian/cpl-plugin.install.in
new file mode 100644
index 0000000..e1d7fa1
--- /dev/null
+++ b/debian/cpl-plugin.install.in
@@ -0,0 +1,3 @@
+usr/lib/*
+calib/dic usr/share/cpl-plugins/__PIPELINE__
+calib/gasgano usr/share/cpl-plugins/__PIPELINE__
diff --git a/debian/cpl-plugin.install.template b/debian/cpl-plugin.install.template
deleted file mode 100644
index f1d0181..0000000
--- a/debian/cpl-plugin.install.template
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*
diff --git a/debian/rules b/debian/rules
index dee4f0e..8e6b9e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,23 @@
 # -*- makefile -*-
 #export DH_VERBOSE=1
 
+DEBVERS ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
+VERSION ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//')
+DEBPKGNAME ?= $(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2)
+PIPELINE ?= $(shell echo '$(DEBPKGNAME)' | sed -e 's/cpl-plugin-//')
+
 %:
 	dh  $@ --with autoreconf
 
+debian_files:
+	for f in .install -calib.postinst -calib.prerm ; do \
+	    sed "s/__VERSION__/$(VERSION)/g;s/__PIPELINE__/${PIPELINE}/g" \
+	        < debian/cpl-plugin$$f.in \
+                > debian/${DEBPKGNAME}$$f ; \
+	done
+
+override_dh_install: debian_files
+
 override_dh_auto_configure:
 	dh_auto_configure -- --prefix=/usr/
 

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



More information about the debian-science-commits mailing list