Improved Weird backend.
parent
c720f78f11
commit
f8fea34206
|
@ -34,17 +34,22 @@ class WeirdBackend < Package::Backend::Packaging
|
|||
end
|
||||
|
||||
def generate_spec(package : Package::Package, file_name : String)
|
||||
du = `du -sk #{package.fake_root_directory}`
|
||||
size = du.sub(/[ \t].*/, "").to_i * 1024
|
||||
|
||||
file = File.open file_name, "w"
|
||||
|
||||
file.puts "name: #{package.name}"
|
||||
file.puts "version: #{package.version}"
|
||||
file.puts "release: #{package.release}"
|
||||
file.puts
|
||||
file.puts "size: #{size}"
|
||||
file.puts "origin: #{package.recipe.name}"
|
||||
file.puts "slot: #{package.prefix}"
|
||||
file.puts
|
||||
file.puts "url: #{package.url}"
|
||||
file.puts "description: #{package.description}"
|
||||
file.puts
|
||||
file.puts "slot: #{package.prefix}"
|
||||
file.puts
|
||||
file.puts "dependencies: #{package.dependencies.join ", "}"
|
||||
file.puts "conflicts: #{package.conflicts.join ", "}"
|
||||
file.puts "provides: #{package.provides.join ", "}"
|
||||
|
|
Reference in New Issue