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