samba36: add Package/samba/Default
[openwrt/openwrt.git] / package / network / services / samba36 / Makefile
index a3daf58d559488cab111b6e434db2580830349fe..6c762913dd3a4a3fd7b28292d139a658bc7d11a4 100644 (file)
@@ -9,18 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=3.6.25
-PKG_RELEASE:=2
+PKG_RELEASE:=8
 
-PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
-       http://ftp.samba.org/pub/samba/stable
+PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
+               https://download.samba.org/pub/samba/stable
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=76da2fa64edd94a0188531e7ecb27c4e
+PKG_HASH:=8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
-
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -30,19 +28,29 @@ CONFIGURE_PATH:=source3
 
 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
 
-define Package/samba36-server
+define Package/samba/Default
   SECTION:=net
   CATEGORY:=Network
-  TITLE:=Samba 3.6 SMB/CIFS server
-  URL:=http://www.samba.org/
-  DEPENDS:=+USE_GLIBC:librt
+  TITLE:=Samba 3.6 SMB/CIFS
+  URL:=https://www.samba.org/
+  MAINTAINER:=Felix Fietkau <nbd@nbd.name>
+endef
+
+define Package/samba36-server
+  $(call Package/samba/Default)
+  TITLE+= server
+  DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS)
 endef
 
 define Package/samba36-client
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=Samba 3.6 SMB/CIFS client
-  URL:=http://www.samba.org/
+  $(call Package/samba/Default)
+  TITLE+= client
+  DEPENDS:=+libreadline +libncurses
+endef
+
+define Package/samba36-net
+  $(call Package/samba/Default)
+  TITLE+= net commands
   DEPENDS:=+libreadline +libncurses
 endef
 
@@ -51,7 +59,6 @@ define Package/samba36-server/config
                int "Maximum level of compiled-in debug messages"
                depends on PACKAGE_samba36-server || PACKAGE_samba36-client
                default -1
-
 endef
 
 define Package/samba36-server/description
@@ -82,8 +89,11 @@ CONFIGURE_VARS += \
        samba_cv_USE_SETRESUID=yes \
        samba_cv_have_setreuid=yes \
        samba_cv_have_setresuid=yes \
+       ac_cv_header_libunwind_h=no \
        ac_cv_header_zlib_h=no \
-       samba_cv_zlib_1_2_3=no
+       samba_cv_zlib_1_2_3=no \
+       ac_cv_path_PYTHON="" \
+       ac_cv_path_PYTHON_CONFIG=""
 
 CONFIGURE_ARGS += \
        --exec-prefix=/usr \
@@ -95,6 +105,7 @@ CONFIGURE_ARGS += \
        --disable-static \
        --disable-swat \
        --disable-shared-libs \
+       --with-libiconv="$(ICONV_PREFIX)" \
        --with-codepagedir=/etc/samba \
        --with-configdir=/etc/samba \
        --with-included-iniparser \
@@ -125,12 +136,14 @@ MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
 
 define Package/samba36-server/conffiles
 /etc/config/samba
+/etc/samba/smb.conf.template
+/etc/samba/smbpasswd
 endef
 
 define Package/samba36-server/install
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
-       $(INSTALL_CONF) $(1)/etc/samba
+       $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
+       $(INSTALL_DIR) $(1)/etc/samba
        $(INSTALL_DATA) ./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
@@ -150,6 +163,12 @@ define Package/samba36-client/install
        $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
 endef
 
+define Package/samba36-net/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_BIN)/net $(1)/usr/sbin
+endef
+
 $(eval $(call BuildPackage,samba36-client))
 $(eval $(call BuildPackage,samba36-server))
+$(eval $(call BuildPackage,samba36-net))