talimat 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Description: Uygulamaları genişletmek için tasarlanmış bir programlama dili (sürüm 5.1)
  2. # URL: URL: http://www.lua.org
  3. # Packager: milisarge
  4. # Depends on:
  5. name=lua51
  6. version=5.1.5
  7. release=1
  8. source=(
  9. http://www.lua.org/ftp/lua-$version.tar.gz
  10. http://www.linuxfromscratch.org/patches/blfs/7.4/lua-5.1.5-shared_library-2.patch)
  11. build(){
  12. cd lua-$version
  13. patch -Np1 -i ../lua-5.1.5-shared_library-2.patch
  14. sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h
  15. [ `uname -i` == "x86_64" ] && export CFLAGS="$CFLAGS -fPIC"
  16. sed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc
  17. sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' -e '/^LUAC_T=/ s/luac/luac5.1/' \
  18. -i src/Makefile
  19. make linux
  20. make \
  21. INSTALL_TOP=$PKG/usr \
  22. TO_BIN='lua5.1 luac5.1' \
  23. TO_LIB="liblua5.1.a liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.$version" \
  24. INSTALL_INC=$PKG/usr/include/lua5.1 \
  25. INSTALL_DATA="cp -d" \
  26. INSTALL_MAN=$PKG/usr/share/man/man1 \
  27. install
  28. rm -r $PKG/usr/share/lua
  29. # pkg-config, change name so that others lua version can be installed
  30. install -Dm644 etc/lua.pc $PKG/usr/lib/pkgconfig/lua5.1.pc
  31. # symlinks
  32. ln -s liblua5.1.so $PKG/usr/lib/liblua.so.5.1
  33. ln -s liblua5.1.so $PKG/usr/lib/liblua.so.$version
  34. # rename man pages
  35. cd $PKG/usr/share/man/man1
  36. mv lua.1 lua5.1.1
  37. mv luac.1 luac5.1.1
  38. }
  39. # NuTyX Pkgfile (http://nutyx.org)