lib/vanagon/platform/deb.rb
# Method to generate the files required to build a debian package for the project
#
# @param workdir [String] working directory to stage the evaluated templates in
# @param name [String] name of the project
# @param binding [Binding] binding to use in evaluating the packaging templates
Method to generate the files required to build a debian package for the project
Method to generate the files required to build a debian package for the project
def generate_packaging_artifacts(workdir, name, binding)
        deb_dir = File.join(workdir, "debian")
        FileUtils.mkdir_p(deb_dir)
        ["changelog", "conffiles", "control", "docs", "dirs", "install", "preinst", "postinst", "postrm", "prerm", "rules"].each do |deb_file|
          erb_file(File.join(VANAGON_ROOT, "resources/deb/#{deb_file}.erb"), File.join(deb_dir, deb_file), false, { :binding => binding })
        end
        File.open(File.join(deb_dir, "compat"), "w") { |f| f.puts("7") }
        FileUtils.mkdir_p(File.join(deb_dir, "source"))
        File.open(File.join(deb_dir, "source", "format"), "w") { |f| f.puts("3.0 (quilt)") }
      end
def generate_packaging_artifacts ( workdir , name , binding ) deb_dir = File . join ( workdir , "debian" ) FileUtils . mkdir_p ( deb_dir ) [ "changelog" , "conffiles" , "control" , "docs" , "dirs" , "install" , "preinst" , "postinst" , "postrm" , "prerm" , "rules" ] . each do | deb_file | erb_file ( File . join ( VANAGON_ROOT , "resources/deb/#{deb_file}.erb" ) , File . join ( deb_dir , deb_file ) , false , { :binding => binding } ) end File . open ( File . join ( deb_dir , "compat" ) , "w" ) { | f | f . puts ( "7" ) } FileUtils . mkdir_p ( File . join ( deb_dir , "source" ) ) File . open ( File . join ( deb_dir , "source" , "format" ) , "w" ) { | f | f . puts ( "3.0 (quilt)" ) } end
Method to generate the files required to build a debian package for the project
Method to generate the files required to build a debian package for the project
# Lots of templates here # These could be templates, but their content is static, so that seems weird.
workdir
working directory to stage the evaluated templates in
working directory to stage the evaluated templates in
name
name of the project
name of the project
binding
binding to use in evaluating the packaging templates
binding to use in evaluating the packaging templates