[patchteam] Update umurmur package to version 0.2.1 (and split into openssl and polar...
authorTony Butler <spudz76@gmail.com>
Sat, 27 Feb 2010 18:45:42 +0000 (18:45 +0000)
committerTony Butler <spudz76@gmail.com>
Sat, 27 Feb 2010 18:45:42 +0000 (18:45 +0000)
SVN-Revision: 19886

net/umurmur/Makefile
net/umurmur/patches/001-makefile.patch

index 3bb0102df1e73188584a78e6f1ab87e3274e63e8..6f8ffba0d7eebd9477490f0bbad654bc8c05b7de 100644 (file)
 #
 #
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 include $(TOPDIR)/rules.mk
 
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 include $(TOPDIR)/rules.mk
 
-
 PKG_NAME:=umurmur
 PKG_NAME:=umurmur
-PKG_VERSION:=0.1.3
+PKG_VERSION:=0.2.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://umurmur.googlecode.com/files/
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://umurmur.googlecode.com/files/
-PKG_MD5SUM:=f72b6f0aee7fdba31cd4faa9fb01ab6d
+PKG_MD5SUM:=e3471fb925dadc60e3b307efe2a1cc80
+
 
 include $(INCLUDE_DIR)/package.mk
 
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/umurmur
+define Package/umurmur/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=uMurmur
   SECTION:=net
   CATEGORY:=Network
   TITLE:=uMurmur
-  DEPENDS:=+libopenssl +libconfig
+  DEPENDS:=+libconfig
   URL:=http://code.google.com/p/umurmur
   MAINTAINER:=Martin Johansson <martin@fatbob.nu>
 endef
 
   URL:=http://code.google.com/p/umurmur
   MAINTAINER:=Martin Johansson <martin@fatbob.nu>
 endef
 
-define Package/umurmur/description
+define Package/umurmur/Default/description
   Minimalistic Mumble server daemon.
 endef
 
   Minimalistic Mumble server daemon.
 endef
 
-TARGET_CFLAGS := \
-       -DWRT_TARGET \
-       -I$(STAGING_DIR)/usr/include \
-       $(TARGET_CFLAGS)
+define Package/umurmur-openssl
+  $(call Package/umurmur/Default)
+  TITLE+= (with OpenSSL support)
+  DEPENDS+= +libopenssl
+endef
+
+define Package/umurmur-openssl/description
+  $(call Package/umurmur/Default/description)
+  Uses OpenSSL library for SSL and crypto.
+endef
+
+define Package/umurmur-polarssl
+  $(call Package/umurmur/Default)
+  TITLE+= (with PolarSSL support)
+  DEPENDS+= +libpolarssl
+endef
 
 
-MAKE_PATH:=src
+define Package/umurmur-polarssl/description
+  $(call Package/umurmur/Default/description)
+  Uses the PolarSSL library for SSL and crypto.
+endef
 
 
-define Package/umurmur/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) $(PKG_BUILD_DIR)/files/umurmur.conf $(1)/etc/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/umurmur.init $(1)/etc/init.d/umurmur
-       $(INSTALL_DIR) $(1)/etc/umurmur
+define Build/Compile
 endef
 
 endef
 
-$(eval $(call BuildPackage,umurmur))
+define Build/Template
+
+$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
+       -$(MAKE) -C $(PKG_BUILD_DIR)/src clean
+       CC="$(TARGET_CC)" \
+       CFLAGS="$(3) -DWRT_TARGET -I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \
+       LDFLAGS="$(4) $(TARGET_LDFLAGS)" \
+       $(MAKE) -C $(PKG_BUILD_DIR)/src all
+       ( cd $(PKG_BUILD_DIR)/src; mv -f umurmurd umurmurd-$(2))
+       touch $$@
+
+$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
+
+define Package/$(1)/conffiles
+/etc/umurmur.conf
+endef
+
+define Package/$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd-$(2) $$(1)/usr/bin/umurmurd
+       $(INSTALL_DIR) $$(1)/etc
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $$(1)/etc/
+       $(INSTALL_DIR) $$(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $$(1)/etc/init.d/umurmur
+       $(INSTALL_DIR) $$(1)/etc/umurmur
+endef
+endef
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_umurmur-openssl),)
+  define Build/with-openssl
+    $(call Build/Template,umurmur-openssl,openssl,,-lcrypto -lssl)
+  endef
+endif
+$(eval $(Build/with-openssl))
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_umurmur-polarssl),)
+  define Build/with-polarssl
+    $(call Build/Template,umurmur-polarssl,polarssl,-DUSE_POLARSSL,-lpolarssl)
+  endef
+endif
+$(eval $(Build/with-polarssl))
+
+
+$(eval $(call BuildPackage,umurmur-openssl))
+$(eval $(call BuildPackage,umurmur-polarssl))
index 218457d19c0e6658b3cfc307357f1c53e79b824b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,25 +0,0 @@
---- umurmur-0.1.3/src/Makefile.old     2009-08-26 22:00:32.000000000 +0200
-+++ umurmur-0.1.3/src/Makefile         2009-11-20 23:13:26.141571090 +0100
-@@ -5,18 +5,18 @@
- CFLAGS:=$(CFLAGS) -Wall -Os -g
- LDFLAGS:=$(LDFLAGS) -lcrypto -lssl -lconfig
--umurmurd:$(OBJS) depend.mak
-+umurmurd:$(OBJS)
-       $(CC) $(LDFLAGS) $(OBJS) -o umurmurd
- # remove object files and executable when user executes "make clean"
- clean:
-       rm *.o umurmurd 
--all: umurmur
-+all: umurmurd
- $(OBJS): Makefile
- depend.mak:
-       $(CC) -M $(SRCS) > depend.mak
--include depend.mak
-\ No newline at end of file
-+