Changeset 4249


Ignore:
Timestamp:
2006-07-24T09:13:53+02:00 (12 years ago)
Author:
nico
Message:

add a lang subdir, port lua to buildroot-ng

Location:
packages/lang
Files:
1 added
2 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • packages/lang/lua/Makefile

    r3112 r4249  
     1#  
     2# Copyright (C) 2006 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
    17# $Id$ 
    28 
     
    612PKG_VERSION:=5.0.2 
    713PKG_RELEASE:=1 
    8 PKG_MD5SUM:= dea74646b7e5c621fef7174df83c34b1 
    914 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1017PKG_SOURCE_URL:=http://www.lua.org/ftp/ \ 
    1118        http://ftp.gwdg.de/pub/languages/lua/ \ 
    1219        http://mirrors.dotsrc.org/lua/ \ 
    1320        http://www.tecgraf.puc-rio.br/lua/ftp/ 
    14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     21PKG_MD5SUM:= dea74646b7e5c621fef7174df83c34b1 
    1522PKG_CAT:=zcat 
    1623 
    17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    1824PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    1925 
    20 include $(TOPDIR)/package/rules.mk 
     26include $(INCLUDE_DIR)/package.mk 
    2127 
    22 $(eval $(call PKG_template,LIBLUA,liblua,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    23 $(eval $(call PKG_template,LUA,lua,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    24 $(eval $(call PKG_template,LUAC,luac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    25 $(eval $(call PKG_template,LUA_EXAMPLES,lua-examples,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     28define Package/liblua 
     29  SECTION:=libs 
     30  CATEGORY:=Libraries 
     31  TITLE:=LUA programming language (libraries) 
     32  DESCRIPTION:=LUA programming language (libraries).\\\ 
     33    Lua is a powerful light-weight programming language designed for extending \\\ 
     34    applications. Lua is also frequently used as a general-purpose, stand-alone \\\ 
     35    language. Lua is free software.\\\ 
     36    \\\ 
     37    This package contains the LUA shared libraries, needed by other programs. 
     38  URL:=http://www.lua.org/ 
     39endef 
    2640 
    27 $(PKG_BUILD_DIR)/.configured: 
    28         touch $@ 
     41define Package/lua 
     42  SECTION:=utils 
     43  CATEGORY:=Utilities 
     44  DEPENDS:=+liblua 
     45  TITLE:=LUA programming language (interpreter) 
     46  DESCRIPTION:=LUA programming language (interpreter).\\\ 
     47    Lua is a powerful light-weight programming language designed for extending \\\ 
     48    applications. Lua is also frequently used as a general-purpose, stand-alone \\\ 
     49    language. Lua is free software.\\\ 
     50    \\\ 
     51    This package contains the LUA language interpreter. 
     52  URL:=http://www.lua.org/ 
     53endef 
    2954 
    30 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured 
     55define Package/lua-examples 
     56  SECTION:=utils 
     57  CATEGORY:=Utilities 
     58  DEPENDS:=lua 
     59  TITLE:=LUA programming language (examples) 
     60  DESCRIPTION:=LUA programming language (examples).\\\ 
     61    Lua is a powerful light-weight programming language designed for extending \\\ 
     62    applications. Lua is also frequently used as a general-purpose, stand-alone \\\ 
     63    language. Lua is free software.\\\ 
     64    \\\ 
     65    This package contains LUA language examples. 
     66  URL:=http://www.lua.org/ 
     67endef 
     68 
     69define Package/luac 
     70  SECTION:=utils 
     71  CATEGORY:=Utilities 
     72  DEPENDS:=+liblua 
     73  TITLE:=LUA programming language (compiler) 
     74  DESCRIPTION:=LUA programming language (compiler).\\\ 
     75    Lua is a powerful light-weight programming language designed for extending \\\ 
     76    applications. Lua is also frequently used as a general-purpose, stand-alone \\\ 
     77    language. Lua is free software.\\\ 
     78    \\\ 
     79    This package contains the LUA language compiler. 
     80  URL:=http://www.lua.org/ 
     81endef 
     82 
     83define Build/Configure 
     84endef 
     85 
     86define Build/Compile 
    3187        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    3288                CC="$(TARGET_CROSS)gcc" \ 
     
    54110                INSTALL_ROOT="$(PKG_INSTALL_DIR)/usr" \ 
    55111                install soinstall 
    56         touch $@ 
     112endef 
    57113 
    58 $(IPKG_LIBLUA): 
    59         install -d -m0755 $(IDIR_LIBLUA)/usr/lib 
    60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.so.* $(IDIR_LIBLUA)/usr/lib/ 
    61         $(RSTRIP) $(IDIR_LIBLUA) 
    62         $(IPKG_BUILD) $(IDIR_LIBLUA) $(PACKAGE_DIR) 
     114define Package/liblua/install 
     115        install -d -m0755 $(1)/usr/lib 
     116        $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.so.* $(1)/usr/lib/ 
     117endef 
    63118 
    64 $(IPKG_LUA): 
    65         install -d -m0755 $(IDIR_LUA)/usr/bin 
    66         $(CP) $(PKG_INSTALL_DIR)/usr/bin/lua $(IDIR_LUA)/usr/bin/ 
    67         $(RSTRIP) $(IDIR_LUA) 
    68         $(IPKG_BUILD) $(IDIR_LUA) $(PACKAGE_DIR) 
     119define Package/lua/install 
     120        install -d -m0755 $(1)/usr/bin 
     121        $(CP) $(PKG_INSTALL_DIR)/usr/bin/lua $(1)/usr/bin/ 
     122endef 
    69123 
    70 $(IPKG_LUAC): 
    71         install -d -m0755 $(IDIR_LUAC)/usr/bin 
    72         $(CP) $(PKG_INSTALL_DIR)/usr/bin/luac $(IDIR_LUAC)/usr/bin/ 
    73         $(RSTRIP) $(IDIR_LUAC) 
    74         $(IPKG_BUILD) $(IDIR_LUAC) $(PACKAGE_DIR) 
     124define Package/luac/install 
     125        install -d -m0755 $(1)/usr/bin 
     126        $(CP) $(PKG_INSTALL_DIR)/usr/bin/luac $(1)/usr/bin/ 
     127endef 
    75128 
    76 $(IPKG_LUA_EXAMPLES): 
    77         install -d -m0755 $(IDIR_LUA_EXAMPLES)/usr/share/lua/examples 
     129define Package/lua-examples/install 
     130        install -d -m0755 $(1)/usr/share/lua/examples 
    78131        install -m0644 $(PKG_BUILD_DIR)/test/*.lua \ 
    79                 $(IDIR_LUA_EXAMPLES)/usr/share/lua/examples/ 
    80         $(RSTRIP) $(IDIR_LUA_EXAMPLES) 
    81         $(IPKG_BUILD) $(IDIR_LUA_EXAMPLES) $(PACKAGE_DIR) 
     132                $(1)/usr/share/lua/examples/ 
     133endef 
    82134 
    83 $(STAGING_DIR)/usr/lib/liblua.so: $(PKG_BUILD_DIR)/.built 
     135define Build/InstallDev 
    84136        mkdir -p $(STAGING_DIR)/usr/include 
    85137        $(CP) $(PKG_INSTALL_DIR)/usr/include/lua{,lib}.h $(STAGING_DIR)/usr/include/ 
     
    87139        mkdir -p $(STAGING_DIR)/usr/lib 
    88140        $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.{a,so*} $(STAGING_DIR)/usr/lib/ 
    89         touch $@ 
     141endef 
    90142 
    91 install-dev: $(STAGING_DIR)/usr/lib/liblua.so 
    92  
    93 uninstall-dev: 
     143define Build/UninstallDev 
    94144        rm -rf \ 
    95145                $(STAGING_DIR)/usr/include/lua{,lib}.h \ 
    96146                $(STAGING_DIR)/usr/include/lauxlib.h \ 
    97                 $(STAGING_DIR)/usr/lib/liblua{,lib}.{a,so*} \ 
     147                $(STAGING_DIR)/usr/lib/liblua{,lib}.{a,so*} 
     148endef 
    98149 
    99 compile-targets: install-dev 
    100 clean-targets: uninstall-dev 
     150$(eval $(call BuildPackage,liblua)) 
     151$(eval $(call BuildPackage,lua)) 
     152$(eval $(call BuildPackage,lua-examples)) 
     153$(eval $(call BuildPackage,luac)) 
Note: See TracChangeset for help on using the changeset viewer.