7a083b3a464084fff0b706c4907da84f3ed60e74
[openwrt.git] / package / samba / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=samba
4 PKG_VERSION:=2.0.10
5 PKG_RELEASE:=1
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="-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 );
123 $(MAKE) -C $(PKG_BUILD_DIR)/source \
124 $(TARGET_CONFIGURE_OPTS) \
125 CODEPAGEDIR="/usr/share/samba" \
126 all shared
127 (cd $(PKG_BUILD_DIR)/source/bin ; \
128 mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \
129 mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \
130 );
131 mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba
132 mkdir -p $(PKG_INSTALL_DIR)/var/log
133 $(MAKE) -C $(PKG_BUILD_DIR)/source \
134 BASEDIR="$(PKG_INSTALL_DIR)/usr" \
135 BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
136 SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
137 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
138 VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \
139 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
140 CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \
141 PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \
142 SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \
143 LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \
144 SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \
145 CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \
146 install
147 touch $@
148
149 $(IPKG_SAMBA):
150 install -d -m0755 $(IDIR_SAMBA)/etc/init.d
151 install -m0755 ./files/samba.init $(IDIR_SAMBA)/etc/init.d/samba
152 install -d -m0755 $(IDIR_SAMBA)/etc/samba
153 install -m0644 ./files/smb.conf $(IDIR_SAMBA)/etc/samba/smb.conf
154 install -d -m0755 $(IDIR_SAMBA)/usr/bin
155 install -m0755 $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(IDIR_SAMBA)/usr/bin/smbpasswd
156 install -d -m0755 $(IDIR_SAMBA)/usr/lib
157 install -m0755 $(PKG_BUILD_DIR)/source/bin/libsmb.so $(IDIR_SAMBA)/usr/lib/
158 install -d -m0755 $(IDIR_SAMBA)/usr/sbin
159 install -m0755 $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(IDIR_SAMBA)/usr/sbin/nmbd
160 install -m0755 $(PKG_BUILD_DIR)/source/bin/smbd.shared $(IDIR_SAMBA)/usr/sbin/smbd
161 install -d -m0755 $(IDIR_SAMBA)/usr/share/samba
162 install -m0644 $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{437,850} $(IDIR_SAMBA)/usr/share/samba/
163 $(RSTRIP) $(IDIR_SAMBA)
164 $(IPKG_BUILD) $(IDIR_SAMBA) $(PACKAGE_DIR)
165
166 $(IPKG_SAMBA_CLIENT):
167 install -d -m0755 $(IDIR_SAMBA_CLIENT)/usr/bin
168 install -m0755 $(PKG_INSTALL_DIR)/usr/bin/smbclient $(IDIR_SAMBA_CLIENT)/usr/bin/
169 $(RSTRIP) $(IDIR_SAMBA_CLIENT)
170 $(IPKG_BUILD) $(IDIR_SAMBA_CLIENT) $(PACKAGE_DIR)
171
172 mostlyclean:
173 -$(MAKE) -C $(PKG_BUILD_DIR) clean
174 rm -f $(PKG_BUILD_DIR)/.built
175
This page took 0.044582 seconds and 3 git commands to generate.