Slightly improved apk backend.
parent
09feb19073
commit
99d1005fbb
|
@ -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" # 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
|
end
|
||||||
|
|
||||||
class Package::Backend::Packaging
|
class Package::Backend::Packaging
|
||||||
|
|
Reference in New Issue