|
@@ -29,7 +29,10 @@ function _generate_package_from_github(reponame)
|
|
local packagefile = path.join("packages", packagename:sub(1, 1), packagename, "xmake.lua")
|
|
local packagefile = path.join("packages", packagename:sub(1, 1), packagename, "xmake.lua")
|
|
local file = io.open(packagefile, "w")
|
|
local file = io.open(packagefile, "w")
|
|
file:print('package("%s")', packagename)
|
|
file:print('package("%s")', packagename)
|
|
- local homepage = repoinfo.homepageUrl or repoinfo.url
|
|
|
|
|
|
+ local homepage = repoinfo.homepageUrl
|
|
|
|
+ if homepage == nil or homepage == "" then
|
|
|
|
+ homepage = repoinfo.url
|
|
|
|
+ end
|
|
if homepage then
|
|
if homepage then
|
|
file:print(' set_homepage("%s")', homepage)
|
|
file:print(' set_homepage("%s")', homepage)
|
|
end
|
|
end
|
|
@@ -38,7 +41,10 @@ function _generate_package_from_github(reponame)
|
|
local licensekey = type(repoinfo.licenseInfo) == "table" and repoinfo.licenseInfo.key
|
|
local licensekey = type(repoinfo.licenseInfo) == "table" and repoinfo.licenseInfo.key
|
|
if licensekey then
|
|
if licensekey then
|
|
local licenses = {
|
|
local licenses = {
|
|
- ["apache-2.0"] = "Apache-2.0"
|
|
|
|
|
|
+ ["apache-2.0"] = "Apache-2.0",
|
|
|
|
+ ["lgpl-2.0"] = "LGPL-2.0",
|
|
|
|
+ ["lgpl-2.1"] = "LGPL-2.1",
|
|
|
|
+ ["zlib"] = "zlib"
|
|
}
|
|
}
|
|
local license = licenses[licensekey]
|
|
local license = licenses[licensekey]
|
|
if license then
|
|
if license then
|