File: dh_ruby

package info (click to toggle)
mhc 1.2.4-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,460 kB
  • sloc: ruby: 12,723; lisp: 7,570; makefile: 75; sh: 72
file content (16 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/ruby

require 'getoptlong'
substvars='debian/substvars'
opts = GetoptLong.new(['--package', '-p', GetoptLong::REQUIRED_ARGUMENT])
opts.each {|opt, arg|
  case opt
  when '--package' then substvars = 'debian/' + arg + '.substvars'
  end
}

require 'rbconfig'
CONFIG = Config::MAKEFILE_CONFIG
File.open(substvars, "a+") {|f|
 f.puts "ruby:Depends=ruby (>= #{CONFIG['MAJOR']}.#{CONFIG['MINOR']}), ruby (<< #{CONFIG['MAJOR']}.#{CONFIG['MINOR'].to_i+1})"
}