From 5de01471c06704a60c66d674608e4c7cbd2776bb Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 13 May 2002 03:45:56 +0000 Subject: [PATCH] r2010: debian --- debian/postinst | 53 ---------------------------------------- debian/postinst.template | 28 +++++++++++++++++++++ debian/prerm | 43 -------------------------------- debian/prerm.template | 28 +++++++++++++++++++++ debian/rules | 11 ++++++++- 5 files changed, 66 insertions(+), 97 deletions(-) delete mode 100644 debian/postinst create mode 100644 debian/postinst.template delete mode 100644 debian/prerm create mode 100644 debian/prerm.template diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index 33de95a..0000000 --- a/debian/postinst +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh -# postinst script for clsql -# -# see: dh_installdeb(1) - -set -e - -# package name according to lisp -LISP_PKG=clsql - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - -case "$1" in - configure) - ln -sf ../repositories/clsql /usr/share/common-lisp/source/clsql - /usr/sbin/register-common-lisp-source ${LISP_PKG} - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/postinst.template b/debian/postinst.template new file mode 100644 index 0000000..58e9698 --- /dev/null +++ b/debian/postinst.template @@ -0,0 +1,28 @@ +#! /bin/sh +# From UncommonSQL package + +set -e + +# package name according to lisp +LISP_PKG=%% + +case "$1" in + configure) + /usr/sbin/register-common-lisp-source ${LISP_PKG} + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm deleted file mode 100644 index 722d8f0..0000000 --- a/debian/prerm +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# prerm script for clsql -# -# see: dh_installdeb(1) - -set -e - -# package name according to lisp -LISP_PKG=clsql - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - /usr/sbin/unregister-common-lisp-source ${LISP_PKG} - rm -rf /usr/share/common-lisp/source/clsql /usr/share/common-lisp/repositories/clsql - ;; - failed-upgrade) - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/prerm.template b/debian/prerm.template new file mode 100644 index 0000000..0c45925 --- /dev/null +++ b/debian/prerm.template @@ -0,0 +1,28 @@ +#! /bin/sh +# From UncommonSQL package + +set -e + +# package name according to lisp +LISP_PKG=%% + +case "$1" in + remove|upgrade|deconfigure) + /usr/sbin/unregister-common-lisp-source ${LISP_PKG} + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 9a6d225..b0de579 100755 --- a/debian/rules +++ b/debian/rules @@ -28,7 +28,7 @@ srcs := sql/pool.cl sql/sql.cl sql/transactions.cl sql/utils.cl sql/functional. srcs-cmucl-compat := $(wildcard cmucl-compat/*.cl) srcs-base := sql/package.cl sql/db-interface.cl sql/classes.cl sql/conditions.cl srcs-base-uffi := $(wildcard interfaces/clsql-uffi/*.cl) $(wildcard interfaces/clsql-uffi/*.so) -srcs-mysql := $(wildcard interfaces/mysql/*.cl) $(wildcards interfaces/mysql/*.so) +srcs-mysql := $(wildcard interfaces/mysql/*.cl) $(wildcard interfaces/mysql/*.so) srcs-pg := $(wildcard interfaces/postgresql/*.cl) srcs-pg-socket := $(wildcard interfaces/postgresql-socket/*.cl) srcs-aodbc := $(wildcard interfaces/aodbc/*.cl) @@ -107,6 +107,15 @@ install: build $(INSTALL) $(INSTALLFLAGS) doc/cl-sql.pdf.gz $(doc-dir) rm -f doc/cl-sql.pdf.gz +# From UncommonSQL Debian package: build prerm postinst from templates + set -e ;\ + for p in $(all-pkgs); do \ + echo "processing maintainer scripts for $$p" ;\ + l=`echo $$p | sed -e "s/^cl-//;"` ;\ + sed -e "s/%%/$$l/;" debian/prerm.template > debian/$$p.prerm ;\ + sed -e "s/%%/$$l/;" debian/postinst.template > debian/$$p.postinst ;\ + done + # Build architecture-independent files here. binary-indep: build install -- 2.34.1