This repository has been archived by the owner on Aug 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
ttime.gemspec
50 lines (44 loc) · 1.48 KB
/
ttime.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require 'date'
dpkg = {}
IO.popen('dpkg-parsechangelog').each do |line|
dpkg[:version] = line.split[1] if line.start_with?('Version:')
if line.start_with?('Date:')
dpkg[:date] = Date.parse(line.split[1..-1].join(' '))
end
end
dpkg_description_started = false
description_arr = []
File.open('debian/control').each do |line|
if dpkg_description_started
if line.start_with?(' ')
description_arr += [line[1..-1]]
else
dpkg_description_started = false
end
end
if line.start_with?('Description:')
dpkg[:summary] = line.split[1..-1].join(' ')
dpkg_description_started = true
end
end
dpkg[:description] = description_arr.join('\n')
Gem::Specification.new do |s|
s.name = 'ttime'
s.version = dpkg[:version]
s.date = dpkg[:date]
s.summary = dpkg[:summary]
s.description = dpkg[:description]
s.authors = ['Ohad Lutzky', 'Boaz Goldstein', 'Haggai Eran']
s.email = '[email protected]'
s.homepage = 'http://github.com/lutzky/ttime'
s.files = Dir.glob('{bin,data,lib}/**/*') + %w(README.rdoc)
s.executables = ['ttime']
s.require_path = 'lib'
s.add_runtime_dependency "gtk2", [">= 1.1"]
s.add_runtime_dependency "gettext", [">= 2.2"]
s.add_runtime_dependency "rsvg2", [">= 1.1"]
s.add_runtime_dependency "zip", [">= 2.0"]
s.add_runtime_dependency "libxml-ruby", [">= 2.3"]
s.add_runtime_dependency "tzinfo", [">= 0.3"]
s.add_runtime_dependency "test-unit"
end