On Tue, Dec 02, 2008 at 12:46:05PM +0100, Agustin Martin wrote:
> reassign 507296 css-mode
> retitle  507296 css-mode: Please set symlinks and avoid loading 
> /etc/emacs/site-startd.d stuff when bytecompiling
> tag      507296 +patch
> tag      477411 +patch
> thanks
..
> While we are playing with emacsen-install, I also include in attached patch
> a proposed fix for #477411 [css-mode: obsolete as of emacs 22.2], along with
> some reorganization of the FLAVOR check.

Forgot about emacs-snapshot. Updated patch attached.

-- 
Agustin
diff -u css-mode-0.11/debian/emacsen-install css-mode-0.11/debian/emacsen-install
--- css-mode-0.11/debian/emacsen-install
+++ css-mode-0.11/debian/emacsen-install
@@ -8,22 +8,25 @@
 FLAVOR=$1
 PACKAGE=css-mode
 
-if [ ${FLAVOR} = emacs ]; then exit 0; fi
+case "${FLAVOR}" in
+    emacs|emacs-snapshot|emacs22)
+        echo "install/${PACKAGE}: Ignoring emacsen flavor $FLAVOR."
+        exit 0;
+        ;;
+    *) echo "install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}"
+        ;;
+esac
+
+# Do not load site files when byte-compiling. Single leading dash form
+# works also with FSF emacs >=21
+SITEFLAG="-no-site-file"
 
-echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
-
-#FLAVORTEST=`echo $FLAVOR | cut -c-6`
-#if [ ${FLAVORTEST} = xemacs ] ; then
-#    SITEFLAG="-no-site-file"
-#else
-#    SITEFLAG="--no-site-file"
-#fi
 FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
 
 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
 
-# Install-info-altdir does not actually exist. 
+# Install-info-altdir does not actually exist.
 # Maybe somebody will write it.
 if test -x /usr/sbin/install-info-altdir; then
     echo install/${PACKAGE}: install Info links for ${FLAVOR}
@@ -32,14 +35,19 @@
 
 install -m 755 -d ${ELCDIR}
+
 cd ${ELDIR}
 FILES=`echo *.el`
-cp ${FILES} ${ELCDIR}
+
 cd ${ELCDIR}
+for i in $FILES; do
+    ln -sf ${ELDIR}/$i .
+done
 
 cat << EOF > path.el
 (setq load-path (cons "." load-path) byte-compile-warnings nil)
 EOF
+
 ${FLAVOR} ${FLAGS} ${FILES}
-rm -f *.el path.el
+rm -f path.el
 
 exit 0
diff -u css-mode-0.11/debian/changelog css-mode-0.11/debian/changelog
--- css-mode-0.11/debian/changelog
+++ css-mode-0.11/debian/changelog
@@ -1,3 +1,14 @@
+css-mode (0.11-5.0.1) unstable; urgency=low
+
+  * debian/emacsen-install:
+    - Do not byte-compile files for emacs22 and emacs-snapshot
+      (Closes: #477411).
+    - Set symlinks to .el files and do not load site files
+      when byte-compiling (Closes: #507296).
+    - Minor cosmetic changes.
+
+ -- Agustin Martin Domingo <[EMAIL PROTECTED]>  Tue, 02 Dec 2008 12:52:30 +0100
+
 css-mode (0.11-5) unstable; urgency=low
 
   * Apply patch from John Zaitseff to add additional CSS properties and

Reply via email to