From 0c6fcf6ed0680585a51f1f615a1a341bb4d07614 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 25 Sep 2019 21:09:04 -0700 Subject: [PATCH] umurmur: Switch to CMake Fixed license information. Added HTTPS to URL. Signed-off-by: Rosen Penev --- net/umurmur/Makefile | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/net/umurmur/Makefile b/net/umurmur/Makefile index 6ce30ff3a..29c8a0d8c 100644 --- a/net/umurmur/Makefile +++ b/net/umurmur/Makefile @@ -12,16 +12,14 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)? PKG_HASH:=e77b7b6616768f4a1c07442afe49a772692f667b00c23cc85909d4dd0ce206d2 -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - PKG_MAINTAINER:=Martin Johansson PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/umurmur/Default SECTION:=net @@ -29,7 +27,7 @@ define Package/umurmur/Default SUBMENU:=Instant Messaging TITLE:=uMurmur DEPENDS:=+libconfig +libprotobuf-c - URL:=http://umurmur.net + URL:=https://umurmur.net endef define Package/umurmur/Default/description @@ -60,13 +58,6 @@ define Package/umurmur-mbedtls/description Uses the mbed TLS library for SSL and crypto. endef -define Build/Compile - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - $(MAKE) -C $(PKG_BUILD_DIR)/src all -endef - define Package/umurmur-openssl/conffiles /etc/umurmur.conf endef @@ -75,7 +66,7 @@ Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles) define Package/umurmur-openssl/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/umurmurd $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d @@ -85,14 +76,21 @@ endef Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install) -ifeq ($(BUILD_VARIANT),openssl) - CONFIGURE_ARGS += \ - --with-ssl=openssl -endif +CMAKE_OPTIONS += \ + -DLIBCONFIG_INCLUDE_DIR="$(STAGING_DIR)/include" \ + -DLIBCONFIG_LIBRARIES="$(STAGING_DIR)/lib" \ + -DLIBCONFIG_LIB_DIR="$(STAGING_DIR)/lib" \ + -DPROTOBUFC_INCLUDE_DIR="$(STAGING_DIR)/include" \ + -DPROTOBUFC_LIBRARIES="$(STAGING_DIR)/lib" \ + -DPROTOBUFC_LIB_DIR="$(STAGING_DIR)/lib" -ifeq ($(BUILD_VARIANT),mbedtls) - CONFIGURE_ARGS += \ - --with-ssl=mbedtls +ifeq ($(BUILD_VARIANT),openssl) +CMAKE_OPTIONS += -DSSL=openssl +else +CMAKE_OPTIONS += -DSSL=mbedtls \ + -DMBEDTLS_INCLUDE_DIR="$(STAGING_DIR)/include/mbedtls" \ + -DMBEDTLS_LIBRARIES="$(STAGING_DIR)/lib" \ + -DMBEDTLS_LIB_DIR="$(STAGING_DIR)/lib" endif $(eval $(call BuildPackage,umurmur-openssl))