wireguard: Update to snapshot 0.0.20181218
[oweals/openwrt.git] / package / network / services / samba36 / Makefile
1 #
2 # Copyright (C) 2007-2014 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.25
12 PKG_RELEASE:=13
13
14 PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
15                 https://download.samba.org/pub/samba/stable
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_HASH:=8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751
18
19 PKG_LICENSE:=GPL-3.0
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:samba:samba
22
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 MAKE_PATH:=source3
28 CONFIGURE_PATH:=source3
29
30 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
31
32 define Package/samba/Default
33   SECTION:=net
34   CATEGORY:=Network
35   TITLE:=Samba 3.6 SMB/CIFS
36   URL:=https://www.samba.org/
37   MAINTAINER:=Felix Fietkau <nbd@nbd.name>
38 endef
39
40 define Package/samba36-server
41   $(call Package/samba/Default)
42   TITLE+= server
43   DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS)
44 endef
45
46 define Package/samba36-hotplug
47   $(call Package/samba/Default)
48   TITLE+= hotplug
49   DEPENDS:=+block-mount
50 endef
51
52 define Package/samba36-client
53   $(call Package/samba/Default)
54   TITLE+= client
55   DEPENDS:=+libreadline +libncurses
56 endef
57
58 define Package/samba36-net
59   $(call Package/samba/Default)
60   TITLE+= net commands
61   DEPENDS:=+libreadline +libncurses
62 endef
63
64 define Package/samba36-server/config
65         config PACKAGE_SAMBA_MAX_DEBUG_LEVEL
66                 int "Maximum level of compiled-in debug messages"
67                 depends on PACKAGE_samba36-server || PACKAGE_samba36-client
68                 default -1
69 endef
70
71 define Package/samba36-server/description
72  The Samba software suite is a collection of programs that implements the
73  SMB protocol for UNIX systems, allowing you to serve files and printers to
74  Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
75  to as the LanManager or Netbios protocol.
76 endef
77
78 TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
79 TARGET_LDFLAGS += -Wl,--gc-sections
80
81 CONFIGURE_VARS += \
82         ac_cv_lib_attr_getxattr=no \
83         ac_cv_search_getxattr=no \
84         ac_cv_file__proc_sys_kernel_core_pattern=yes \
85         libreplace_cv_HAVE_C99_VSNPRINTF=yes \
86         libreplace_cv_HAVE_GETADDRINFO=yes \
87         libreplace_cv_HAVE_IFACE_IFCONF=yes \
88         LINUX_LFS_SUPPORT=yes \
89         samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
90         samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
91         samba_cv_HAVE_IFACE_IFCONF=yes \
92         samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
93         samba_cv_HAVE_SECURE_MKSTEMP=yes \
94         samba_cv_HAVE_WRFILE_KEYTAB=no \
95         samba_cv_USE_SETREUID=yes \
96         samba_cv_USE_SETRESUID=yes \
97         samba_cv_have_setreuid=yes \
98         samba_cv_have_setresuid=yes \
99         ac_cv_header_libunwind_h=no \
100         ac_cv_header_zlib_h=no \
101         samba_cv_zlib_1_2_3=no \
102         ac_cv_path_PYTHON="" \
103         ac_cv_path_PYTHON_CONFIG=""
104
105 CONFIGURE_ARGS += \
106         --exec-prefix=/usr \
107         --prefix=/ \
108         --disable-avahi \
109         --disable-cups \
110         --disable-external-libtalloc \
111         --disable-external-libtdb \
112         --disable-external-libtevent \
113         --disable-pie \
114         --disable-relro \
115         --disable-static \
116         --disable-swat \
117         --disable-shared-libs \
118         --with-libiconv="$(ICONV_PREFIX)" \
119         --with-codepagedir=/etc/samba \
120         --with-configdir=/etc/samba \
121         --with-included-iniparser \
122         --with-included-popt \
123         --with-lockdir=/var/lock \
124         --with-logfilebase=/var/log \
125         --with-nmbdsocketdir=/var/nmbd \
126         --with-piddir=/var/run \
127         --with-privatedir=/etc/samba \
128         --with-sendfile-support \
129         --without-acl-support \
130         --without-cluster-support \
131         --without-ads \
132         --without-krb5 \
133         --without-ldap \
134         --without-pam \
135         --without-winbind \
136         --without-libtdb \
137         --without-libtalloc \
138         --without-libnetapi \
139         --without-libsmbclient \
140         --without-libsmbsharemodes \
141         --without-libtevent \
142         --without-libaddns \
143         --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
144
145 MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
146
147 define Package/samba36-server/conffiles
148 /etc/config/samba
149 /etc/samba/smb.conf.template
150 /etc/samba/smbpasswd
151 endef
152
153 define Package/samba36-server/install
154         $(INSTALL_DIR) $(1)/etc/config
155         $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
156         $(INSTALL_DIR) $(1)/etc/samba
157         $(INSTALL_CONF) ./files/smb.conf.template $(1)/etc/samba
158         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
159         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
160         $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
161         $(INSTALL_DIR) $(1)/etc/init.d
162         $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
163         $(INSTALL_DIR) $(1)/usr/sbin
164         $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
165         $(LN) samba_multicall $(1)/usr/sbin/smbd
166         $(LN) samba_multicall $(1)/usr/sbin/nmbd
167         $(LN) samba_multicall $(1)/usr/sbin/smbpasswd
168 endef
169
170 define Package/samba36-hotplug/install
171         $(INSTALL_DIR) $(1)/lib/samba
172         $(INSTALL_CONF) ./files/lib/samba.sh $(1)/lib/samba/samba.sh
173         $(INSTALL_DIR) $(1)/etc/hotplug.d/block
174         $(INSTALL_CONF) ./files/samba.hotplug $(1)/etc/hotplug.d/block/60-samba
175 endef
176
177 define Package/samba36-client/install
178         $(INSTALL_DIR) $(1)/usr/sbin
179         $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
180         $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
181 endef
182
183 define Package/samba36-net/install
184         $(INSTALL_DIR) $(1)/usr/sbin
185         $(INSTALL_BIN) $(PKG_BUILD_BIN)/net $(1)/usr/sbin
186 endef
187
188 $(eval $(call BuildPackage,samba36-client))
189 $(eval $(call BuildPackage,samba36-server))
190 $(eval $(call BuildPackage,samba36-hotplug))
191 $(eval $(call BuildPackage,samba36-net))
192