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}`
size = du.sub(/[ \t].*/, "").to_i * 1024
%{ # Generated by `package`.
pkgname = #{package.name}
pkgver = #{package.version}-r#{package.release}
url = #{package.url || ""}
size = #{size}
origin = #{package.recipe.name}
buildtype = host
builddate = #{Time.utc.to_unix}
}.gsub /^ */m, ""
lines = [] of String
lines << "# Generated by `package`."
lines << "pkgname = #{package.name}"
lines << "pkgver = #{package.version}-r#{package.release}"
lines << "url = #{package.url || ""} "
lines << "size = #{size}"
lines << "origin = #{package.recipe.name}"
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
class Package::Backend::Packaging