From c720ba450ac3d44d05770d93310bbfd26d51681f Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Sat, 27 Feb 2010 18:45:42 +0000 Subject: [PATCH] Update umurmur package to version 0.2.1 (and split into openssl and polarssl versions) - closes #6745 - thanks Zuljin SVN-Revision: 19886 --- net/umurmur/Makefile | 94 ++++++++++++++++++++------ net/umurmur/patches/001-makefile.patch | 25 ------- 2 files changed, 73 insertions(+), 46 deletions(-) diff --git a/net/umurmur/Makefile b/net/umurmur/Makefile index 3bb0102df..6f8ffba0d 100644 --- a/net/umurmur/Makefile +++ b/net/umurmur/Makefile @@ -1,50 +1,102 @@ # -# 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 - 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_MD5SUM:=f72b6f0aee7fdba31cd4faa9fb01ab6d +PKG_MD5SUM:=e3471fb925dadc60e3b307efe2a1cc80 + include $(INCLUDE_DIR)/package.mk -define Package/umurmur +define Package/umurmur/Default SECTION:=net CATEGORY:=Network TITLE:=uMurmur - DEPENDS:=+libopenssl +libconfig + DEPENDS:=+libconfig URL:=http://code.google.com/p/umurmur MAINTAINER:=Martin Johansson endef -define Package/umurmur/description +define Package/umurmur/Default/description 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 -$(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)) diff --git a/net/umurmur/patches/001-makefile.patch b/net/umurmur/patches/001-makefile.patch index 218457d19..e69de29bb 100644 --- a/net/umurmur/patches/001-makefile.patch +++ b/net/umurmur/patches/001-makefile.patch @@ -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 -+ -- 2.30.2