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