aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rinetd.rb
blob: d07f0f4ca59a99a00a673ecefb39d1fcd8fce871 (plain)
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
require 'formula'

class Rinetd <Formula
  url 'http://www.boutell.com/rinetd/http/rinetd.tar.gz'
  homepage 'http://www.boutell.com/rinetd/'
  md5 '28c78bac648971724c46f1a921154c4f'
  version '0.62'

  def install
    inreplace 'rinetd.c' do |contents|
      contents.gsub! "/etc/rinetd.conf", "#{etc}/rinetd.conf"
      contents.gsub! "/var/run/rinetd.pid", "#{var}/rinetd.pid"
    end

    system "make"
    bin.install "rinetd"
    (man+'man8').install "rinetd.8"
    conf = etc+"rinetd.conf"
    conf.write(DATA.read) unless conf.exist?
  end
end

__END__
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress bindport connectaddress connectport