Commits

Faheem Mitha committed 7c2c907

Preliminary version of Debian packaging for CCL.

Comments (0)

Files changed (18)

ccl-dev.dirs

-usr/lib
-usr/include

ccl-dev.install

-usr/include/*
-usr/lib/lib*.a
-usr/lib/lib*.so
-usr/lib/pkgconfig/*
-usr/share/pkgconfig/*

ccl.cron.d.ex

-#
-# Regular cron jobs for the ccl package
-#
-0 4	* * *	root	[ -x /usr/bin/ccl_maintenance ] && /usr/bin/ccl_maintenance

ccl.install.amd64

+debian/tmp/usr/lib/ccl/lx86cl64         /usr/lib/ccl
+debian/tmp/usr/lib/ccl/lx86cl64.image   /usr/lib/ccl
+scripts/ccl                             /usr/bin
+x86-headers64                           /usr/lib/ccl
+tools                                   /usr/lib/ccl
+debian/tmp/usr/lib/ccl/lx86cl         /usr/lib/ccl
+debian/tmp/usr/lib/ccl/lx86cl.image   /usr/lib/ccl
+scripts/ccl                           /usr/bin
+x86-headers                           /usr/lib/ccl
+tools                                 /usr/lib/ccl

ccl1.dirs

-usr/lib

ccl1.install

-usr/lib/lib*.so.*
 Source: ccl
-Priority: extra
-Maintainer: Faheem Mitha <faheem@faheem.info>
-Build-Depends: debhelper (>= 8.0.0)
+Section: lisp
+Priority: optional
+Homepage: http://http://ccl.clozure.com/
+Maintainer: Debian Common Lisp Team <pkg-common-lisp-devel@lists.alioth.debian.org>
+Uploaders: Faheem Mitha <faheem@faheem.info>
+Build-Depends: dh-lisp,
+ debhelper (>> 7.0.0),
 Standards-Version: 3.9.2
-Section: libs
-Homepage: <insert the upstream URL, if relevant>
-#Vcs-Git: git://git.debian.org/collab-maint/ccl.git
-#Vcs-Browser: http://git.debian.org/?p=collab-maint/ccl.git;a=summary
 
-Package: ccl-dev
-Section: libdevel
-Architecture: any
-Depends: cclBROKEN (= ${binary:Version})
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
-
-Package: cclBROKEN
-Section: libs
-Architecture: any
+Package: ccl
+Architecture: i386 amd64
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Suggests: slime
+Provides: lisp-compiler
+Recommends: binfmt-support (>= 1.1.2)
+Description: Common Lisp compiler and development system
+ CCL  is a development environment for the ANSI Common Lisp language.
+ It provides a native-code compiler and an integrated debugger, as well
+ as all the features in the ANSI specification.

init.d.ex

-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          ccl
-# Required-Start:    $network $local_fs
-# Required-Stop:
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: <Enter a short description of the software>
-# Description:       <Enter a long description of the software>
-#                    <...>
-#                    <...>
-### END INIT INFO
-
-# Author: Faheem Mitha <faheem@faheem.info>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC=ccl             # Introduce a short description here
-NAME=ccl             # Introduce the short server's name here
-DAEMON=/usr/sbin/ccl # Introduce the server's location here
-DAEMON_ARGS=""             # Arguments to run the daemon with
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
-
-#
-# Function that starts the daemon/service
-#
-do_start()
-{
-	# Return
-	#   0 if daemon has been started
-	#   1 if daemon was already running
-	#   2 if daemon could not be started
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
-		|| return 1
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
-		$DAEMON_ARGS \
-		|| return 2
-	# Add code here, if necessary, that waits for the process to be ready
-	# to handle requests from services started subsequently which depend
-	# on this one.  As a last resort, sleep for some time.
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop()
-{
-	# Return
-	#   0 if daemon has been stopped
-	#   1 if daemon was already stopped
-	#   2 if daemon could not be stopped
-	#   other if a failure occurred
-	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
-	RETVAL="$?"
-	[ "$RETVAL" = 2 ] && return 2
-	# Wait for children to finish too if this is a daemon that forks
-	# and if the daemon is only ever run from this initscript.
-	# If the above conditions are not satisfied then add some other code
-	# that waits for the process to drop all resources that could be
-	# needed by services started subsequently.  A last resort is to
-	# sleep for some time.
-	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
-	[ "$?" = 2 ] && return 2
-	# Many daemons don't delete their pidfiles when they exit.
-	rm -f $PIDFILE
-	return "$RETVAL"
-}
-
-#
-# Function that sends a SIGHUP to the daemon/service
-#
-do_reload() {
-	#
-	# If the daemon can reload its configuration without
-	# restarting (for example, when it is sent a SIGHUP),
-	# then implement that here.
-	#
-	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
-	return 0
-}
-
-case "$1" in
-  start)
-    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
-    do_start
-    case "$?" in
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-	esac
-  ;;
-  stop)
-	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
-	do_stop
-	case "$?" in
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-	esac
-	;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  #reload|force-reload)
-	#
-	# If do_reload() is not implemented then leave this commented out
-	# and leave 'force-reload' as an alias for 'restart'.
-	#
-	#log_daemon_msg "Reloading $DESC" "$NAME"
-	#do_reload
-	#log_end_msg $?
-	#;;
-  restart|force-reload)
-	#
-	# If the "reload" option is implemented then remove the
-	# 'force-reload' alias
-	#
-	log_daemon_msg "Restarting $DESC" "$NAME"
-	do_stop
-	case "$?" in
-	  0|1)
-		do_start
-		case "$?" in
-			0) log_end_msg 0 ;;
-			1) log_end_msg 1 ;; # Old process is still running
-			*) log_end_msg 1 ;; # Failed to start
-		esac
-		;;
-	  *)
-	  	# Failed to stop
-		log_end_msg 1
-		;;
-	esac
-	;;
-  *)
-	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-	exit 3
-	;;
-esac
-
-:

patches/lisp-kernel.linuxx8632.Makefile.diff

+diff -r 6fe74f33d6da -r 42cf17d6d823 lisp-kernel/linuxx8632/Makefile
+--- a/lisp-kernel/linuxx8632/Makefile
++++ b/lisp-kernel/linuxx8632/Makefile
+@@ -1,4 +1,3 @@
+-#
+ #   Copyright (C) 2008 Clozure Associates and contributors
+ #   This file is part of Clozure CL.  
+ #
+@@ -65,16 +64,17 @@
+ 	$(PLATFORM_H) constants.h os-linux.h
+ 
+ 
++DESTDIR = ../..
+ KSPOBJ = $(SPOBJ)
+-all:	../../lx86cl
++all:	$(DESTDIR)/lx86cl
+ 
+ 
+ OSLIBS = -ldl -lm -lpthread
+ LINK_SCRIPT = # ./elf_x86_32.x
+ USE_LINK_SCRIPT = # -T $(LINK_SCRIPT)
+ 
+-../../lx86cl:	$(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_SCRIPT)
+-	$(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
++$(DESTDIR)/lx86cl:	$(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_SCRIPT)
++		$(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
+ 
+ 
+ $(SPOBJ): $(SPINC)
+@@ -84,10 +84,10 @@
+ 
+ 
+ cclean:
+-	$(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../lx86cl
++	$(RM) -f $(KERNELOBJ) $(DEBUGOBJ) $(DESTDIR)/lx86cl
+ 
+ clean:	cclean
+ 	$(RM) -f $(SPOBJ)
+ 
+-strip:	../../lx86cl
+-	strip -g ../../lx86cl
++strip:	$(DESTDIR)/lx86cl
++	strip -g $(DESTDIR)/lx86cl

patches/lisp-kernel.linuxx8664.Makefile.diff

+diff -r 6fe74f33d6da -r 42cf17d6d823 lisp-kernel/linuxx8664/Makefile
+--- a/lisp-kernel/linuxx8664/Makefile
++++ b/lisp-kernel/linuxx8664/Makefile
+@@ -65,15 +65,16 @@
+ 	$(PLATFORM_H) constants.h os-linux.h
+ 
+ 
++DESTDIR = ../..
+ KSPOBJ = $(SPOBJ)
+-all:	../../lx86cl64
++all:	$(DESTDIR)/lx86cl64
+ 
+ 
+ OSLIBS = -ldl -lm -lpthread
+ LINK_MAP = ./elf_x86_64.x
+ USE_LINK_MAP = # -T ./elf_x86_64.x
+ 
+-../../lx86cl64:	$(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_MAP)
++$(DESTDIR)/lx86cl64:	$(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_MAP)
+ 	$(CC)  -m64 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
+ 
+ 
+@@ -84,10 +85,10 @@
+ 
+ 
+ cclean:
+-	$(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../lx86cl64
++	$(RM) -f $(KERNELOBJ) $(DEBUGOBJ) $(DESTDIR)/lx86cl64
+ 
+ clean:	cclean
+ 	$(RM) -f $(SPOBJ)
+ 
+-strip:	../../lx86cl64
+-	strip -g ../../lx86cl64
++strip:	$(DESTDIR)/lx86cl64
++	strip -g $(DESTDIR)/lx86cl64

patches/scripts.ccl.diff

+diff -r 6fe74f33d6da -r 42cf17d6d823 scripts/ccl
+--- a/scripts/ccl
++++ b/scripts/ccl
+@@ -9,7 +9,7 @@
+ # environment takes precedence over definition made below.
+ 
+ if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then
+-  CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl
++  CCL_DEFAULT_DIRECTORY=/usr/lib/ccl
+ fi
+ 
+ # If you don't want to guess the name of the lisp kernel on
+lisp-kernel.linuxx8632.Makefile.diff
+lisp-kernel.linuxx8664.Makefile.diff
+scripts.ccl.diff
+makefile.common.patch
 #!/usr/bin/make -f
 # -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-%:
-	dh $@ 
+include /usr/share/quilt/quilt.make
+
+export CCLBUILDDIR=debian/tmp
+
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+CCL_HOST_ARCH := $(subst i386,linuxx8632,$(DEB_HOST_ARCH))
+CCL_HOST_ARCH := $(subst amd64,linuxx8664,$(CCL_HOST_ARCH))
+
+CCL_KERNEL := $(subst i386,lx86cl,$(DEB_HOST_ARCH))
+CCL_KERNEL := $(subst amd64,lx86cl64,$(CCL_KERNEL))
+
+CCL_BOOT_IMAGE := $(subst i386,x86-boot32,$(DEB_HOST_ARCH))
+CCL_BOOT_IMAGE := $(subst amd64,x86-boot64,$(CCL_BOOT_IMAGE))
+
+CCL_FASL_EXTENSION := $(subst i386,lx32fsl,$(DEB_HOST_ARCH))
+CCL_FASL_EXTENSION := $(subst amd64,lx64fsl,$(CCL_FASL_EXTENSION))
+
+CCL_LEVEL0_DIR1 := $(subst i386,X86,$(DEB_HOST_ARCH))
+CCL_LEVEL0_DIR1 := $(subst amd64,X86,$(CCL_LEVEL0_DIR1))
+
+CCL_LEVEL0_DIR2 := $(subst i386,X8632,$(DEB_HOST_ARCH))
+CCL_LEVEL0_DIR2 := $(subst amd64,X8664,$(CCL_LEVEL0_DIR2))
+
+build: $(QUILT_STAMPFN)
+
+clean: unpatch
+	#[ ! -f Makefile ] || $(MAKE) clean
+	# rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
+
+	rm -rf doc/manual doc/src/ccl-documentation.html
+	rm -rf debian/tmp debian/ccl
+	rm -rf level-0/$(CCL_LEVEL0_DIR1)/$(CCL_LEVEL0_DIR2)/*.$(CCL_FASL_EXTENSION) level-0/$(CCL_LEVEL0_DIR1)/*.$(CCL_FASL_EXTENSION) level-0/*.$(CCL_FASL_EXTENSION)
+	rm -rf $(CCL_BOOT_IMAGE)
+	rm -rf $(CCLBUILDDIR)
+	rm -rf lisp-kernel/$(CCL_HOST_ARCH)/*.o
+	rm -rf bin/*.$(CCL_FASL_EXTENSION)
+	rm -rf l1-fasls/*.$(CCL_FASL_EXTENSION)
+	rm -rf *.$(CCL_FASL_EXTENSION)
+	rm -rf library/*.$(CCL_FASL_EXTENSION) tools/*.$(CCL_FASL_EXTENSION) xdump/*.$(CCL_FASL_EXTENSION)
+
+binary-arch: build
+	make -C doc/src -f Makefile.debian install CCL=$(CURDIR)/$(CCL_KERNEL)
+	install -d $(CCLBUILDDIR)/usr/lib/ccl
+	$(MAKE) -C lisp-kernel/$(CCL_HOST_ARCH) DESTDIR=$(CURDIR)/$(CCLBUILDDIR)/usr/lib/ccl/
+	cd $(CCLBUILDDIR)/usr/lib/ccl && echo '(ccl:xload-level-0 :force)' | ./$(CCL_KERNEL)  -I $(CURDIR)/$(CCL_KERNEL).image
+	cd $(CCLBUILDDIR)/usr/lib/ccl && echo '(ccl:compile-ccl)' | ./$(CCL_KERNEL)  -I $(CURDIR)/$(CCL_KERNEL).image # populated bin
+	cp level-1.$(CCL_FASL_EXTENSION) $(CCLBUILDDIR)/usr/lib/ccl
+	cp -r l1-fasls $(CCLBUILDDIR)/usr/lib/ccl
+	cp -r bin $(CCLBUILDDIR)/usr/lib/ccl
+	cd $(CCLBUILDDIR)/usr/lib/ccl && echo '(ccl:save-application "$(CCL_KERNEL).image")' |  ./$(CCL_KERNEL) -I $(CURDIR)/$(CCL_BOOT_IMAGE)
+	dh_install -p ccl -X .svn
+	dh_installdocs -a
+	dh_strip -a
+	dh_link -a
+	dh_lintian -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_lisp ccl ccl-doc
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+build-arch: build
+
+build-indep: build
+
+.PHONY: binary binary-arch binary-indep build-arch build-indep clean

shlibs.local.ex

-libccl 1.8 ccl (>> 1.8-0), ccl (<< 1.8-99)
+version=3
+ftp://ftp.clozure.com/pub/release/(\d\.\d)/ccl-([\d\.]+).*\.tar\.gz debian uupdate

watch.ex

-# Example watch control file for uscan
-# Rename this file to "watch" and then you can run the "uscan" command
-# to check for upstream updates and more.
-# See uscan(1) for format
-
-# Compulsory line, this is a version 3 file
-version=3
-
-# Uncomment to examine a Webpage
-# <Webpage URL> <string match>
-#http://www.example.com/downloads.php ccl-(.*)\.tar\.gz
-
-# Uncomment to examine a Webserver directory
-#http://www.example.com/pub/ccl-(.*)\.tar\.gz
-
-# Uncommment to examine a FTP server
-#ftp://ftp.example.com/pub/ccl-(.*)\.tar\.gz debian uupdate
-
-# Uncomment to find new files on sourceforge, for devscripts >= 2.9
-# http://sf.net/ccl/ccl-(.*)\.tar\.gz
-
-# Uncomment to find new files on GooglePages
-# http://example.googlepages.com/foo.html ccl-(.*)\.tar\.gz