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