2011-08-22 01:31:25 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Samba < Formula
|
|
|
|
homepage 'http://samba.org/'
|
2013-02-15 16:11:14 +00:00
|
|
|
url 'http://www.samba.org/samba/ftp/stable/samba-3.6.8.tar.gz'
|
|
|
|
sha1 'a3cd91fa8835c7c47e4cb3ab419f92b4895052b5'
|
2011-08-22 01:31:25 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
# Needed for autogen.sh
|
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
2012-07-04 21:34:19 +00:00
|
|
|
|
2011-08-22 01:31:25 +00:00
|
|
|
# Fixes the Grouplimit of 16 users os OS X.
|
|
|
|
# Bug has been raised upstream:
|
|
|
|
# https://bugzilla.samba.org/show_bug.cgi?id=8773
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2012-08-15 16:35:17 +00:00
|
|
|
# Enable deprecated CUPS structs on Mountain Lion
|
|
|
|
# https://github.com/mxcl/homebrew/issues/13790
|
|
|
|
ENV['CFLAGS'] += " -D_IPP_PRIVATE_STRUCTURES"
|
2011-08-22 01:31:25 +00:00
|
|
|
cd 'source3' do
|
|
|
|
system "./autogen.sh"
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-configdir=#{prefix}/etc"
|
|
|
|
system "make install"
|
2012-08-31 04:06:18 +00:00
|
|
|
(prefix/'etc').mkpath
|
2012-09-06 22:50:12 +00:00
|
|
|
touch prefix/'etc/smb.conf'
|
2011-08-22 01:31:25 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/source3/lib/system.c 2012-02-22 22:46:14.000000000 -0200
|
|
|
|
+++ b/source3/lib/system.c 2012-02-22 22:47:51.000000000 -0200
|
|
|
|
@@ -1161,7 +1161,14 @@
|
|
|
|
|
|
|
|
int groups_max(void)
|
|
|
|
{
|
|
|
|
-#if defined(SYSCONF_SC_NGROUPS_MAX)
|
|
|
|
+#if defined(DARWINOS)
|
|
|
|
+ /* On OS X, sysconf(_SC_NGROUPS_MAX) returns 16
|
|
|
|
+ * due to OS X's group nesting and getgrouplist
|
|
|
|
+ * will return a flat list; users can exceed the
|
|
|
|
+ * maximum of 16 groups. And easily will.
|
|
|
|
+ */
|
|
|
|
+ return 32; // NGROUPS_MAX is defined, hence the define above is void.
|
|
|
|
+#elif defined(SYSCONF_SC_NGROUPS_MAX)
|
|
|
|
int ret = sysconf(_SC_NGROUPS_MAX);
|
|
|
|
return (ret == -1) ? NGROUPS_MAX : ret;
|
|
|
|
#else
|