hostapd: correctly handle macfile uci option
[openwrt.git] / package / network / services / 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.11
12 PKG_RELEASE:=2
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:=9039e0ab3e4fc632ff0a1a8f2433edb4
18
19 PKG_LICENSE:=GPLv3
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
23
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 MAKE_PATH:=source3
29 CONFIGURE_PATH:=source3
30
31 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
32
33 define Package/samba36-server
34   SECTION:=net
35   CATEGORY:=Network
36   TITLE:=Samba 3.6 SMB/CIFS server
37   URL:=http://www.samba.org/
38   DEPENDS:=+USE_EGLIBC:librt
39 endef
40
41 define Package/samba36-client
42   SECTION:=net
43   CATEGORY:=Network
44   TITLE:=Samba 3.6 SMB/CIFS client
45   URL:=http://www.samba.org/
46   DEPENDS:=+libreadline +libncurses
47 endef
48
49 define Package/samba36-server/config
50         config PACKAGE_SAMBA_MAX_DEBUG_LEVEL
51                 int "Maximum level of compiled-in debug messages"
52                 depends on PACKAGE_samba36-server || PACKAGE_samba36-client
53                 default -1
54
55 endef
56
57 define Package/samba36-server/description
58  The Samba software suite is a collection of programs that implements the
59  SMB protocol for UNIX systems, allowing you to serve files and printers to
60  Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
61  to as the LanManager or Netbios protocol.
62 endef
63
64 TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
65 TARGET_LDFLAGS += -Wl,--gc-sections
66
67 CONFIGURE_VARS += \
68         ac_cv_file__proc_sys_kernel_core_pattern=yes \
69         libreplace_cv_HAVE_C99_VSNPRINTF=yes \
70         libreplace_cv_HAVE_GETADDRINFO=yes \
71         libreplace_cv_HAVE_IFACE_IFCONF=yes \
72         LINUX_LFS_SUPPORT=yes \
73         samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
74         samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
75         samba_cv_HAVE_IFACE_IFCONF=yes \
76         samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
77         samba_cv_HAVE_SECURE_MKSTEMP=yes \
78         samba_cv_HAVE_WRFILE_KEYTAB=no \
79         samba_cv_USE_SETREUID=yes \
80         samba_cv_USE_SETRESUID=yes \
81         samba_cv_have_setreuid=yes \
82         samba_cv_have_setresuid=yes \
83         ac_cv_header_zlib_h=no \
84         samba_cv_zlib_1_2_3=no
85
86 CONFIGURE_ARGS += \
87         --exec-prefix=/usr \
88         --prefix=/ \
89         --disable-avahi \
90         --disable-cups \
91         --disable-pie \
92         --disable-relro \
93         --disable-static \
94         --disable-swat \
95         --disable-shared-libs \
96         --with-codepagedir=/etc/samba \
97         --with-configdir=/etc/samba \
98         --with-included-iniparser \
99         --with-included-popt \
100         --with-lockdir=/var/lock \
101         --with-logfilebase=/var/log \
102         --with-nmbdsocketdir=/var/nmbd \
103         --with-piddir=/var/run \
104         --with-privatedir=/etc/samba \
105         --with-sendfile-support \
106         --without-cluster-support \
107         --without-ads \
108         --without-krb5 \
109         --without-ldap \
110         --without-pam \
111         --without-winbind \
112         --without-libtdb \
113         --without-libtalloc \
114         --without-libnetapi \
115         --without-libsmbclient \
116         --without-libsmbsharemodes \
117         --without-libaddns \
118         --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
119
120 MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
121
122 define Package/samba36-server/install
123         $(INSTALL_DIR) $(1)/etc/config
124         $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
125         $(INSTALL_DIR) $(1)/etc/samba
126         $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
127         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
128         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
129         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
130         $(INSTALL_DIR) $(1)/etc/init.d
131         $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
132         $(INSTALL_DIR) $(1)/usr/sbin
133         $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
134         ln -sf samba_multicall $(1)/usr/sbin/smbd
135         ln -sf samba_multicall $(1)/usr/sbin/nmbd
136         ln -sf samba_multicall $(1)/usr/sbin/smbpasswd
137 endef
138
139 define Package/samba36-client/install
140         $(INSTALL_DIR) $(1)/usr/sbin
141         $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
142         $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
143 endef
144
145 $(eval $(call BuildPackage,samba36-client))
146 $(eval $(call BuildPackage,samba36-server))
147