[cl-debian] A Lisp debhelper

René van Bevern rvb at pro-linux.de
Sat Aug 6 13:10:41 UTC 2005


On  6.08.05, René van Bevern wrote:
> What's still to come: support for CL implementation registration.

Okay, I have done that now. It is not quite as useful as the
part for Common Lisp library packages, though, since there are lots of
specific things in packages for implementations.

Calling "dh_lisp sbcl" will do the following:
	a) install debian/sbcl.sh to usr/lib/common-lisp/bin/sbcl.sh
	b) generate postinst and prerm scripts to interact with the
	   common-lisp-controller
	c) nevertheless scan the package contents for ASDs to register

I've tested dh_lisp on packages for clisp and sbcl. I attach a patch
that demonstrates the changes for dh_lisp.

     :)
-- 
René van Bevern -- http://progn.org/
-------------- next part --------------
Sat Aug  6 15:01:31 CEST 2005  René van Bevern <rvb at pro-linux.de>
  * use dh-lisp
diff -rN -u old-clisp/debian/clisp.install new-clisp/debian/clisp.install
--- old-clisp/debian/clisp.install	2005-08-06 15:09:32.000000000 +0200
+++ new-clisp/debian/clisp.install	2005-08-06 14:55:22.000000000 +0200
@@ -11,6 +11,5 @@
 usr/lib/clisp/full/*.fas
 usr/lib/clisp/full/*.lisp
 usr/lib/clisp/full/*.o
-usr/lib/common-lisp
 usr/share/man
 usr/share/locale
diff -rN -u old-clisp/debian/control new-clisp/debian/control
--- old-clisp/debian/control	2005-08-06 15:09:32.000000000 +0200
+++ new-clisp/debian/control	2005-08-06 14:25:51.000000000 +0200
@@ -2,13 +2,13 @@
 Section: interpreters
 Priority: optional
 Maintainer: Will Newton <will at debian.org>
-Build-Depends: debhelper (>> 4.1.0), gettext, groff, bison, libncurses5-dev, libsigsegv-dev (>= 2.1), libreadline5-dev | libreadline-dev, libice-dev, libsm-dev, libx11-dev, libxpm-dev, libxext-dev, quilt
+Build-Depends: dh-lisp, debhelper (>> 4.1.0), gettext, groff, bison, libncurses5-dev, libsigsegv-dev (>= 2.1), libreadline5-dev | libreadline-dev, libice-dev, libsm-dev, libx11-dev, libxpm-dev, libxext-dev, quilt
 Standards-Version: 3.6.2
 
 Package: clisp
 Architecture: any
 Pre-Depends: ${xlibs:PreDepends}
-Depends: ${shlibs:Depends}, common-lisp-controller (>= 4.2)
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Provides: lisp-compiler
 Suggests: gdb
 Conflicts: clisp-doc (<< 1:2.31-1)
diff -rN -u old-clisp/debian/postinst new-clisp/debian/postinst
--- old-clisp/debian/postinst	2005-08-06 15:09:32.000000000 +0200
+++ new-clisp/debian/postinst	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/share/doc/packaging-manual/
-#
-# 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)
-	/usr/sbin/register-common-lisp-implementation clisp
-	;;
-    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 -rN -u old-clisp/debian/prerm new-clisp/debian/prerm
--- old-clisp/debian/prerm	2005-08-06 15:09:32.000000000 +0200
+++ new-clisp/debian/prerm	1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/share/doc/packaging-manual/
-
-case "$1" in
-    upgrade|deconfigure|remove|failed-upgrade)
-	/usr/sbin/unregister-common-lisp-implementation clisp || true
-	;;            
-    *)
-	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#
-
-
-
diff -rN -u old-clisp/debian/rules new-clisp/debian/rules
--- old-clisp/debian/rules	2005-08-06 15:09:32.000000000 +0200
+++ new-clisp/debian/rules	2005-08-06 14:30:30.000000000 +0200
@@ -82,9 +82,7 @@
 	chmod a+x $(tmp)/usr/lib/clisp/clisp-link
 
 # Install CLC files
-	mkdir -p $(tmp)/usr/lib/common-lisp/bin $(tmp)/usr/lib/clisp
-	install -o root -g root -m 0755 debian/clisp.sh \
-		$(tmp)/usr/lib/common-lisp/bin
+	mkdir -p $(tmp)/usr/lib/clisp
 	install -o root -g root -m 0644 debian/install-clc.lisp \
 		$(tmp)/usr/lib/clisp
 
@@ -113,6 +111,7 @@
 	dh_installchangelogs -a -i src/ChangeLog
 	dh_strip 
 	dh_link 
+	dh_lisp clisp
 	dh_compress 
 	dh_fixperms
 #	dh_makeshlibs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-debian/attachments/20050806/949a4d0a/attachment.sig>


More information about the Cl-debian mailing list