diff options
-rw-r--r-- | aports/pkg.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/aports/pkg.lua b/aports/pkg.lua index 87637d9..0a08bfc 100644 --- a/aports/pkg.lua +++ b/aports/pkg.lua @@ -73,23 +73,23 @@ function M.get_repo_name(pkg) return string.match(pkg.dir, ".*/(.*)/.*") end -function M.get_apk_file_name(pkg) - return pkg.pkgname.."-"..pkg.pkgver.."-r"..pkg.pkgrel..".apk" +function M.get_apk_file_name(pkg, name) + return (name or pkg.pkgname).."-"..pkg.pkgver.."-r"..pkg.pkgrel..".apk" end -function M.get_apk_file_path(pkg) +function M.get_apk_file_path(pkg, name) if abuild.pkgdest ~= nil and abuild.pkgdest ~= "" then - return abuild.pkgdest.."/"..M.get_apk_file_name(pkg) + return abuild.pkgdest.."/"..M.get_apk_file_name(pkg, name) end - if abuild.repodest ~= nil and abuild.epodest ~= "" then - return abuild.repodest.."/"..M.get_repo_name(pkg).."/"..abuild.arch.."/"..M.get_apk_file_name(pkg) + if abuild.repodest ~= nil and abuild.repodest ~= "" then + return abuild.repodest.."/"..M.get_repo_name(pkg).."/"..abuild.arch.."/"..M.get_apk_file_name(pkg, name) end - return pkg.dir.."/"..M.get_apk_file_name(pkg) + return pkg.dir.."/"..M.get_apk_file_name(pkg, name) end -function M.apk_file_exists(pkg) +function M.apk_file_exists(pkg, name) -- technically we check if it is readable... - local filepath = M.get_apk_file_path(pkg) + local filepath = M.get_apk_file_path(pkg, name) local f = io.open(filepath) if f == nil then return false |