AA: packages: samba36: fix segmentation fault when trying to add non-existent users
[12.09/packages.git] / net / samba36 / Makefile
1 #
2 # Copyright (C) 2007-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=samba
11 PKG_VERSION:=3.6.5
12 PKG_RELEASE:=3
13
14 PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
15         http://ftp.samba.org/pub/samba/old-versions
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_MD5SUM:=2f0c14547333c1b48fd4728b031e7040
18
19 include $(INCLUDE_DIR)/package.mk
20
21 MAKE_PATH:=source3
22 CONFIGURE_PATH:=source3
23
24 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
25
26 define Package/samba36-server
27   SECTION:=net
28   CATEGORY:=Network
29   TITLE:=Samba 3.6 SMB/CIFS server
30   URL:=http://www.samba.org/
31   DEPENDS:=+USE_EGLIBC:librt
32 endef
33
34 define Package/samba36-client
35   SECTION:=net
36   CATEGORY:=Network
37   TITLE:=Samba 3.6 SMB/CIFS client
38   URL:=http://www.samba.org/
39   DEPENDS:=+libreadline +libncurses
40 endef
41
42 define Package/samba36-server/config
43         config PACKAGE_SAMBA_MAX_DEBUG_LEVEL
44                 int "Maximum level of compiled-in debug messages"
45                 depends PACKAGE_samba36-server || PACKAGE_samba36-client
46                 default -1
47
48 endef
49
50 define Package/samba36-server/description
51  The Samba software suite is a collection of programs that implements the
52  SMB protocol for UNIX systems, allowing you to serve files and printers to
53  Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
54  to as the LanManager or Netbios protocol.
55 endef
56
57 TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
58 TARGET_LDFLAGS += -Wl,--gc-sections
59
60 CONFIGURE_VARS += \
61         ac_cv_file__proc_sys_kernel_core_pattern=yes \
62         libreplace_cv_HAVE_C99_VSNPRINTF=yes \
63         libreplace_cv_HAVE_GETADDRINFO=yes \
64         libreplace_cv_HAVE_IFACE_IFCONF=yes \
65         LINUX_LFS_SUPPORT=yes \
66         samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
67         samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
68         samba_cv_HAVE_IFACE_IFCONF=yes \
69         samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
70         samba_cv_HAVE_SECURE_MKSTEMP=yes \
71         samba_cv_HAVE_WRFILE_KEYTAB=no \
72         samba_cv_USE_SETREUID=yes \
73         samba_cv_USE_SETRESUID=yes \
74         samba_cv_have_setreuid=yes \
75         samba_cv_have_setresuid=yes \
76         ac_cv_header_zlib_h=no \
77         samba_cv_zlib_1_2_3=no
78
79 CONFIGURE_ARGS += \
80         --exec-prefix=/usr \
81         --prefix=/ \
82         --disable-avahi \
83         --disable-cups \
84         --disable-pie \
85         --disable-relro \
86         --disable-static \
87         --disable-swat \
88         --disable-shared-libs \
89         --with-codepagedir=/etc/samba \
90         --with-configdir=/etc/samba \
91         --with-included-iniparser \
92         --with-included-popt \
93         --with-lockdir=/var/lock \
94         --with-logfilebase=/var/log \
95         --with-nmbdsocketdir=/var/nmbd \
96         --with-piddir=/var/run \
97         --with-privatedir=/etc/samba \
98         --with-sendfile-support \
99         --without-cluster-support \
100         --without-ads \
101         --without-krb5 \
102         --without-ldap \
103         --without-pam \
104         --without-winbind \
105         --without-libtdb \
106         --without-libtalloc \
107         --without-libnetapi \
108         --without-libsmbclient \
109         --without-libsmbsharemodes \
110         --without-libaddns \
111         --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
112
113 MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
114
115 define Package/samba36-server/install
116         $(INSTALL_DIR) $(1)/etc/config
117         $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
118         $(INSTALL_DIR) $(1)/etc/samba
119         $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
120         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
121         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
122         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
123         $(INSTALL_DIR) $(1)/etc/init.d
124         $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
125         $(INSTALL_DIR) $(1)/usr/sbin
126         $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
127         ln -sf samba_multicall $(1)/usr/sbin/smbd
128         ln -sf samba_multicall $(1)/usr/sbin/nmbd
129         ln -sf samba_multicall $(1)/usr/sbin/smbpasswd
130 endef
131
132 define Package/samba36-client/install
133         $(INSTALL_DIR) $(1)/usr/sbin
134         $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
135         $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
136 endef
137
138 $(eval $(call BuildPackage,samba36-client))
139 $(eval $(call BuildPackage,samba36-server))
140