summaryrefslogtreecommitdiff
path: root/lua52/Pkgfile
blob: b5c00372f03899a8dd5867dc13e011e3b1b11ff4 (plain)
    1 # Description: A programming language designed for extending applications.
    2 # URL: http://www.lua.org/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Packager: Tilman Sauerbeck, tilman at crux dot nu
    5 # Depends on: readline
    6 
    7 name=lua52
    8 version=5.2.4
    9 release=1
   10 source=(http://www.lua.org/ftp/lua-$version.tar.gz
   11 	lua.diff lua-5.2-cflags.diff lua.pc)
   12 
   13 build() {
   14 	cd lua-$version
   15 
   16 	patch -p1 -i $SRC/lua.diff
   17 	patch -p1 -i $SRC/lua-5.2-cflags.diff
   18 
   19 	sed -e "s/%VER%/${version%.*}/g;s/%REL%/$version/g" $SRC/lua.pc > lua.pc
   20 	sed -e 's:llua:llua5.2:' -e 's:/include:/include/lua5.2:' -i lua.pc
   21 
   22 	sed -r \
   23 		-e '/^LUA_(SO|A|T)=/ s/lua/lua5.2/' \
   24 		-e '/^LUAC_T=/ s/luac/luac5.2/' \
   25 		-i src/Makefile
   26 
   27 	make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux
   28 
   29 	install -d $PKG/usr/include/lua5.2 $PKG/usr/share/man/man1 $PKG/usr/lib
   30 
   31 	make \
   32 		TO_BIN="lua5.2 luac5.2" \
   33 		TO_LIB="liblua5.2.a liblua5.2.so liblua5.2.so.5.2 liblua5.2.so.$version" \
   34 		INSTALL_DATA='cp -d' \
   35 		INSTALL_TOP="$PKG/usr" \
   36 		INSTALL_INC="$PKG/usr/include/lua5.2" \
   37 		INSTALL_MAN="$PKG/usr/share/man/man1" \
   38 		install
   39 
   40 	install -m 0644 -D lua.pc $PKG/usr/lib/pkgconfig/lua5.2.pc
   41 
   42 	# fixups
   43 	ln -s liblua5.2.so $PKG/usr/lib/liblua.so.5.2
   44 	ln -s liblua5.2.so $PKG/usr/lib/liblua.so.$version
   45 	cd $PKG/usr/share/man/man1
   46 	mv lua.1 lua5.2.1
   47 	mv luac.1 luac5.2.1
   48 }

Generated by cgit