aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/makepkg.rb
blob: d5537e24e886a2ce3a144a29403efe7deb32e81d (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
30
31
32
33
34
35
36
37
38
require "formula"

class Makepkg < Formula
  homepage "https://wiki.archlinux.org/index.php/makepkg"
  url "ftp://ftp.archlinux.org/other/pacman/pacman-4.1.2.tar.gz"
  sha1 "ed9a40a9b532bc43e48680826d57518134132538"

  bottle do
    cellar :any
    sha1 "e3b89d1ae8609703898902b7a847716418366c01" => :mavericks
    sha1 "9dd3f631e927bb662671a8d6b40b2bf91d29e72e" => :mountain_lion
    sha1 "ad5e0e8ecf0565352c9ce8ada1fd686918e04b11" => :lion
  end

  depends_on "pkg-config" => :build
  depends_on "libarchive" => :build
  depends_on "bash"
  depends_on "fakeroot"

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--sysconfdir=#{etc}"
    cd "scripts" do
      system "make", "makepkg"
      bin.install "makepkg"
    end
    cd "etc" do
      system "make", "makepkg.conf"
      etc.install "makepkg.conf"
    end
  end

  test do
    (testpath/"PKGBUILD").write("source=(https://androidnetworktester.googlecode.com/files/10kb.txt)")
    system "#{bin}/makepkg", "-dg"
  end
end