From 2fea5020f6c6195cc289854c6b195b470dfea5a4 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Tue, 2 Sep 2014 02:54:37 +0200 Subject: [PATCH] lua-sha2: clean up makefile Signed-off-by: Lars Gierth --- lang/lua-sha2/Makefile | 24 ++++++------------------ lang/lua-sha2/patches/001-makefile.patch | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 lang/lua-sha2/patches/001-makefile.patch diff --git a/lang/lua-sha2/Makefile b/lang/lua-sha2/Makefile index 4338d6648d..6a82334e76 100644 --- a/lang/lua-sha2/Makefile +++ b/lang/lua-sha2/Makefile @@ -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)) diff --git a/lang/lua-sha2/patches/001-makefile.patch b/lang/lua-sha2/patches/001-makefile.patch new file mode 100644 index 0000000000..e395044e77 --- /dev/null +++ b/lang/lua-sha2/patches/001-makefile.patch @@ -0,0 +1,14 @@ +From: Lars Gierth +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 -- 2.30.2