From: Sebastian Kemper Date: Sun, 26 Nov 2017 21:32:10 +0000 (+0100) Subject: restund: Clean up Makefile X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0bc5fee11009ed5ef7da0cb9c8d1bb08d8728260;p=feed%2Ftelephony.git restund: Clean up Makefile Remove unneeded variables, dependencies, whitespaces and trailing slashes, use specific INSTALL directive instead of "$(CP)". Signed-off-by: Sebastian Kemper --- diff --git a/net/restund/Makefile b/net/restund/Makefile index 61f8ed0..8e0476e 100644 --- a/net/restund/Makefile +++ b/net/restund/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2016 OpenWrt.org +# Copyright (C) 2010-2017 OpenWrt.org # Copyright (C) 2010 Alfred E. Heggestad # # This is free software, licensed under the GNU General Public License v2. @@ -13,7 +13,7 @@ PKG_VERSION:=0.4.12 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +PKG_SOURCE_URL:=http://www.creytiv.com/pub PKG_HASH:=3170441dc882352ab0275556b6fc889b38b14203d936071b5fa12f39a5c86d47 PKG_LICENSE:=BSD-3-Clause @@ -22,9 +22,9 @@ PKG_MAINTAINER:=Jiri Slachta PKG_INSTALL:=1 -restund-mods:= mysql +restund-mods:=mysql -PKG_CONFIG_DEPENDS:= $(patsubst %,CONFIG_PACKAGE_restund-mod-%,$(restund-mods)) +PKG_CONFIG_DEPENDS:=$(patsubst %,CONFIG_PACKAGE_restund-mod-%,$(restund-mods)) include $(INCLUDE_DIR)/package.mk @@ -32,16 +32,16 @@ define Package/restund/Default SECTION:=net CATEGORY:=Network SUBMENU:=Telephony - URL:=http://www.creytiv.com/ + URL:=http://www.creytiv.com endef define Package/restund $(call Package/restund/Default) TITLE:=Modular STUN/TURN server - DEPENDS:=+libre +libpthread + DEPENDS:=+libre endef -restund-mod-mysql:= USE_MYSQL +restund-mod-mysql:=USE_MYSQL RESTUND_MOD_OPTIONS:= \ $(foreach m,$(restund-mods),$(restund-mod-$(m))=$(if $(CONFIG_PACKAGE_restund-mod-$(m)),1)) @@ -54,23 +54,22 @@ MAKE_FLAGS+= \ SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \ SYSROOT_ALT="$(STAGING_DIR)/usr" \ RELEASE=1 \ - OS="linux" \ $(RESTUND_MOD_OPTIONS) define Package/restund/install $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/restund $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/restund $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/lib/restund/modules - $(CP) \ + $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/auth.so \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/binding.so \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/stat.so \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/status.so \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/syslog.so \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/turn.so \ - $(1)/usr/lib/restund/modules/ + $(1)/usr/lib/restund/modules $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc $(SED) \ 's|^\(module_path\)\([ \t]\+\).*$$$$|\1\2/usr/lib/restund/modules|g' \ $(1)/etc/restund.conf @@ -92,16 +91,16 @@ define BuildPlugin define Package/restund-mod-$(1) $$(call Package/restund/Default) - TITLE:= restund $(2) module - DEPENDS:= restund $(4) + TITLE:=restund $(2) module + DEPENDS:=restund $(4) endef define Package/restund-mod-$(1)/install [ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/restund/modules for f in $(3); do \ - $(CP) \ + $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/restund/modules/$$$$$$$${f}.so \ - $$(1)/usr/lib/restund/modules/ ; \ + $$(1)/usr/lib/restund/modules; \ done endef