diff --git a/lang/lua-sha2/Makefile b/lang/lua-sha2/Makefile index 4338d6648..6a82334e7 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 000000000..e395044e7 --- /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