[patchteam] Update umurmur package to version 0.2.1 (and split into openssl and polarssl versions) - closes #6745 - thanks Zuljin

git-svn-id: svn://svn.openwrt.org/openwrt/packages@19886 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
spudz76 2010-02-27 18:45:42 +00:00
parent b3b5550d5c
commit 9304f12ff2
2 changed files with 75 additions and 48 deletions

View File

@ -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 <martin@fatbob.nu>
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)
MAKE_PATH:=src
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 Package/umurmur-openssl
$(call Package/umurmur/Default)
TITLE+= (with OpenSSL support)
DEPENDS+= +libopenssl
endef
$(eval $(call BuildPackage,umurmur))
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
define Package/umurmur-polarssl/description
$(call Package/umurmur/Default/description)
Uses the PolarSSL library for SSL and crypto.
endef
define Build/Compile
endef
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))

View 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
+