samba: remove swat documentation when not needed

When SWAT (the Web administration tool of Samba) is enabled, which is
the default when one enables samba in Buildroot, a lot of
documentation gets installed in /usr/swat (~15 MB). This patch fixes
this by removing the documentation when BR2_HAVE_DOCUMENTATION is not
set.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas Petazzoni 2010-07-29 13:41:46 +02:00
parent 9abe052f04
commit 9e06a85616

View File

@ -161,6 +161,17 @@ $(SAMBA_HOOK_POST_INSTALL):
# remove unneeded # remove unneeded
rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_)) rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_))
rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_TXTTARGETS_)) rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_TXTTARGETS_))
ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
ifneq ($(BR2_HAVE_DOCUMENTATION),y)
# Remove the documentation
rm -rf $(TARGET_DIR)/usr/swat/help/manpages
rm -rf $(TARGET_DIR)/usr/swat/help/Samba3*
rm -rf $(TARGET_DIR)/usr/swat/using_samba/
# Removing the welcome.html file will make swat default to
# welcome-no-samba-doc.html
rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html
endif
endif
# strip binaries # strip binaries
$(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_y)) $(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_y))
# install start/stop script # install start/stop script