File: gem_helper.rb

package info (click to toggle)
puppet-agent 8.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,392 kB
  • sloc: ruby: 286,820; sh: 492; xml: 116; makefile: 88; cs: 68
file content (21 lines) | stat: -rw-r--r-- 532 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'gem2deb/metadata'

@metadata = Gem2Deb::Metadata.new('.')

# load gemspec
cleaned_gemspec = @metadata.gemspec

# our gem only ships the libs
cleaned_gemspec.executables = nil
cleaned_gemspec.files = Dir['lib/**/*']

# write out new gemspec
File.open('debian/puppet.gemspec', 'w') do |file|
  file.write(cleaned_gemspec.to_ruby)
end

# write out substvars
dependencies = @metadata.get_debian_dependencies(false)
File.open("debian/puppet-agent.substvars", "a") do |fd|
  fd.puts "ruby:Depends=#{dependencies.join(', ')}"
end