Obsolete
/
packaging
Archived
3
0
Fork 0

Improved Weird backend.

master
Luka Vandervelden 2019-09-19 17:52:56 +02:00
parent c720f78f11
commit f8fea34206
1 changed files with 7 additions and 2 deletions

View File

@ -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 ", "}"