[PATCH] Baltic language support for samba 2
[openwrt/svn-archive/archive.git] / net / samba / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=2.0.10
12 PKG_RELEASE:=6
13 PKG_MD5SUM:=54870482fe036b7e69dd48c90661eec6
14
15 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/samba
21 SECTION:=net
22 CATEGORY:=Network
23 SUBMENU:=samba - NetBIOS/SMB implementation
24 TITLE:=samba - NetBIOS/SMB implementation
25 URL:=http://www.samba.org/
26 endef
27
28 define Package/samba/description
29 The Samba software suite is a collection of programs that implements the
30 SMB protocol for unix systems, allowing you to serve files and printers to
31 Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
32 to as the LanManager or Netbios protocol.
33 endef
34
35 define Package/samba-common
36 $(call Package/samba)
37 TITLE:=NetBIOS/SMB server and client shared files
38 DEPENDS:=+libgcc
39 endef
40
41 define Package/samba-server
42 $(call Package/samba)
43 TITLE:=NetBIOS/SMB file and print server
44 DEPENDS:=samba-common
45 endef
46
47 define Package/samba-client
48 $(call Package/samba)
49 TITLE:=NetBIOS/SMB simple client
50 DEPENDS:=samba-common
51 endef
52
53 define Build/Compile
54 rm -rf $(PKG_INSTALL_DIR)
55 mkdir -p $(PKG_INSTALL_DIR)
56 (cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \
57 ./configure \
58 --program-prefix="" \
59 --program-suffix="" \
60 --prefix=/usr \
61 --exec-prefix=/usr \
62 --bindir=/usr/bin \
63 --datadir=/usr/share \
64 --includedir=/usr/include \
65 --infodir=/usr/share/info \
66 --libdir=/usr/lib \
67 --libexecdir=/usr/lib \
68 --localstatedir=/var/log/samba \
69 --mandir=/usr/share/man \
70 --sbindir=/usr/sbin \
71 --sysconfdir=/etc/samba \
72 $(DISABLE_LARGEFILE) \
73 $(DISABLE_NLS) \
74 --with-lockdir=/var/run/samba \
75 --with-privatedir=/etc/samba \
76 );
77 $(MAKE) -C $(PKG_BUILD_DIR)/source \
78 bin/make_smbcodepage bin/make_unicodemap
79 (cd $(PKG_BUILD_DIR)/source/bin ; \
80 mv -f make_smbcodepage make_smbcodepage.old ; \
81 mv -f make_unicodemap make_unicodemap.old ; \
82 );
83 $(MAKE) -C $(PKG_BUILD_DIR)/source \
84 clean
85 (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
86 $(TARGET_CONFIGURE_OPTS) \
87 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
88 CPPFLAGS="$(TARGET_CPPFLAGS)" \
89 LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \
90 ac_cv_lib_cups_httpConnect=no \
91 samba_cv_FTRUNCATE_NEEDS_ROOT=no \
92 samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \
93 samba_cv_HAVE_BROKEN_GETGROUPS=no \
94 samba_cv_HAVE_BROKEN_READDIR=no \
95 samba_cv_HAVE_FCNTL_LOCK=yes \
96 samba_cv_HAVE_FNMATCH=yes \
97 samba_cv_HAVE_FTRUNCATE_EXTEND=no \
98 samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
99 samba_cv_HAVE_IFACE_AIX=no \
100 samba_cv_HAVE_IFACE_IFCONF=yes \
101 samba_cv_HAVE_IFACE_IFREQ=yes \
102 samba_cv_HAVE_INO64_T=yes \
103 samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no \
104 samba_cv_HAVE_OFF64_T=yes \
105 samba_cv_HAVE_ROOT=yes \
106 samba_cv_HAVE_SECURE_MKSTEMP=yes \
107 samba_cv_HAVE_SHARED_MMAP=yes \
108 samba_cv_HAVE_STRUCT_FLOCK64=yes \
109 samba_cv_HAVE_SYSV_IPC=no \
110 samba_cv_HAVE_TRUNCATED_SALT=no \
111 samba_cv_HAVE_UNION_SEMUN=no \
112 samba_cv_HAVE_UNSIGNED_CHAR=yes \
113 samba_cv_NEED_SGI_SEMUN_HACK=no \
114 samba_cv_REPLACE_INET_NTOA=no \
115 samba_cv_SIZEOF_INO_T=4 \
116 samba_cv_SIZEOF_OFF_T=4 \
117 samba_cv_SYSCONF_SC_NGROUPS_MAX=yes \
118 samba_cv_USE_SETEUID=yes \
119 samba_cv_USE_SETRESUID=no \
120 samba_cv_USE_SETREUID=yes \
121 samba_cv_USE_SETUIDX=no \
122 samba_cv_have_longlong=yes \
123 samba_cv_have_setresgid=no \
124 samba_cv_have_setresuid=no \
125 ./configure \
126 --target=$(GNU_TARGET_NAME) \
127 --host=$(GNU_TARGET_NAME) \
128 --build=$(GNU_HOST_NAME) \
129 --program-prefix="" \
130 --program-suffix="" \
131 --prefix=/usr \
132 --exec-prefix=/usr \
133 --bindir=/usr/bin \
134 --datadir=/usr/share \
135 --includedir=/usr/include \
136 --infodir=/usr/share/info \
137 --libdir=/usr/lib \
138 --libexecdir=/usr/lib \
139 --localstatedir=/var/log/samba \
140 --mandir=/usr/share/man \
141 --sbindir=/usr/sbin \
142 --sysconfdir=/etc/samba \
143 $(DISABLE_LARGEFILE) \
144 $(DISABLE_NLS) \
145 --with-lockdir=/var/run/samba \
146 --with-privatedir=/etc/samba \
147 --with-syslog \
148 );
149 $(MAKE) -C $(PKG_BUILD_DIR)/source \
150 $(TARGET_CONFIGURE_OPTS) \
151 CODEPAGEDIR="/usr/share/samba" \
152 all shared
153 (cd $(PKG_BUILD_DIR)/source/bin ; \
154 mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \
155 mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \
156 );
157 mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba
158 mkdir -p $(PKG_INSTALL_DIR)/var/log
159 $(MAKE) -C $(PKG_BUILD_DIR)/source \
160 BASEDIR="$(PKG_INSTALL_DIR)/usr" \
161 BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
162 SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
163 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
164 VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \
165 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
166 CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \
167 PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \
168 SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \
169 LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \
170 SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \
171 CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \
172 install
173 endef
174
175 define Package/samba-common/install
176 $(INSTALL_DIR) $(1)/etc/samba
177 $(INSTALL_DATA) ./files/smb.conf $(1)/etc/samba/smb.conf
178 $(INSTALL_DIR) $(1)/usr/bin
179 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(1)/usr/bin/smbpasswd
180 $(INSTALL_DIR) $(1)/usr/share/samba
181 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{437,850} $(1)/usr/share/samba/
182 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{437,850,ISO8859-1,ISO8859-15} $(1)/usr/share/samba/
183 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.852 $(1)/usr/share/samba/
184 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{852,ISO8859-2} $(1)/usr/share/samba/
185 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{866,1251} $(1)/usr/share/samba/
186 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{866,ISO8859-5,KOI8-R,1251} $(1)/usr/share/samba/
187 endef
188
189 define Package/samba-server/install
190 $(INSTALL_DIR) $(1)/etc/init.d
191 $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
192 $(INSTALL_DIR) $(1)/usr/lib
193 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/libsmb.so $(1)/usr/lib/
194 $(INSTALL_DIR) $(1)/usr/sbin
195 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(1)/usr/sbin/nmbd
196 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd.shared $(1)/usr/sbin/smbd
197 endef
198
199 define Package/samba-client/install
200 $(INSTALL_DIR) $(1)/usr/bin
201 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbclient $(1)/usr/bin/
202 endef
203
204 $(eval $(call BuildPackage,samba-common))
205 $(eval $(call BuildPackage,samba-server))
206 $(eval $(call BuildPackage,samba-client))