lua-sha2: clean up makefile 265/head
authorLars Gierth <larsg@systemli.org>
Tue, 2 Sep 2014 00:54:37 +0000 (02:54 +0200)
committerLars Gierth <larsg@systemli.org>
Tue, 2 Sep 2014 01:02:04 +0000 (03:02 +0200)
Signed-off-by: Lars Gierth <larsg@systemli.org>
lang/lua-sha2/Makefile
lang/lua-sha2/patches/001-makefile.patch [new file with mode: 0644]

index 4338d6648d499da45feaac341e63ee61cbbb06e0..6a82334e764057265b7b4948e6a3190e6045f9e9 100644 (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))
diff --git a/lang/lua-sha2/patches/001-makefile.patch b/lang/lua-sha2/patches/001-makefile.patch
new file mode 100644 (file)
index 0000000..e395044
--- /dev/null
@@ -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