chiark / gitweb /
debian/rules: Cope with `sbuild', which sets a fake home directory.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 20:05:58 +0000 (21:05 +0100)
debian/rules

index b6d10e5ac12d9f991a7265dfd1bf266a3a524159..db3d0304c4bb975f3dae295ee18b2c017cb9c224 100755 (executable)
@@ -1,6 +1,15 @@
 #! /usr/bin/make -f
 %:; dh $@ --parallel -Bdebian/build
 
+## The `sbuild' tool sets a fake `home' directory which doesn't exist.  This
+## breaks ASDF, which wants to write FASL files into `~/.cache/common-lisp/'.
+## Set an explicit cache directory for it, and clear away the FASL cache
+## directory on clean.
+export XDG_CACHE_HOME := $(shell pwd)/debian/build/cache
+override_dh_auto_clean:
+       dh_auto_clean
+       rm -rf debian/build/cache
+
 ## Don't strip the main executable.  (It doesn't work, and you get left with
 ## a bare SBCL.)
 override_dh_strip:; dh_strip -Xusr/bin/sod