Commit Graph

58 Commits

Author SHA1 Message Date
Sven Roederer
2b11ec6fd0 luci.mk: make SUBMENU package define customizable and optional
When including luci.mk in external repos it's sometimes usefull to not use
the default LuCI-submenu hierarchy.
This change defines the LUCI_SUBMENU_FORCED variable which completely overrides
the default submenu of the LuCI config-section. When LUCI_SUBMENU_FORCED is not
defined, the default submenu derrived from LUCI_TYPE or "Application" fallback
is used.
Defining LUCI_SUBMENU_FORCED in the package Makefile will just use this value.
Setting it to "none" will not define a submenu at all.
Together with LUCI_SECTION and LUCI_CATEGORY menu items can now created at any
place in the menu structure.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2021-06-02 07:07:22 -10:00
Sven Roederer
209141d491 luci.mk: add PKG_PROVIDES make-macro to set package/provides option
Add PKG_PROVIDES macro to be passed down to buildpackage defines as  PROVIDES variable.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2021-06-02 07:07:22 -10:00
Sven Roederer
ae0795deb0 luci.mk: add URL and MAINTAINER fields to package-definitions
Add the LUCI_URL and LUCI_MAINTAINER variables to pass them to the buildpackage
defines. Give them some sane defaults and allow overwritting by the individual
package.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2021-06-02 07:07:22 -10:00
Hauke Mehrtens
c80fcd2375 build: luci.mk: Fix warning in Kconfig for Dutch language
When the Dutch translation was added there was no name for the language
added, this created such a Kconfig entry:

     config LUCI_LANG_nl
	   tristate " (nl)"

This entry created the following warning message when doing make
oldconfig in OpenWrt:
tmp/.config-package.in:24525:warning: leading whitespace ignored

This is fixed here by adding a name to the language.

Fixes: 1e301ca2df ("Translated using Weblate (Dutch)")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-25 13:57:51 +02:00
Jo-Philipp Wich
de2c0451f3 build: luci.mk: allow overriding menu category and section values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-07-20 18:46:02 +02:00
Sven Roederer
3b2a1e9e11 luci.mk: reorder to have common-things in a block
The luci.mk file has grown over the years and became more complex. This
change reorders some sections to make it more easy to read and understand
on the first view.

* move all constants into a common block
* put all standard package definitons together
* put the specific sections for the "luci-base" behind the common things
* have the defines for the translations at the very end

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
2020-07-19 19:49:16 +02:00
Paul Spooren
a777cc796f translation: add Arabic to luci.mk
Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-05-21 08:21:00 -10:00
Hannu Nyman
4d8647500f i18n: add Finnish to supported languages
There is some translation effort ongoing in weblate,
so add also Finnish to the list of supported languages.

Katsotaan riittääkö innostuneita kääntäjiä...

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-05-15 22:01:44 +03:00
Paul Spooren
72942a9cca translation: add Bengali to luci.mk
This includes `bn_BD` and `bn` via an alias.

Weblate currently does not support `bn_IN` (Indian Bangla), so I think
the alias is reasonable.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-04-29 14:32:09 -10:00
Jo-Philipp Wich
62be45c466 build: luci.mk: fix compatibility with older Git versions
Fixes: 9d8e99f9b build: gracefully handle non-Git source trees
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-15 12:44:57 +02:00
Jo-Philipp Wich
0705657747 build: luci.mk: gracefully handle missing or unversioned po subdirectories
Fixes: #3911
Fixes: 9d8e99f9b build: gracefully handle non-Git source trees
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-14 18:42:59 +02:00
Jo-Philipp Wich
b9dda90716 Revert "build: luci.mk: gracefully handle missing or unversioned po subdirectories"
This reverts commit e6f77d5d72.
Commit contained unrelated changes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-14 18:42:36 +02:00
Jo-Philipp Wich
e6f77d5d72 build: luci.mk: gracefully handle missing or unversioned po subdirectories
Fixes: #3911
Fixes: 9d8e99f9b build: gracefully handle non-Git source trees
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-14 18:29:13 +02:00
Jo-Philipp Wich
9d8e99f9be build: gracefully handle non-Git source trees
Fixes: #3911
Fixes: 59fe4086f ("build: luci.mk: drop support for non-Git SCMs")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-14 17:43:08 +02:00
Jo-Philipp Wich
0fa1bce8cf build: luci.mk: honour PKG_VERSION if set
Also pass correct variable to builds to ensure that version.lua and cache
buster strings are properly interpolated.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-11 21:26:16 +02:00
DENG Qingfang
b7ac596937 luci.mk: correct titles of zh_Hans and zh_Hant
zh_Hans: 简体中文 (Chinese Simplified)
zh_Hant: 繁體中文 (Chinese Traditional)

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-04-11 08:02:32 +08:00
Jo-Philipp Wich
372c54ec6f build: luci.mk: rework package version handling
- Derive the version of packages from the last change of the sources
 - Derive the version of i18n packages from the last change of the po dir

Fixes: #2257
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-09 23:23:33 +02:00
Jo-Philipp Wich
59fe4086f3 build: luci.mk: drop support for non-Git SCMs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-09 23:23:33 +02:00
Jo-Philipp Wich
ca558f4f93 build: reload rpcd in package postinstall
Send a SIGHUP to rpcd after installing LuCI packages to reload ACL rules.

Also remove redundant code while we're at it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-03 15:21:55 +01:00
Florian Eckert
b448008b47 luci.mk: Only install a default post-install script if there is none defined
If a postinst script is defined in the package Makefile, it will
not be included because it will be replaced by the default postinst
script. To solve the problem, we now check, if we have a postinst script.
And if so, it will be installed instead of the default postinst script.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-02-27 15:50:46 +01:00
Wellington Uemura
151787b561 luci.mk: correcting a misspell for Brazilian Portuguese
Reported-by: Wellington Uemura

* update message header
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-02-27 15:00:29 +01:00
Florian Eckert
b9292a6f57 luci.mk: move /tmp/luci-modulecache remove to package postinst script
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-02-14 09:20:48 +01:00
Florian Eckert
1f8a3c0417 luci.mk: move /tmp/luci-indexcache remove to package postinst script
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-02-14 09:20:33 +01:00
Jo-Philipp Wich
48749ca873 treewide: switch to bcp47 language codes
Fixes: #3477
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-29 13:37:46 +01:00
Florian Eckert
359379078e
Merge pull request #3400 from TDT-AG/pr/20191210-luci-mk
luci.mk: move indexcache delete into postinst
2019-12-29 14:37:40 +01:00
Jo-Philipp Wich
04bb544937
Merge pull request #3352 from NeoRaider/move-luasrcdiet
luci-base: use luasrcdiet from separate package
2019-12-25 18:04:28 +01:00
Paul Spooren
14deec75bf translation: add Marāṭhī to luci.mk
Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-12-11 02:56:23 -10:00
Florian Eckert
1f84f268cc luci.mk: move indexcache delete into postinst
Almost every uci-defaults script for ucitrack execute after the uci
commands the following line '/tmp/luci-indexcache'.
So that we don't always write the same thing, we now do this in
postinst.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-12-10 13:28:19 +01:00
Matthias Schiffer
b0d8fff3e4
luci-base: use luasrcdiet from separate package
luasrcdiet is being moved to the packages feed as a separate package.
Adjust luci feed accordingly.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2019-11-23 13:42:09 +01:00
Paul Spooren
4798b3f062 translation: Add Bulgarian to luci.mk
Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-10-30 23:43:56 -10:00
Gyrotron
629c941eff Added privoxy Hindi translations
Signed-off-by: Simmar Kalsi <simmarkalsi@gmail.com>
2019-05-29 21:51:49 +05:30
Jo-Philipp Wich
0de1dcbf4a build: add build option to minify *.css files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-12 09:47:37 +01:00
Jo-Philipp Wich
17690f2d73 build: add build option to minify *.js files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-22 12:49:14 +01:00
Jo-Philipp Wich
63fbf5a805 luci-base: fix luasrcdiet
- Stage required libraries as well
 - Remove not existing make target
 - Override library search path

Fixes: b5d5e5bf1 ("luci-base: update luasrcdiet")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-28 14:21:51 +02:00
Jo-Philipp Wich
ccbb17d260
Merge pull request #1915 from Ansuel/upgrade
luci-base: update luasrcdiet
2018-06-27 16:43:36 +02:00
Ansuel Smith
b5d5e5bf13
luci-base: update luasrcdiet
Tested and works with no problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-06-27 16:41:02 +02:00
Yurii
86ed5ab65e
luci.mk: Correcting native name Ukrainian language. 2018-06-17 23:33:35 +03:00
Jo-Philipp Wich
06bb427dd9 luci.mk: allow specifying EXTRA_DEPENDS
Support a new varable LUCI_EXTRA_DEPENDS which can be used to pass
OpenWrt EXTRA_DEPENDS to buildroot.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-01 17:10:31 +01:00
Florian Eckert
713d463248 luci.mk: sort languages in lexical order
sorting language in .config by lexical order

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2017-08-11 13:08:41 +02:00
amitabha
d3861e7f8d luci.mk: Update language name for Chinese
Rectification of non-standard name for language Chinese.
Signed-off-by: Angus Ding angus.ding@gmail.com
2017-05-08 23:29:39 +08:00
Hannu Nyman
b9159c5347 luci.mk: fix length of abbreviated hash in version
Fix the length of the abbreviated commit hash used in
the LuCI version string used in the package names.
Use the old standard of seven characters in hash.

New git versions vary the length of the abbreviated
commit hash based on the number of objects in repo. That
may lead into different hash lengths with e.g. having
full/shallow git history, having all/single branch or
having different git versions in different build hosts.

Different hash lengths in package name may lead to
sneaky opkg install errors, as opkg apparently preserves
info for removed packages and may prefer that.
Example:
$ opkg install http://downloads...luci-app-statistics_git-17.073.42825-b47a21f-1_all.ipk
Downloading http://downloads...luci-app-statistics_git-17.073.42825-b47a21f-1_all.ipk
Installing luci-app-statistics (git-17.073.42825-b47a21fbb-1) to root...
Collected errors:
 * opkg_download_pkg: Package luci-app-statistics is not available from any configured src.

The error above is ultimately in opkg, but mitigate
the problem by fixing the hash length when building LuCI.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-04-23 09:59:20 +03:00
Jo-Philipp Wich
7942a23c81 luci.mk: only use remote branch detection
LEDE's scripts/feeds script creates local branches named after the checked
out commit hash, confusing local branch detection.

Solely use remote branch detection to avoid misidentifying such cases.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-20 14:34:16 +01:00
Jo-Philipp Wich
05c5924434 luci.mk: fix branch detection in detached HEAD state
When LuCI is checked out via pinned feeds configuration, its source tree will
end up in detached head state, requiring some more magic to figure out the
proper branch.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-20 14:16:09 +01:00
Weongyo Jeong
9d640e4c4c Adds Korean translation.
Adds Korean language supported for Luci of OpenWRT.  Most of msgs which
shown at UI are translated but still not completed for non-popular
features.

Signed-off-by: Weongyo Jeong <weongyo@gmail.com>
2016-12-20 23:11:11 +09:00
Jo-Philipp Wich
d7d97723fe luci.mk: add simple cache buster
Append a ?v=version string to any media or resource URL that has a .js or .css
extension.

Also substitute placeholders in the form <%# xxxPKG_VERSION %> where
xxx is replaced verbatim and PKG_VERSION with the actual version, e.g.
<%# ?x=PKG_VERSION %> will result in "?x=git-16.237.30043-f885853".

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-11-01 16:50:50 +01:00
Matthias Schiffer
4d97a9f698
luci-base: use default install paths for host utils
This reverts commit d4c3372020.

PATH inconsistencies and Host/Install arguments have been fixed in both
LEDE and OpenWrt, so we can revert the revert.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-10-09 22:44:15 +02:00
Jo-Philipp Wich
d4c3372020 Revert "luci-base: use default install paths for host utils"
This reverts commit 87a7570690.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-10-05 01:44:02 +02:00
Matthias Schiffer
87a7570690 luci-base: use default install paths for host utils
Also, don't make any assumptions about the staging dir lua and LuaSrcDiet
were installed to.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-10-03 18:07:43 +02:00
Kevin Darbyshire-Bryant
4580faaa5e luci-base: fix lua interpreter location
An lua interpreter is required on the building host to run the
luasrcdiet lua script.  Due to a build change, the interpreter was not
being installed to the correct location.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-06-03 10:24:09 +01:00
Hannu Nyman
7553654bb1 LuCI: Display the proper LuCI git branch in GUI
Adjust luci.mk and luci-base to find out correctly if Luci is built
from master or from a branch. Display that value in the footer and
the overview page.

* Evaluate the git branch in luci.mk and pass that to LuCI submodules
  as a make variable. Use branch name, ignore tags.
* Deprecate svn detection in luci-base's mkversion.sh that generates
  version.lua. Simply use the value passed by make.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-03-10 19:50:58 +02:00