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