Slightly improved apk backend.
parent
09feb19073
commit
99d1005fbb
|
@ -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" # This’ll 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
|
||||
|
|
Reference in New Issue