samba36: allow build with no ipv6 support
[openwrt/openwrt.git] / package / network / services / samba36 / Makefile
index 5564a78404528893fd6b68ad235ab91c6820482a..a4392f62c5a613860c25204258cc3748ffb81f3e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=3.6.25
-PKG_RELEASE:=8
+PKG_RELEASE:=14
 
 PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
                https://download.samba.org/pub/samba/stable
@@ -43,6 +43,12 @@ define Package/samba36-server
   DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS)
 endef
 
+define Package/samba36-hotplug
+  $(call Package/samba/Default)
+  TITLE+= hotplug script for auto sharing
+  DEPENDS:=+blockd
+endef
+
 define Package/samba36-client
   $(call Package/samba/Default)
   TITLE+= client
@@ -79,6 +85,7 @@ CONFIGURE_VARS += \
        libreplace_cv_HAVE_C99_VSNPRINTF=yes \
        libreplace_cv_HAVE_GETADDRINFO=yes \
        libreplace_cv_HAVE_IFACE_IFCONF=yes \
+       $(if $(CONFIG_IPV6),,libreplace_cv_HAVE_IPV6=no libreplace_cv_HAVE_IPV6_V6ONLY=no) \
        LINUX_LFS_SUPPORT=yes \
        samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
        samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
@@ -101,6 +108,9 @@ CONFIGURE_ARGS += \
        --prefix=/ \
        --disable-avahi \
        --disable-cups \
+       --disable-external-libtalloc \
+       --disable-external-libtdb \
+       --disable-external-libtevent \
        --disable-pie \
        --disable-relro \
        --disable-static \
@@ -145,7 +155,7 @@ define Package/samba36-server/install
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
        $(INSTALL_DIR) $(1)/etc/samba
-       $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
+       $(INSTALL_CONF) ./files/smb.conf.template $(1)/etc/samba
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
@@ -158,6 +168,11 @@ define Package/samba36-server/install
        $(LN) samba_multicall $(1)/usr/sbin/smbpasswd
 endef
 
+define Package/samba36-hotplug/install
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/mount
+       $(INSTALL_CONF) ./files/samba.hotplug $(1)/etc/hotplug.d/mount/60-samba
+endef
+
 define Package/samba36-client/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
@@ -171,5 +186,6 @@ endef
 
 $(eval $(call BuildPackage,samba36-client))
 $(eval $(call BuildPackage,samba36-server))
+$(eval $(call BuildPackage,samba36-hotplug))
 $(eval $(call BuildPackage,samba36-net))