Browse Source

lua-sha2: clean up makefile

Signed-off-by: Lars Gierth <larsg@systemli.org>
lilik-openwrt-22.03
Lars Gierth 10 years ago
parent
commit
2fea5020f6
2 changed files with 20 additions and 18 deletions
  1. +6
    -18
      lang/lua-sha2/Makefile
  2. +14
    -0
      lang/lua-sha2/patches/001-makefile.patch

+ 6
- 18
lang/lua-sha2/Makefile View File

@ -35,30 +35,18 @@ define Package/lua-sha2/description
Also contains a HMAC implementation in Lua.
endef
define Build/Configure
endef
TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
define Build/Compile
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN" \
LIBS="$(TARGET_LIBS)" \
$(MAKE) -C $(PKG_BUILD_DIR) sha2lib.o sha2.o
define Build/Configure
endef
define Package/lua-sha2/install
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN" \
LIBS="$(TARGET_LIBS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
$(TARGET_CC) -shared -o $(PKG_BUILD_DIR)/sha2.so \
$(PKG_BUILD_DIR)/sha2.o $(PKG_BUILD_DIR)/sha2lib.o
$(INSTALL_DIR) $(1)/usr/lib/lua/hmac
$(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac
endef
$(eval $(call BuildPackage,lua-sha2))

+ 14
- 0
lang/lua-sha2/patches/001-makefile.patch View File

@ -0,0 +1,14 @@
From: Lars Gierth <larsg@systemli.org>
Date: Tue, 2 Sep 2014 00:05:39 +0200
Add rump Makefile
new file mode 100644
index 0000000..f081d38
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+all: sha2.o sha2lib.o
+ $(CC) -shared -o sha2.so sha2.o sha2lib.o
+
+.PHONY: all

Loading…
Cancel
Save