Makefile 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. #
  2. # Copyright (C) 2007-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=samba
  9. PKG_VERSION:=3.6.25
  10. PKG_RELEASE:=14
  11. PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
  12. https://download.samba.org/pub/samba/stable
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_HASH:=8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751
  15. PKG_LICENSE:=GPL-3.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:samba:samba
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. MAKE_PATH:=source3
  21. CONFIGURE_PATH:=source3
  22. PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
  23. define Package/samba/Default
  24. SECTION:=net
  25. CATEGORY:=Network
  26. TITLE:=Samba 3.6 SMB/CIFS
  27. URL:=https://www.samba.org/
  28. MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  29. endef
  30. define Package/samba36-server
  31. $(call Package/samba/Default)
  32. TITLE+= server
  33. DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS)
  34. endef
  35. define Package/samba36-hotplug
  36. $(call Package/samba/Default)
  37. TITLE+= hotplug script for auto sharing
  38. DEPENDS:=+blockd
  39. endef
  40. define Package/samba36-client
  41. $(call Package/samba/Default)
  42. TITLE+= client
  43. DEPENDS:=+libreadline +libncurses
  44. endef
  45. define Package/samba36-net
  46. $(call Package/samba/Default)
  47. TITLE+= net commands
  48. DEPENDS:=+libreadline +libncurses
  49. endef
  50. define Package/samba36-server/config
  51. config PACKAGE_SAMBA_MAX_DEBUG_LEVEL
  52. int "Maximum level of compiled-in debug messages"
  53. depends on PACKAGE_samba36-server || PACKAGE_samba36-client
  54. default -1
  55. endef
  56. define Package/samba36-server/description
  57. The Samba software suite is a collection of programs that implements the
  58. SMB protocol for UNIX systems, allowing you to serve files and printers to
  59. Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
  60. to as the LanManager or Netbios protocol.
  61. endef
  62. TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
  63. TARGET_LDFLAGS += -Wl,--gc-sections
  64. CONFIGURE_VARS += \
  65. ac_cv_lib_attr_getxattr=no \
  66. ac_cv_search_getxattr=no \
  67. ac_cv_file__proc_sys_kernel_core_pattern=yes \
  68. libreplace_cv_HAVE_C99_VSNPRINTF=yes \
  69. libreplace_cv_HAVE_GETADDRINFO=yes \
  70. libreplace_cv_HAVE_IFACE_IFCONF=yes \
  71. $(if $(CONFIG_IPV6),,libreplace_cv_HAVE_IPV6=no libreplace_cv_HAVE_IPV6_V6ONLY=no) \
  72. LINUX_LFS_SUPPORT=yes \
  73. samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
  74. samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
  75. samba_cv_HAVE_IFACE_IFCONF=yes \
  76. samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
  77. samba_cv_HAVE_SECURE_MKSTEMP=yes \
  78. samba_cv_HAVE_WRFILE_KEYTAB=no \
  79. samba_cv_USE_SETREUID=yes \
  80. samba_cv_USE_SETRESUID=yes \
  81. samba_cv_have_setreuid=yes \
  82. samba_cv_have_setresuid=yes \
  83. ac_cv_header_libunwind_h=no \
  84. ac_cv_header_zlib_h=no \
  85. samba_cv_zlib_1_2_3=no \
  86. ac_cv_path_PYTHON="" \
  87. ac_cv_path_PYTHON_CONFIG=""
  88. CONFIGURE_ARGS += \
  89. --exec-prefix=/usr \
  90. --prefix=/ \
  91. --disable-avahi \
  92. --disable-cups \
  93. --disable-external-libtalloc \
  94. --disable-external-libtdb \
  95. --disable-external-libtevent \
  96. --disable-pie \
  97. --disable-relro \
  98. --disable-static \
  99. --disable-swat \
  100. --disable-shared-libs \
  101. --with-libiconv="$(ICONV_PREFIX)" \
  102. --with-codepagedir=/etc/samba \
  103. --with-configdir=/etc/samba \
  104. --with-included-iniparser \
  105. --with-included-popt \
  106. --with-lockdir=/var/lock \
  107. --with-logfilebase=/var/log \
  108. --with-nmbdsocketdir=/var/nmbd \
  109. --with-piddir=/var/run \
  110. --with-privatedir=/etc/samba \
  111. --with-sendfile-support \
  112. --without-acl-support \
  113. --without-cluster-support \
  114. --without-ads \
  115. --without-krb5 \
  116. --without-ldap \
  117. --without-pam \
  118. --without-winbind \
  119. --without-libtdb \
  120. --without-libtalloc \
  121. --without-libnetapi \
  122. --without-libsmbclient \
  123. --without-libsmbsharemodes \
  124. --without-libtevent \
  125. --without-libaddns \
  126. --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
  127. MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
  128. define Package/samba36-server/conffiles
  129. /etc/config/samba
  130. /etc/samba/smb.conf.template
  131. /etc/samba/smbpasswd
  132. endef
  133. define Package/samba36-server/install
  134. $(INSTALL_DIR) $(1)/etc/config
  135. $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
  136. $(INSTALL_DIR) $(1)/etc/samba
  137. $(INSTALL_CONF) ./files/smb.conf.template $(1)/etc/samba
  138. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
  139. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
  140. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
  141. $(INSTALL_DIR) $(1)/etc/init.d
  142. $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
  143. $(INSTALL_DIR) $(1)/usr/sbin
  144. $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
  145. $(LN) samba_multicall $(1)/usr/sbin/smbd
  146. $(LN) samba_multicall $(1)/usr/sbin/nmbd
  147. $(LN) samba_multicall $(1)/usr/sbin/smbpasswd
  148. endef
  149. define Package/samba36-hotplug/install
  150. $(INSTALL_DIR) $(1)/etc/hotplug.d/mount
  151. $(INSTALL_CONF) ./files/samba.hotplug $(1)/etc/hotplug.d/mount/60-samba
  152. endef
  153. define Package/samba36-client/install
  154. $(INSTALL_DIR) $(1)/usr/sbin
  155. $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
  156. $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
  157. endef
  158. define Package/samba36-net/install
  159. $(INSTALL_DIR) $(1)/usr/sbin
  160. $(INSTALL_BIN) $(PKG_BUILD_BIN)/net $(1)/usr/sbin
  161. endef
  162. $(eval $(call BuildPackage,samba36-client))
  163. $(eval $(call BuildPackage,samba36-server))
  164. $(eval $(call BuildPackage,samba36-hotplug))
  165. $(eval $(call BuildPackage,samba36-net))