gluon/package/features
Matthias Schiffer ee5ec5afe5 build: rewrite features.sh in Lua
The `features` file is converted to a Lua-based DSL.

A helper function `_` is used in the DSL; this will return the original
string for enabled features, and nil for disabled features. This allows
to use boolean operations on features without making the code too
verbose.

Besides having more readable and robust code, this also fixes the bug
that all files `packages/*/features` were evaluated instead of only
using the feature definitions of currently active feeds.
2020-07-01 20:35:22 +02:00

70 lines
1.2 KiB
Plaintext

-- GLUON_FEATURES definition file
--
-- See the page `dev/packages` (Developer Documentation / Package development)
-- in the `docs` directory or on gluon.readthedocs.io for information on the
-- file format
feature(_'web-wizard', {
nodefault = true,
packages = {
'gluon-config-mode-hostname',
'gluon-config-mode-geo-location',
'gluon-config-mode-contact-info',
'gluon-config-mode-outdoor',
},
})
feature(_'web-wizard' and _'autoupdater', {
packages = {
'gluon-config-mode-autoupdater',
},
})
feature(_'web-wizard' and (_'mesh-vpn-fastd' or _'mesh-vpn-tunneldigger'), {
packages = {
'gluon-config-mode-mesh-vpn',
},
})
feature(_'web-advanced', {
nodefault = true,
packages = {
'gluon-web-admin',
'gluon-web-network',
'gluon-web-wifi-config',
},
})
feature(_'web-advanced' and _'autoupdater', {
packages = {
'gluon-web-autoupdater',
},
})
feature(_'status-page' and _'mesh-batman-adv-15', {
packages = {
'gluon-status-page-mesh-batman-adv',
},
})
feature(_'mesh-batman-adv-15', {
packages = {
'gluon-ebtables-limit-arp',
'gluon-radvd',
},
})
feature(_'mesh-babel', {
packages = {
'gluon-radvd',
},
})
feature(not _'wireless-encryption-wpa3', {
packages = {
'hostapd-mini',
},
})