2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_MD5SUM
:=54870482fe036b7e69dd48c90661eec6
16 PKG_SOURCE_URL
:=ftp
://se.samba.org
/pub
/samba
/stable \
17 ftp
://ftp.easynet.be
/samba
/stable
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
28 SUBMENU
:=A NetBIOS
/SMB implementation
29 TITLE
:=A NetBIOS
/SMB implementation
30 DESCRIPTION
:=The Samba software suite is a collection of programs that implements the
\\\
31 SMB protocol for unix systems
, allowing you to serve files and printers to
\\\
32 Windows
, NT
, OS
/2 and DOS clients. This protocol is sometimes also referred
\\\
33 to
as the LanManager or Netbios protocol.
34 URL
:=http
://www.samba.org
/
37 define Package
/samba-server
39 TITLE
:=NetBIOS
/SMB file and
print server
42 define Package
/samba-client
44 TITLE
:=NetBIOS
/SMB simple client
48 rm -rf
$(PKG_INSTALL_DIR
)
49 mkdir
-p
$(PKG_INSTALL_DIR
)
50 (cd
$(PKG_BUILD_DIR
)/source
; rm -rf config.
{cache
,status
} ; \
57 --datadir=/usr
/share \
58 --includedir=/usr
/include \
59 --infodir=/usr
/share
/info \
61 --libexecdir
=/usr
/lib \
62 --localstatedir
=/var
/log
/samba \
63 --mandir=/usr
/share
/man \
65 --sysconfdir
=/etc
/samba \
66 $(DISABLE_LARGEFILE
) \
68 --with-lockdir
=/var
/run
/samba \
69 --with-privatedir
=/etc
/samba \
71 $(MAKE
) -C
$(PKG_BUILD_DIR
)/source \
72 bin
/make_smbcodepage bin
/make_unicodemap
73 (cd
$(PKG_BUILD_DIR
)/source
/bin
; \
74 mv
-f make_smbcodepage make_smbcodepage.old
; \
75 mv
-f make_unicodemap make_unicodemap.old
; \
77 $(MAKE
) -C
$(PKG_BUILD_DIR
)/source \
79 (cd
$(PKG_BUILD_DIR
)/source
; rm -rf config.
{cache
,status
}; \
80 $(TARGET_CONFIGURE_OPTS
) \
81 CFLAGS
="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
82 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
83 LDFLAGS
="-lgcc_s -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
84 ac_cv_lib_cups_httpConnect
=no \
87 ac_cv_sizeof_short
=2 \
88 samba_cv_FTRUNCATE_NEEDS_ROOT
=no \
89 samba_cv_HAVE_BROKEN_FCNTL64_LOCKS
=no \
90 samba_cv_HAVE_BROKEN_GETGROUPS
=no \
91 samba_cv_HAVE_BROKEN_READDIR
=no \
92 samba_cv_HAVE_FCNTL_LOCK
=yes \
93 samba_cv_HAVE_FNMATCH
=yes \
94 samba_cv_HAVE_FTRUNCATE_EXTEND
=no \
95 samba_cv_HAVE_GETTIMEOFDAY_TZ
=yes \
96 samba_cv_HAVE_IFACE_AIX
=no \
97 samba_cv_HAVE_IFACE_IFCONF
=yes \
98 samba_cv_HAVE_IFACE_IFREQ
=yes \
99 samba_cv_HAVE_INO64_T
=yes \
100 samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES
=no \
101 samba_cv_HAVE_OFF64_T
=yes \
102 samba_cv_HAVE_ROOT
=yes \
103 samba_cv_HAVE_SECURE_MKSTEMP
=yes \
104 samba_cv_HAVE_SHARED_MMAP
=yes \
105 samba_cv_HAVE_STRUCT_FLOCK64
=yes \
106 samba_cv_HAVE_SYSV_IPC
=no \
107 samba_cv_HAVE_TRUNCATED_SALT
=no \
108 samba_cv_HAVE_UNION_SEMUN
=no \
109 samba_cv_HAVE_UNSIGNED_CHAR
=yes \
110 samba_cv_NEED_SGI_SEMUN_HACK
=no \
111 samba_cv_REPLACE_INET_NTOA
=no \
112 samba_cv_SIZEOF_INO_T
=4 \
113 samba_cv_SIZEOF_OFF_T
=4 \
114 samba_cv_SYSCONF_SC_NGROUPS_MAX
=yes \
115 samba_cv_USE_SETEUID
=yes \
116 samba_cv_USE_SETRESUID
=no \
117 samba_cv_USE_SETREUID
=yes \
118 samba_cv_USE_SETUIDX
=no \
119 samba_cv_have_longlong
=yes \
120 samba_cv_have_setresgid
=no \
121 samba_cv_have_setresuid
=no \
123 --target
=$(GNU_TARGET_NAME
) \
124 --host
=$(GNU_TARGET_NAME
) \
125 --build
=$(GNU_HOST_NAME
) \
126 --program-prefix
="" \
127 --program-suffix
="" \
131 --datadir=/usr
/share \
132 --includedir=/usr
/include \
133 --infodir=/usr
/share
/info \
135 --libexecdir
=/usr
/lib \
136 --localstatedir
=/var
/log
/samba \
137 --mandir=/usr
/share
/man \
138 --sbindir
=/usr
/sbin \
139 --sysconfdir
=/etc
/samba \
140 $(DISABLE_LARGEFILE
) \
142 --with-lockdir
=/var
/run
/samba \
143 --with-privatedir
=/etc
/samba \
146 $(MAKE
) -C
$(PKG_BUILD_DIR
)/source \
147 $(TARGET_CONFIGURE_OPTS
) \
148 CODEPAGEDIR
="/usr/share/samba" \
150 (cd
$(PKG_BUILD_DIR
)/source
/bin
; \
151 mv
-f make_smbcodepage.old make_smbcodepage
; touch make_smbcodepage
; \
152 mv
-f make_unicodemap.old make_unicodemap
; touch make_unicodemap
; \
154 mkdir
-p
$(PKG_INSTALL_DIR
)/usr
/share
/samba
155 mkdir
-p
$(PKG_INSTALL_DIR
)/var
/log
156 $(MAKE
) -C
$(PKG_BUILD_DIR
)/source \
157 BASEDIR
="$(PKG_INSTALL_DIR)/usr" \
158 BINDIR
="$(PKG_INSTALL_DIR)/usr/bin" \
159 SBINDIR
="$(PKG_INSTALL_DIR)/usr/bin" \
160 LIBDIR
="$(PKG_INSTALL_DIR)/usr/lib" \
161 VARDIR
="$(PKG_INSTALL_DIR)/var/log/samba" \
162 MANDIR
="$(PKG_INSTALL_DIR)/usr/share/man" \
163 CONFIGDIR
="$(PKG_INSTALL_DIR)/etc/samba" \
164 PRIVATEDIR
="$(PKG_INSTALL_DIR)/etc/samba" \
165 SWATDIR
="$(PKG_INSTALL_DIR)/usr/swat" \
166 LOCKDIR
="$(PKG_INSTALL_DIR)/var/run/samba" \
167 SAMBABOOK
="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \
168 CODEPAGEDIR
="$(PKG_INSTALL_DIR)/usr/share/samba" \
172 define Package
/samba-server
/install
173 install -d
-m0755
$(1)/etc
/init.d
174 install -m0755 .
/files
/samba.init
$(1)/etc
/init.d
/samba
175 install -d
-m0755
$(1)/etc
/samba
176 install -m0644 .
/files
/smb.conf
$(1)/etc
/samba
/smb.conf
177 install -d
-m0755
$(1)/usr
/bin
178 install -m0755
$(PKG_BUILD_DIR
)/source
/bin
/smbpasswd.shared
$(1)/usr
/bin
/smbpasswd
179 install -d
-m0755
$(1)/usr
/lib
180 install -m0755
$(PKG_BUILD_DIR
)/source
/bin
/libsmb.so
$(1)/usr
/lib
/
181 install -d
-m0755
$(1)/usr
/sbin
182 install -m0755
$(PKG_BUILD_DIR
)/source
/bin
/nmbd.shared
$(1)/usr
/sbin
/nmbd
183 install -m0755
$(PKG_BUILD_DIR
)/source
/bin
/smbd.shared
$(1)/usr
/sbin
/smbd
184 install -d
-m0755
$(1)/usr
/share
/samba
185 install -m0644
$(PKG_INSTALL_DIR
)/usr
/share
/samba
/codepage.
{437,850} $(1)/usr
/share
/samba
/
186 install -m0644
$(PKG_INSTALL_DIR
)/usr
/share
/samba
/unicode_map.
{437,850} $(1)/usr
/share
/samba
/
189 define Package
/samba-client
/install
190 install -d
-m0755
$(1)/usr
/bin
191 install -m0755
$(PKG_INSTALL_DIR
)/usr
/bin
/smbclient
$(1)/usr
/bin
/
194 $(eval
$(call BuildPackage
,samba-server
))
195 $(eval
$(call BuildPackage
,samba-client
))