2 # Copyright (C) 2008-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
13 PKG_MD5SUM
:=11ed2bfef4090bd5736b194b43f67289
15 PKG_SOURCE_URL
:=ftp
://ftp.samba.org
/pub
/samba
/old-versions
/
16 PKG_SOURCE
:=samba-
$(PKG_VERSION
).
tar.gz
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/samba-
$(PKG_VERSION
)
20 include $(INCLUDE_DIR
)/package.mk
21 include $(INCLUDE_DIR
)/nls.mk
23 define Package
/samba3
/Default
27 URL
:=http
://www.samba.org
/
31 $(call Package
/samba3
/Default
)
32 TITLE
:=SMB server for file and printer sharing
33 DEPENDS
:=+libpthread
+libpopt
$(ICONV_DEPENDS
)
36 define Package
/samba3-nmbd
37 $(call Package
/samba3
/Default
)
38 TITLE
:=NetBIOS name server
42 define Package
/samba3-mountcifs
43 $(call Package
/samba3
/Default
)
46 TITLE
:=Mount utility for samba shares
49 define Package
/samba3
/description
50 SMB server for file and printer sharing
51 Also contains a SMB password utility
(smbpasswd
)
53 Made small with patches taken from AVM GPL releases and freetz
56 define Package
/samba3-nmbd
/description
59 Made small with patches taken from AVM GPL releases and freetz
62 define Package
/cifsmount
/description
63 An user space helper utility for mounting remote CIFS shares.
66 define Package
/samba3
/conffiles
68 /etc
/samba
/smb.conf.template
71 define Package
/samba3
/config
72 source
"$(SOURCE)/Config.in"
75 TARGET_CFLAGS
+=$(if
$(CONFIG_SAMBA3_CONFIG_DEBUG
),-DSAMBA_DEBUG
,-DMAX_DEBUG_LEVEL
=2)
76 TARGET_CFLAGS
+=$(if
$(CONFIG_SAMBA3_CONFIG_SMALLER
),-DAVM_SMALLER
)
77 TARGET_CFLAGS
+=$(if
$(CONFIG_SAMBA3_CONFIG_NO_PRINTING
),-DAVM_NO_PRINTING
)
78 CONFIGURE_PATH
:=source
80 $(if
$(CONFIG_SAMBA3_CONFIG_DEBUG
),--enable-debug
) \
85 --with-configdir
=/etc
/samba \
86 --with-libiconv
=$(ICONV_PREFIX
) \
87 --with-privatedir
=/etc
/samba
89 # Make sure we tell the configure script that we support negative enum values and want to use setresuid
91 SMB_BUILD_CC_NEGATIVE_ENUM_VALUES
=yes \
92 samba_cv_USE_SETEUID
=no \
93 samba_cv_have_setresuid
=yes \
94 samba_cv_USE_SETRESUID
=yes \
95 samba_cv_HAVE_C99_VSNPRINTF
=yes \
96 samba_cv_have_longlong
=yes \
97 ac_cv_type_long_long
=yes \
101 $(if
$(CONFIG_SAMBA3_CONFIG_NO_PRINTING
),OWRT_NO_PRINTING
=1) \
102 $(if
$(CONFIG_SAMBA3_CONFIG_SMALLER
),OWRT_SMALLER
=1)
105 # Ugly fix for parallel building (without this some generated files will be missing upon clean build)
106 $(call Build
/Compile
/Default
, proto_exists
)
107 $(call Build
/Compile
/Default
, \
108 $(if
$(CONFIG_PACKAGE_samba3
),bin
/smbd bin
/smbpasswd
) \
109 $(if
$(CONFIG_PACKAGE_samba3-nmbd
),bin
/nmbd
) \
110 $(if
$(CONFIG_PACKAGE_samba3-mountcifs
),bin
/mount.cifs bin
/umount.cifs
) \
114 define Package
/samba3
/install
115 $(INSTALL_DIR
) $(1)/etc
/{samba
,init.d
,config
}
116 $(INSTALL_BIN
) .
/files
/samba.init
$(1)/etc
/init.d
/samba
117 $(INSTALL_DATA
) .
/files
/samba.config
$(1)/etc
/config
/samba
118 $(INSTALL_DATA
) .
/files
/smb.conf.template
$(1)/etc
/samba
/
119 touch
$(1)/etc
/samba
/smbpasswd
120 $(INSTALL_DIR
) $(1)/usr
/sbin
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/source
/bin
/smbpasswd
$(1)/usr
/sbin
/
122 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/source
/bin
/smbd
$(1)/usr
/sbin
/
125 define Package
/samba3-nmbd
/install
126 $(INSTALL_DIR
) $(1)/etc
/init.d
127 $(INSTALL_BIN
) .
/files
/samba-nmbd.init
$(1)/etc
/init.d
/samba-nmbd
128 $(INSTALL_DIR
) $(1)/usr
/sbin
129 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/source
/bin
/nmbd
$(1)/usr
/sbin
/
132 define Package
/samba3-mountcifs
/install
133 $(INSTALL_DIR
) $(1)/usr
/sbin
134 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/source
/bin
/mount.cifs
$(1)/usr
/sbin
/
135 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/source
/bin
/umount.cifs
$(1)/usr
/sbin
/
138 $(eval
$(call BuildPackage
,samba3
))
139 $(eval
$(call BuildPackage
,samba3-nmbd
))
140 $(eval
$(call BuildPackage
,samba3-mountcifs
))