Merge pull request #4768 from pprindeville/isc-dhcp-update-4.3.6
[feed/packages.git] / lang / lua-md5 / Makefile
1 #
2 # Copyright (C) 2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lua-md5
11 PKG_VERSION:=1.2
12 PKG_RELEASE:=1
13 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
14 PKG_LICENSE:=MIT
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_VERSION:=024b65738b4434860777fc43d7cacaefea29ec60
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/lua-md5
27 SUBMENU:=Lua
28 SECTION:=lang
29 CATEGORY:=Languages
30 TITLE:=Lua-MD5
31 URL:=https://github.com/keplerproject/md5
32 DEPENDS:=+lua
33 endef
34
35 define Package/lua-md5/description
36 MD5 offers basic cryptographic facilities for Lua
37 endef
38
39 TARGET_CFLAGS += $(FPIC)
40
41 # add make variable overrides here
42 MAKE_FLAGS +=
43
44 define Build/Configure
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 PREFIX="$(STAGING_DIR)/usr" \
50 LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
51 clean
52 $(MAKE) -C $(PKG_BUILD_DIR) \
53 PREFIX="$(STAGING_DIR)/usr" \
54 LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
55 LIB_OPTION="-shared" \
56 CC="$(TARGET_CROSS)gcc" \
57 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
58 all
59 endef
60
61 define Build/Install
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
64 LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
65 install
66 endef
67
68 define Package/lua-md5/install
69 $(INSTALL_DIR) $(1)/usr/lib/lua
70 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua
71 $(INSTALL_DIR) $(1)/usr/lib/lua/md5
72 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so
73 endef
74
75 $(eval $(call BuildPackage,lua-md5))