wok rev 8127

Up: emacs-pkg-lua-mode to 20100617
author Dominique Corbex <domcox@slitaz.org>
date Mon Jan 24 20:40:25 2011 +0100 (2011-01-24)
parents 8808f618b300
children 489898e9f029 b67beb4fb8d2
files emacs-pkg-lua-mode/receipt
line diff
     1.1 --- a/emacs-pkg-lua-mode/receipt	Mon Jan 24 19:55:42 2011 +0100
     1.2 +++ b/emacs-pkg-lua-mode/receipt	Mon Jan 24 20:40:25 2011 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="emacs-pkg-lua-mode"
     1.7 -VERSION="20100404"
     1.8 +VERSION="20100617"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="An Emacs major mode for editing Lua code."
    1.11  MAINTAINER="domcox@slitaz.org"
    1.12 @@ -13,21 +13,15 @@
    1.13  WGET_URL="http://luaforge.net/frs/download.php/2724/$TARBALL"
    1.14  TAGS="emacs lua"
    1.15  
    1.16 -# Rules to configure and make the package.
    1.17 -compile_rules()
    1.18 -{
    1.19 -	echo -n "Byte-compilating lua-mode.el"
    1.20 -	emacs -batch -f batch-byte-compile $WOK/$PACKAGE/$SOURCE.el 2> /dev/null
    1.21 -	status
    1.22 -}
    1.23  
    1.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.25  genpkg_rules()
    1.26  {
    1.27  	echo -n "Installing lua-mode"
    1.28  	mkdir -p $fs/usr/share/emacs/site-lisp/lua-mode && \
    1.29 -	cp $WOK/$PACKAGE/*.elc $fs/usr/share/emacs/site-lisp/lua-mode
    1.30 +	cp $WOK/$PACKAGE/*.el $fs/usr/share/emacs/site-lisp/lua-mode
    1.31  	status
    1.32 +
    1.33  	echo -n "Installing start file"
    1.34  	mkdir -p $fs/usr/share/emacs/site-lisp/site-start.d && \
    1.35  	cp stuff/*.el $fs/usr/share/emacs/site-lisp/site-start.d
    1.36 @@ -36,9 +30,30 @@
    1.37  
    1.38  post_install()
    1.39  {
    1.40 +	# byte-compile files, remove src
    1.41 +	cd /usr/share/emacs/site-lisp/lua-mode/
    1.42 +	for file in *.el ; do
    1.43 +		echo -n "Byte-compiling $file"
    1.44 +		emacs -batch -f batch-byte-compile $file 2> /dev/null
    1.45 +		status
    1.46 +		rm -f $file
    1.47 +	done
    1.48  	tazpkg reconfigure emacs
    1.49  }
    1.50  
    1.51 +pre_remove()
    1.52 +{
    1.53 +	# remove byte-compiled files,
    1.54 +	# created by post_install()
    1.55 +	cd /usr/share/emacs/site-lisp/lua-mode/
    1.56 +	for file in *.elc ; do
    1.57 +		echo -n "Deleting byte-compiled code $file"
    1.58 +		touch "$file" "`basename $file .elc`.el"
    1.59 +		rm -f $file
    1.60 +		status
    1.61 +	done
    1.62 +}
    1.63 +
    1.64  post_remove()
    1.65  {
    1.66  	tazpkg reconfigure emacs