copy trunk to buildroot-ng branch
[openwrt.git] / package / samba / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=samba
4 PKG_VERSION:=2.0.10
5 PKG_RELEASE:=2
6 PKG_MD5SUM:=54870482fe036b7e69dd48c90661eec6
7
8 PKG_SOURCE_URL:=ftp://se.samba.org/pub/samba/stable \
9 ftp://ftp.easynet.be/samba/stable
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_CAT:=zcat
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
14
15 include $(TOPDIR)/package/rules.mk
16
17 $(eval $(call PKG_template,SAMBA,samba,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
18 $(eval $(call PKG_template,SAMBA_CLIENT,samba-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
19
20 $(PKG_BUILD_DIR)/.configured:
21 touch $@
22
23 $(PKG_BUILD_DIR)/.built:
24 rm -rf $(PKG_INSTALL_DIR)
25 mkdir -p $(PKG_INSTALL_DIR)
26 (cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \
27 ./configure \
28 --program-prefix="" \
29 --program-suffix="" \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 --bindir=/usr/bin \
33 --datadir=/usr/share \
34 --includedir=/usr/include \
35 --infodir=/usr/share/info \
36 --libdir=/usr/lib \
37 --libexecdir=/usr/lib \
38 --localstatedir=/var/log/samba \
39 --mandir=/usr/share/man \
40 --sbindir=/usr/sbin \
41 --sysconfdir=/etc/samba \
42 $(DISABLE_LARGEFILE) \
43 $(DISABLE_NLS) \
44 --with-lockdir=/var/run/samba \
45 --with-privatedir=/etc/samba \
46 );
47 $(MAKE) -C $(PKG_BUILD_DIR)/source \
48 bin/make_smbcodepage bin/make_unicodemap
49 (cd $(PKG_BUILD_DIR)/source/bin ; \
50 mv -f make_smbcodepage make_smbcodepage.old ; \
51 mv -f make_unicodemap make_unicodemap.old ; \
52 );
53
54 $(MAKE) -C $(PKG_BUILD_DIR)/source \
55 clean
56
57 (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
58 $(TARGET_CONFIGURE_OPTS) \
59 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
60 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
61 LDFLAGS="-lgcc_s -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
62 ac_cv_lib_cups_httpConnect=no \
63 ac_cv_sizeof_int=4 \
64 ac_cv_sizeof_long=4 \
65 ac_cv_sizeof_short=2 \
66 samba_cv_FTRUNCATE_NEEDS_ROOT=no \
67 samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \
68 samba_cv_HAVE_BROKEN_GETGROUPS=no \
69 samba_cv_HAVE_BROKEN_READDIR=no \
70 samba_cv_HAVE_FCNTL_LOCK=yes \
71 samba_cv_HAVE_FNMATCH=yes \
72 samba_cv_HAVE_FTRUNCATE_EXTEND=no \
73 samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
74 samba_cv_HAVE_IFACE_AIX=no \
75 samba_cv_HAVE_IFACE_IFCONF=yes \
76 samba_cv_HAVE_IFACE_IFREQ=yes \
77 samba_cv_HAVE_INO64_T=yes \
78 samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no \
79 samba_cv_HAVE_OFF64_T=yes \
80 samba_cv_HAVE_ROOT=yes \
81 samba_cv_HAVE_SECURE_MKSTEMP=yes \
82 samba_cv_HAVE_SHARED_MMAP=yes \
83 samba_cv_HAVE_STRUCT_FLOCK64=yes \
84 samba_cv_HAVE_SYSV_IPC=no \
85 samba_cv_HAVE_TRUNCATED_SALT=no \
86 samba_cv_HAVE_UNION_SEMUN=no \
87 samba_cv_HAVE_UNSIGNED_CHAR=yes \
88 samba_cv_NEED_SGI_SEMUN_HACK=no \
89 samba_cv_REPLACE_INET_NTOA=no \
90 samba_cv_SIZEOF_INO_T=4 \
91 samba_cv_SIZEOF_OFF_T=4 \
92 samba_cv_SYSCONF_SC_NGROUPS_MAX=yes \
93 samba_cv_USE_SETEUID=yes \
94 samba_cv_USE_SETRESUID=no \
95 samba_cv_USE_SETREUID=yes \
96 samba_cv_USE_SETUIDX=no \
97 samba_cv_have_longlong=yes \
98 samba_cv_have_setresgid=no \
99 samba_cv_have_setresuid=no \
100 ./configure \
101 --target=$(GNU_TARGET_NAME) \
102 --host=$(GNU_TARGET_NAME) \
103 --build=$(GNU_HOST_NAME) \
104 --program-prefix="" \
105 --program-suffix="" \
106 --prefix=/usr \
107 --exec-prefix=/usr \
108 --bindir=/usr/bin \
109 --datadir=/usr/share \
110 --includedir=/usr/include \
111 --infodir=/usr/share/info \
112 --libdir=/usr/lib \
113 --libexecdir=/usr/lib \
114 --localstatedir=/var/log/samba \
115 --mandir=/usr/share/man \
116 --sbindir=/usr/sbin \
117 --sysconfdir=/etc/samba \
118 $(DISABLE_LARGEFILE) \
119 $(DISABLE_NLS) \
120 --with-lockdir=/var/run/samba \
121 --with-privatedir=/etc/samba \
122 --with-syslog \
123 );
124 $(MAKE) -C $(PKG_BUILD_DIR)/source \
125 $(TARGET_CONFIGURE_OPTS) \
126 CODEPAGEDIR="/usr/share/samba" \
127 all shared
128 (cd $(PKG_BUILD_DIR)/source/bin ; \
129 mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \
130 mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \
131 );
132 mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba
133 mkdir -p $(PKG_INSTALL_DIR)/var/log
134 $(MAKE) -C $(PKG_BUILD_DIR)/source \
135 BASEDIR="$(PKG_INSTALL_DIR)/usr" \
136 BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
137 SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
138 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
139 VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \
140 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
141 CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \
142 PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \
143 SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \
144 LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \
145 SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \
146 CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \
147 install
148 touch $@
149
150 $(IPKG_SAMBA):
151 install -d -m0755 $(IDIR_SAMBA)/etc/init.d
152 install -m0755 ./files/samba.init $(IDIR_SAMBA)/etc/init.d/samba
153 install -d -m0755 $(IDIR_SAMBA)/etc/samba
154 install -m0644 ./files/smb.conf $(IDIR_SAMBA)/etc/samba/smb.conf
155 install -d -m0755 $(IDIR_SAMBA)/usr/bin
156 install -m0755 $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(IDIR_SAMBA)/usr/bin/smbpasswd
157 install -d -m0755 $(IDIR_SAMBA)/usr/lib
158 install -m0755 $(PKG_BUILD_DIR)/source/bin/libsmb.so $(IDIR_SAMBA)/usr/lib/
159 install -d -m0755 $(IDIR_SAMBA)/usr/sbin
160 install -m0755 $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(IDIR_SAMBA)/usr/sbin/nmbd
161 install -m0755 $(PKG_BUILD_DIR)/source/bin/smbd.shared $(IDIR_SAMBA)/usr/sbin/smbd
162 install -d -m0755 $(IDIR_SAMBA)/usr/share/samba
163 install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{437,850} $(IDIR_SAMBA)/usr/share/samba/
164 install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{437,850} $(IDIR_SAMBA)/usr/share/samba/
165 $(RSTRIP) $(IDIR_SAMBA)
166 $(IPKG_BUILD) $(IDIR_SAMBA) $(PACKAGE_DIR)
167
168 $(IPKG_SAMBA_CLIENT):
169 install -d -m0755 $(IDIR_SAMBA_CLIENT)/usr/bin
170 install -m0755 $(PKG_INSTALL_DIR)/usr/bin/smbclient $(IDIR_SAMBA_CLIENT)/usr/bin/
171 $(RSTRIP) $(IDIR_SAMBA_CLIENT)
172 $(IPKG_BUILD) $(IDIR_SAMBA_CLIENT) $(PACKAGE_DIR)
173
174 mostlyclean:
175 -$(MAKE) -C $(PKG_BUILD_DIR) clean
176 rm -f $(PKG_BUILD_DIR)/.built
177
This page took 0.055519 seconds and 5 git commands to generate.