Skip to content
Snippets Groups Projects
Verified Commit 13e4efbb authored by Karel Koci's avatar Karel Koci :metal:
Browse files

lists: handle Luci languages packages in systematic way

parent c8ace775
Branches
Tags
1 merge request!123Turris OS 5.0 (HBK)
......@@ -3,6 +3,81 @@ _FEATURE_GUARD_
Install("luci", "luci-lighttpd", { priority = 40 })
forInstall(luci,base,proto-ipv6,proto-ppp,app-commands)
_LUCI_I18N_(base, commands)
--[[
All packages with localization packages
Generated using:
curl https://repo.turris.cz/hbd/omnia/packages/luci/Packages | sed -n 's/^Package: luci-i18n-\([^-]\+\).*/\1/p' | sort | uniq | sed 's/^/"/;s/$/",/'
]]
luci_i18n_pkgs = {
"adblock",
"advanced",
"ahcp",
"aria2",
"base",
"bcp38",
"clamav",
"commands",
"ddns",
"diag",
"dnscrypt",
"dynapoint",
"firewall",
"fwknopd",
"hd",
"https_dns_proxy",
"minidlna",
"mjpg",
"mwan3",
"nft",
"nlbwmon",
"noddos",
"ntpc",
"nut",
"olsr",
"openvpn",
"opkg",
"p910nd",
"pagekitec",
"polipo",
"privoxy",
"qos",
"radicale",
"radicale2",
"rp",
"samba",
"samba4",
"shadowsocks",
"shairplay",
"simple",
"splash",
"statistics",
"tinyproxy",
"transmission",
"travelmate",
"uhttpd",
"unbound",
"upnp",
"vnstat",
"vpnbypass",
"watchcat",
"wifischedule",
"wireguard",
"wol",
}
if l10n then
local luci_i18n = {["en"] = true} -- we always install English localization
for _, lang in pairs(l10n or {}) do
luci_i18n[lang] = true
end
for lang in pairs(luci_i18n) do
for _, pkg in pairs(luci_i18n_pkgs) do
Install("luci-i18n-" .. pkg .. "-" .. lang, { optional = true, priority = 20 })
end
end
end
_END_FEATURE_GUARD_
......@@ -8,6 +8,4 @@ if board == "omnia" or board == "turris1x" then
Install('luci-app-rainbow', { priority = 40 })
end
_LUCI_I18N_(ahcp, firewall, minidlna, statistics, tinyproxy, transmission, upnp)
_END_FEATURE_GUARD_
......@@ -38,8 +38,6 @@ Install("wget", "rsync", "rsyncd", "samba36-client", "samba36-server", { priorit
forInstall(luci-app,hd-idle,minidlna,samba)
Install("luci-mod-admin-full", { priority = 40 })
_LUCI_I18N_(hd-idle, minidlna, samba)
-- Encryption --
Install("cryptsetup", "kmod-cryptodev", "kmod-crypto-user", { priority = 40 })
forInstall(kmod-crypto,cbc,ctr,pcbc,des,ecb,xts)
......
......@@ -6,6 +6,5 @@ Install("kmod-usb-printer", { priority = 40 })
-- Luci
Install("luci-app-p910nd", { priority = 40 })
_LUCI_I18N_(p910nd)
_END_FEATURE_GUARD_
......@@ -20,18 +20,6 @@ define(`foreach_join',`ifelse(eval($#>3),1,`pushdef(`$1',`$4')$2`'ifelse(eval($#
define(`forInstall',`Install(foreach_join(PKGPART,`"$1-PKGPART"',`, ',shift($@)), { priority = 40 })')
define(`forInstallCritical',`Install(foreach_join(PKGPART,`"$1-PKGPART"',`, ',shift($@)), { critical = true })')
# Add languages packages for Luci
# Usage: _LUCI_I18N_(APP)
define(`_LUCI_I18N_',`local luci_i18n = {["en"] = true} -- we always install English localization
for _, lang in pairs(l10n or {}) do
luci_i18n[lang] = true
end
for lang in pairs(luci_i18n) do
for _, pkg in pairs({foreach_join(X,`"X"',`, ',$@)}) do
Install("luci-i18n-" .. pkg .. "-" .. lang, { optional = true, priority = 40 })
end
end')
# Feature guard
# Some packages might not be installable without some features. Skipping every
# additional packages ensures that at least updater is updated.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment