[package] make samba2 compile on ar71xx (#6082)
[openwrt/svn-archive/archive.git] / net / samba / Makefile
index a36270ae6c864899ded6bd4f79864d62fdb9ff20..aec6fc60a7ca8d1c4c66a39c0c1236b99a304abd 100644 (file)
@@ -1,24 +1,19 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=2.0.10
-PKG_RELEASE:=4
+PKG_RELEASE:=6
 PKG_MD5SUM:=54870482fe036b7e69dd48c90661eec6
 
-PKG_SOURCE_URL:=ftp://se.samba.org/pub/samba/stable \
-       ftp://ftp.easynet.be/samba/stable
+PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -55,6 +50,8 @@ define Package/samba-client
   DEPENDS:=samba-common
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 define Build/Compile   
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)
@@ -90,8 +87,8 @@ define Build/Compile
        (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
-               LDFLAGS="-lgcc_s -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+               CPPFLAGS="$(TARGET_CPPFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \
                ac_cv_lib_cups_httpConnect=no \
                samba_cv_FTRUNCATE_NEEDS_ROOT=no \
                samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \
@@ -187,8 +184,8 @@ define Package/samba-common/install
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{437,850,ISO8859-1,ISO8859-15} $(1)/usr/share/samba/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.852 $(1)/usr/share/samba/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{852,ISO8859-2} $(1)/usr/share/samba/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.866 $(1)/usr/share/samba/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{866,ISO8859-5,KOI8-R} $(1)/usr/share/samba/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{866,1251} $(1)/usr/share/samba/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{866,ISO8859-5,KOI8-R,1251} $(1)/usr/share/samba/
 endef
 
 define Package/samba-server/install