-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pkgforge
More file actions
32 lines (26 loc) · 747 Bytes
/
.pkgforge
File metadata and controls
32 lines (26 loc) · 747 Bytes
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
name 'iana-etc'
org 'amylum'
source(type: 'empty')
patch 'license.patch'
patch 'scripts.patch'
build do
run "mkdir -p #{releasedir}/usr/share/iana-etc #{releasedir}/etc"
urls = {
protocol: 'https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml',
port: 'https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml'
}
target = {
protocol: 'protocols',
port: 'services'
}
sharedir = "#{releasedir}/usr/share/iana-etc"
[:protocol, :port].each do |x|
raw_path = "#{sharedir}/#{x}-numbers.iana"
run "curl -sLo '#{raw_path}' '#{urls[x]}'"
run "gawk -f #{x}s.awk '#{raw_path}' > #{releasedir}/etc/#{target[x]}"
end
nil
end
test do
# TODO: add tests
end