aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/uwsgi.rb
blob: 3c101834a3f2b6217e74538bb8a15b632356cac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'formula'

class Uwsgi < Formula
  homepage 'http://projects.unbit.it/uwsgi/'
  url 'http://projects.unbit.it/downloads/uwsgi-1.2.4.tar.gz'
  sha1 '853ddbc1e4a0d98f2e81930dff46239d4bb12310'

  skip_clean :all # stripping breaks the executable

  def install
    # Find the arch for the Python we are building against.
    # We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
    archs = archs_for_command("python")
    archs.remove_ppc!
    arch_flags = archs.as_arch_flags

    ENV.append 'CFLAGS', arch_flags
    ENV.append 'LDFLAGS', arch_flags

    system "python", "uwsgiconfig.py", "--build"
    bin.install "uwsgi"
  end
end