forked from freifunk-franken/firmware
Adrian Schmutzler
1946aaca87
So far, we ensure the selection of a specific variant by copying included Make files. This not only breaks if the packages are used as a feed, but also is against the concept of how packages are used. In this patch, the fff package is converted into a set of variants that allow selection via a FFF_VARIANT variable that is exported by buildscript. If no export happens, e.g. when using packages in a feed, no package is selected. Since the names fff-node and fff-layer3 are not available anymore, the packages for the variants are called (though irrelevant for the user): * fff-variant-layer3 * fff-variant-node The only drawback is that we now have to specify the list of available variants in the buildscript. However, these values are hardcoded in several other places as well, and the former code based on file names was not really appealing anyway. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Robert Langhammer <rlanghammer@web.de> Reviewed-by: Robert Langhammer <rlanghammer@web.de>
57 lines
1.2 KiB
Makefile
57 lines
1.2 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=fff
|
|
PKG_RELEASE:=9
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/fff-variant/default
|
|
SECTION:=base
|
|
CATEGORY:=Freifunk
|
|
URL:=https://www.freifunk-franken.de
|
|
DEFAULT:=$(if $(filter fff-variant-$(FFF_VARIANT),$(1)),y,n)
|
|
DEPENDS:= \
|
|
+iptables \
|
|
+ip6tables \
|
|
+micrond \
|
|
+odhcp6c \
|
|
+fff-config \
|
|
+fff-network \
|
|
+fff-nodewatcher \
|
|
+fff-simple-tc \
|
|
+fff-support \
|
|
+fff-sysupgrade \
|
|
+fff-timeserver \
|
|
+fff-web-ui \
|
|
+fff-wireless
|
|
endef
|
|
|
|
define Package/fff-variant/default/description
|
|
This package is used to switch one of the variants on by default
|
|
endef
|
|
|
|
define Package/fff-variant-layer3
|
|
$(Package/fff-variant/default)
|
|
TITLE:=Freifunk-Franken Layer3 Variant
|
|
DEPENDS+=+fff-layer3
|
|
VARIANT:=layer3
|
|
endef
|
|
|
|
define Package/fff-variant-layer3/description
|
|
$(Package/fff-variant/default/description)
|
|
endef
|
|
|
|
define Package/fff-variant-node
|
|
$(Package/fff-variant/default)
|
|
TITLE:=Freifunk-Franken Node Variant
|
|
DEPENDS+=+fff-node
|
|
VARIANT:=node
|
|
endef
|
|
|
|
define Package/fff-variant-node/description
|
|
$(Package/fff-variant/default/description)
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,fff-variant-layer3))
|
|
$(eval $(call BuildPackage,fff-variant-node))
|