blob: 23a8c4c982fd9008168b8add765cf889e3aed4be (
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
 | require 'formula'
class Tidyp < Formula
  homepage 'http://tidyp.com/'
  url 'https://github.com/downloads/petdance/tidyp/tidyp-1.04.tar.gz'
  sha1 '5d9050512259c3a67a2f48469555932e3a7b8bd0'
  resource 'manual' do
    url "https://raw.githubusercontent.com/petdance/tidyp/6a6c85bc9cb089e343337377f76127d01dd39a1c/htmldoc/tidyp1.xsl"
    sha1 'db6b733bb8e341eb806bc7487faee69eb429a68d'
  end
  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
    # Use the newly brewed tidyp to generate the manual
    resource('manual').stage do
      system "#{bin}/tidyp -xml-help > tidyp1.xml"
      system "#{bin}/tidyp -xml-config > tidyp-config.xml"
      system "/usr/bin/xsltproc tidyp1.xsl tidyp1.xml > tidyp.1"
      man1.install gzip('tidyp.1')
    end
  end
end
 |