wok-next annotate lua/receipt @ rev 19861
Up tazlito
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Sep 08 14:25:24 2017 +0300 (2017-09-08) |
parents | 0994d769f208 |
children | c4e53a39395a |
rev | line source |
---|---|
al@19808 | 1 # SliTaz package receipt v2. |
pankso@634 | 2 |
pankso@634 | 3 PACKAGE="lua" |
al@19808 | 4 VERSION="5.3.4" |
pascal@741 | 5 CATEGORY="development" |
al@19808 | 6 SHORT_DESC="Powerful, fast, light-weight, embeddable scripting language" |
pankso@634 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15379 | 8 LICENSE="MIT" |
al@19645 | 9 WEB_SITE="https://www.lua.org/" |
al@19645 | 10 HOST_ARCH="i486 arm" |
al@19645 | 11 |
pankso@634 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@19645 | 13 WGET_URL="https://www.lua.org/ftp/$TARBALL" |
pankso@634 | 14 |
pascal@15379 | 15 BUILD_DEPENDS="readline-dev" |
al@19808 | 16 SPLIT="liblua lua-dev" |
pascal@15379 | 17 |
pankso@634 | 18 # Rules to configure and make the package. |
pankso@634 | 19 compile_rules() |
pankso@634 | 20 { |
al@19808 | 21 sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h && |
al@19645 | 22 |
pankso@15990 | 23 case "$ARCH" in |
pankso@15990 | 24 arm) |
al@19645 | 25 make CC=${HOST_SYSTEM}-gcc posix |
al@19645 | 26 ;; |
pankso@15990 | 27 i486) |
pankso@15990 | 28 sed -i s"/-O2/-Os -march=$ARCH/" src/Makefile |
al@19645 | 29 make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux |
al@19645 | 30 ;; |
pankso@15990 | 31 esac && |
al@19645 | 32 |
al@19645 | 33 make \ |
pankso@10835 | 34 INSTALL_TOP=$DESTDIR/usr \ |
al@19645 | 35 INSTALL_DATA="cp -d" \ |
al@19645 | 36 INSTALL_MAN=$DESTDIR/usr/share/man/man1 \ |
al@19808 | 37 TO_LIB="liblua.so liblua.so.${VERSION%.*} liblua.so.$VERSION" \ |
al@19645 | 38 install && |
al@19645 | 39 |
al@19808 | 40 docdir="$install/usr/share/doc/lua-$VERSION" && |
al@19808 | 41 mkdir -p $docdir && |
al@19808 | 42 cp -a doc/* $docdir && rm $docdir/*.1 && |
al@19645 | 43 |
al@19808 | 44 mkdir -p $install/usr/lib/pkgconfig && |
al@19645 | 45 cp $stuff/lua.pc $install/usr/lib/pkgconfig |
pankso@634 | 46 } |
pankso@634 | 47 |
al@19808 | 48 testsuite() { |
al@19808 | 49 readelf -h $install/usr/bin/lua |
al@19808 | 50 } |
al@19808 | 51 |
pankso@634 | 52 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@634 | 53 genpkg_rules() |
pankso@634 | 54 { |
al@19808 | 55 case $PACKAGE in |
al@19808 | 56 lua) |
al@19808 | 57 copy bin/ |
al@19808 | 58 DEPENDS="ncurses readline" |
al@19808 | 59 ;; |
al@19808 | 60 liblua) |
al@19808 | 61 copy *.so* |
al@19808 | 62 CAT="libs|library" |
al@19808 | 63 ;; |
al@19808 | 64 *-dev) |
al@19808 | 65 copy @dev |
al@19808 | 66 ;; |
al@19808 | 67 esac |
pankso@634 | 68 } |