summaryrefslogtreecommitdiffstats
path: root/tools/build-pkg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build-pkg.lua')
-rwxr-xr-xtools/build-pkg.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index fdfa577..0039846 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -288,6 +288,11 @@ local function gitCommit(message)
os.execute(cmd:format(message))
end
+local function isValidBinary(file)
+ local cmd = './usr/bin/%s-objdump -t %s > /dev/null 2>&1'
+ return testCommand(cmd:format(target, file))
+end
+
local function checkFile(file, pkg)
-- if it is PE32 file, it must have '.exe' in name
local ext = file:sub(-4):lower()
@@ -320,6 +325,14 @@ local function checkFile(file, pkg)
if file:match('/lib/.*%.dll$') then
log('File %s (%s): DLL in /lib/', file, pkg)
end
+ if file:match('%.dll$') or file:match('%.a$') then
+ if file:find(target, 1, true) then -- not common
+ if not isValidBinary(file) then
+ log('File %s (%s): not recognized library',
+ file, pkg)
+ end
+ end
+ end
end
-- builds package, returns list of new files