[net] Filesystem: Moved samba2, samba3, and remotefs to Filesystem submenu.
[openwrt/svn-archive/archive.git] / net / samba3 / Makefile
index 8351cc39ad31d573a2ea69167d6cc0921644eb98..622dc3ebaf0c22c7a3bf91c3fa423b9283aeac84 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2009 OpenWrt.org
+# Copyright (C) 2008-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba3
 PKG_VERSION:=3.0.24
-PKG_RELEASE:=5
+PKG_RELEASE:=7
 PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153
 
 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
@@ -22,6 +22,7 @@ TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_DEBUG),-DSAMBA_DEBUG)
 define Package/samba3
   SECTION:=net
   CATEGORY:=Network
+  SUBMENU:=Filesystem
   TITLE:=samba3
   DEPENDS:=+libpthread
   URL:=http://www.samba.org/
@@ -31,19 +32,30 @@ define Package/samba3/Description
   Samba3 - made small with patches taken from AVM GPL releases and freetz 
 endef
 
+define Package/samba3/conffiles
+/etc/config/samba
+/etc/samba/smb.conf.template
+endef
+
 define Package/samba3/config
        source "$(SOURCE)/Config.in"
 endef
 
-ifneq ($(CONFIG_LARGEFILE),)
-  define Build/Prepare/LFS
-       cat ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
-  endef
-endif
+define Build/Prepare/LFS
+endef
 
 define Build/Prepare
 $(call Build/Prepare/Default)
-$(call Build/Prepare/LFS)
+endef
+
+define Build/Configure
+       [ -f "$(PKG_BUILD_DIR)/source/include/config.h.save" ] || \
+               $(CP) $(PKG_BUILD_DIR)/source/include/config.h \
+                       $(PKG_BUILD_DIR)/source/include/config.h.save
+       cat \
+               $(PKG_BUILD_DIR)/source/include/config.h.save \
+               ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
+       $(Build/Configure/Default)
 endef
 
 define Build/Compile
@@ -52,6 +64,7 @@ define Build/Compile
        CPPFLAGS="$(TARGET_CPPFLAGS)" \
        LDFLAGS="$(TARGET_LDFLAGS)" \
        $(MAKE) -C $(PKG_BUILD_DIR)/source \
+               $(TARGET_CONFIGURE_OPTS) \
                all bin/smbpasswd
 endef
 
@@ -60,7 +73,6 @@ define Package/samba3/install
        $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
        $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
        $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/
-       cd $(1)/etc/samba; rm -r smb.conf; ln -s /tmp/smb.conf
        touch $(1)/etc/samba/smbpasswd
        $(INSTALL_DIR) $(1)/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/