From patchwork Sun Jan 27 16:38:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/6] packages: Use PKG_NAME for new packages From: Adrian Schmutzler X-Patchwork-Id: 988 Message-Id: <20190127163823.23382-2-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Sun, 27 Jan 2019 17:38:18 +0100 Using PKG_NAME makes copying Makefiles to new packages and renames easier, since the risk of typos is reduced. Signed-off-by: Adrian Schmutzler --- src/packages/fff/alfred-json/Makefile | 6 +++--- src/packages/fff/fff-alfred-monitoring-proxy/Makefile | 10 +++++----- src/packages/fff/fff-dhcp/Makefile | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/packages/fff/alfred-json/Makefile b/src/packages/fff/alfred-json/Makefile index dfca763e..154b90e2 100644 --- a/src/packages/fff/alfred-json/Makefile +++ b/src/packages/fff/alfred-json/Makefile @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=https://github.com/FreifunkFranken/alfred-json.git include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/alfred-json +define Package/$(PKG_NAME) SECTION:=utils CATEGORY:=Utilities TITLE:= A.L.F.R.E.D - JSON Client @@ -21,9 +21,9 @@ define Package/alfred-json DEPENDS:=+jansson +zlib endef -define Package/alfred-json/install +define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/alfred-json $(1)/bin/ endef -$(eval $(call BuildPackage,alfred-json)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/src/packages/fff/fff-alfred-monitoring-proxy/Makefile b/src/packages/fff/fff-alfred-monitoring-proxy/Makefile index 424dd589..93d982e0 100644 --- a/src/packages/fff/fff-alfred-monitoring-proxy/Makefile +++ b/src/packages/fff/fff-alfred-monitoring-proxy/Makefile @@ -4,11 +4,11 @@ PKG_NAME:=fff-alfred-monitoring-proxy PKG_VERSION:=0.0.1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/fff-alfred-monitoring-proxy +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk -define Package/fff-alfred-monitoring-proxy +define Package/$(PKG_NAME) SECTION:=base CATEGORY:=Freifunk TITLE:= Freifunk-Franken Alfred-Monitoring-Proxy @@ -16,7 +16,7 @@ define Package/fff-alfred-monitoring-proxy DEPENDS:=+micrond +fff-random +curl +alfred-json +fff-nodewatcher endef -define Package/fff-alfred-monitoring-proxy/description +define Package/$(PKG_NAME)/description The Alfred-Monitoring-Proxy is used to send node status information to https://monitoring.freifunk-franken.de/ endef @@ -25,8 +25,8 @@ define Build/Prepare echo "all: " > $(PKG_BUILD_DIR)/Makefile endef -define Package/fff-alfred-monitoring-proxy/install +define Package/$(PKG_NAME)/install $(CP) ./files/* $(1)/ endef -$(eval $(call BuildPackage,fff-alfred-monitoring-proxy)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/src/packages/fff/fff-dhcp/Makefile b/src/packages/fff/fff-dhcp/Makefile index d6304128..82c03e10 100644 --- a/src/packages/fff/fff-dhcp/Makefile +++ b/src/packages/fff/fff-dhcp/Makefile @@ -4,11 +4,11 @@ PKG_NAME:=fff-dhcp PKG_VERSION:=1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/fff-dhcp +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk -define Package/fff-dhcp +define Package/$(PKG_NAME) SECTION:=base CATEGORY:=Freifunk TITLE:=Freifunk-Franken dhcp @@ -16,7 +16,7 @@ define Package/fff-dhcp DEPENDS:=+dnsmasq endef -define Package/fff-dhcp/description +define Package/$(PKG_NAME)/description This is the fff-dhcp for the Freifunk Franken Firmware It is used to configure dnsmasq for use as gateway. endef @@ -33,8 +33,8 @@ define Build/Compile # nothing endef -define Package/fff-dhcp/install +define Package/$(PKG_NAME)/install $(CP) ./files/* $(1)/ endef -$(eval $(call BuildPackage,fff-dhcp)) +$(eval $(call BuildPackage,$(PKG_NAME)))