Obsolete
/
packaging
Archived
3
0
Fork 0

Slightly improved apk backend.

master
Luka Vandervelden 2019-08-03 13:01:29 +02:00
parent 09feb19073
commit 99d1005fbb
1 changed files with 24 additions and 9 deletions

View File

@ -4,15 +4,30 @@ def pkginfo(package)
du = `du -sk #{package.fake_root_directory}` du = `du -sk #{package.fake_root_directory}`
size = du.sub(/[ \t].*/, "").to_i * 1024 size = du.sub(/[ \t].*/, "").to_i * 1024
%{ # Generated by `package`. lines = [] of String
pkgname = #{package.name}
pkgver = #{package.version}-r#{package.release} lines << "# Generated by `package`."
url = #{package.url || ""} lines << "pkgname = #{package.name}"
size = #{size} lines << "pkgver = #{package.version}-r#{package.release}"
origin = #{package.recipe.name} lines << "url = #{package.url || ""} "
buildtype = host lines << "size = #{size}"
builddate = #{Time.utc.to_unix} lines << "origin = #{package.recipe.name}"
}.gsub /^ */m, "" lines << "buildtype = host" # Thisll need to be imported from Context.
lines << "builddate = #{Time.utc.to_unix}"
package.dependencies.each do |atom|
lines << "depends = #{atom.to_s}"
end
package.provides.each do |atom|
lines << "provides = #{atom.to_s}"
end
package.conflicts.each do |atom|
lines << "conflicts = #{atom.to_s}"
end
lines.join "\n"
end end
class Package::Backend::Packaging class Package::Backend::Packaging