wok rev 10835

lua: improve receipt and build optimisation
author Christophe Lincoln <pankso@slitaz.org>
date Wed Jun 08 23:16:35 2011 +0200 (2011-06-08)
parents cc669956b01c
children c9e8883ba8f4
files lua-dev/receipt lua/receipt
line diff
     1.1 --- a/lua-dev/receipt	Tue Jun 07 22:40:41 2011 +0200
     1.2 +++ b/lua-dev/receipt	Wed Jun 08 23:16:35 2011 +0200
     1.3 @@ -11,14 +11,8 @@
     1.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     1.5  genpkg_rules()
     1.6  {
     1.7 -	mkdir -p $fs/usr/lib/pkgconfig $fs/usr/include
     1.8 -	# include
     1.9 -	for i in lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
    1.10 -	do
    1.11 -		cp -a $src/src/$i $fs/usr/include
    1.12 -	done
    1.13 -	# liblua.a
    1.14 -	cp -a $src/src/liblua.a $fs/usr/lib
    1.15 +	mkdir -p $fs/usr/lib/pkgconfig $fs/usr
    1.16 +	cp -a $install/usr/include $fs/usr
    1.17 +	cp -a $install/usr/lib/liblua.a $fs/usr/lib
    1.18  	cp -a $src/etc/lua.pc $fs/usr/lib/pkgconfig
    1.19  }
    1.20 -
     2.1 --- a/lua/receipt	Tue Jun 07 22:40:41 2011 +0200
     2.2 +++ b/lua/receipt	Wed Jun 08 23:16:35 2011 +0200
     2.3 @@ -16,16 +16,17 @@
     2.4  {
     2.5  	cd $src
     2.6  	sed -i "s#prefix= /usr/local#prefix= /usr#" etc/lua.pc
     2.7 -	sed -i "s#INSTALL_TOP= /usr/local#INSTALL_TOP=$pkg/usr#" Makefile 
     2.8  	sed -i "s#/usr/local/#/usr/#" src/luaconf.h
     2.9 -	make linux
    2.10 +	sed -i s"/-O2/-Os -march=$ARCH/" src/Makefile
    2.11 +	make linux &&
    2.12 +	make install \
    2.13 +		INSTALL_TOP=$DESTDIR/usr \
    2.14 +		INSTALL_MAN=$DESTDIR/usr/share/man/man1
    2.15  }
    2.16  
    2.17  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.18  genpkg_rules()
    2.19  {
    2.20  	mkdir -p $fs/usr/bin
    2.21 -	cp -a $src/src/lua $fs/usr/bin
    2.22 -	cp -a $src/src/luac $fs/usr/bin
    2.23 +	cp -a $install/usr/bin $fs/usr
    2.24  }
    2.25 -