Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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:=8
  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 <[email protected]>
  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-client
  36. $(call Package/samba/Default)
  37. TITLE+= client
  38. DEPENDS:=+libreadline +libncurses
  39. endef
  40. define Package/samba36-net
  41. $(call Package/samba/Default)
  42. TITLE+= net commands
  43. DEPENDS:=+libreadline +libncurses
  44. endef
  45. define Package/samba36-server/config
  46. config PACKAGE_SAMBA_MAX_DEBUG_LEVEL
  47. int "Maximum level of compiled-in debug messages"
  48. depends on PACKAGE_samba36-server || PACKAGE_samba36-client
  49. default -1
  50. endef
  51. define Package/samba36-server/description
  52. The Samba software suite is a collection of programs that implements the
  53. SMB protocol for UNIX systems, allowing you to serve files and printers to
  54. Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
  55. to as the LanManager or Netbios protocol.
  56. endef
  57. TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
  58. TARGET_LDFLAGS += -Wl,--gc-sections
  59. CONFIGURE_VARS += \
  60. ac_cv_lib_attr_getxattr=no \
  61. ac_cv_search_getxattr=no \
  62. ac_cv_file__proc_sys_kernel_core_pattern=yes \
  63. libreplace_cv_HAVE_C99_VSNPRINTF=yes \
  64. libreplace_cv_HAVE_GETADDRINFO=yes \
  65. libreplace_cv_HAVE_IFACE_IFCONF=yes \
  66. LINUX_LFS_SUPPORT=yes \
  67. samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
  68. samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
  69. samba_cv_HAVE_IFACE_IFCONF=yes \
  70. samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
  71. samba_cv_HAVE_SECURE_MKSTEMP=yes \
  72. samba_cv_HAVE_WRFILE_KEYTAB=no \
  73. samba_cv_USE_SETREUID=yes \
  74. samba_cv_USE_SETRESUID=yes \
  75. samba_cv_have_setreuid=yes \
  76. samba_cv_have_setresuid=yes \
  77. ac_cv_header_libunwind_h=no \
  78. ac_cv_header_zlib_h=no \
  79. samba_cv_zlib_1_2_3=no \
  80. ac_cv_path_PYTHON="" \
  81. ac_cv_path_PYTHON_CONFIG=""
  82. CONFIGURE_ARGS += \
  83. --exec-prefix=/usr \
  84. --prefix=/ \
  85. --disable-avahi \
  86. --disable-cups \
  87. --disable-pie \
  88. --disable-relro \
  89. --disable-static \
  90. --disable-swat \
  91. --disable-shared-libs \
  92. --with-libiconv="$(ICONV_PREFIX)" \
  93. --with-codepagedir=/etc/samba \
  94. --with-configdir=/etc/samba \
  95. --with-included-iniparser \
  96. --with-included-popt \
  97. --with-lockdir=/var/lock \
  98. --with-logfilebase=/var/log \
  99. --with-nmbdsocketdir=/var/nmbd \
  100. --with-piddir=/var/run \
  101. --with-privatedir=/etc/samba \
  102. --with-sendfile-support \
  103. --without-acl-support \
  104. --without-cluster-support \
  105. --without-ads \
  106. --without-krb5 \
  107. --without-ldap \
  108. --without-pam \
  109. --without-winbind \
  110. --without-libtdb \
  111. --without-libtalloc \
  112. --without-libnetapi \
  113. --without-libsmbclient \
  114. --without-libsmbsharemodes \
  115. --without-libtevent \
  116. --without-libaddns \
  117. --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
  118. MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
  119. define Package/samba36-server/conffiles
  120. /etc/config/samba
  121. /etc/samba/smb.conf.template
  122. /etc/samba/smbpasswd
  123. endef
  124. define Package/samba36-server/install
  125. $(INSTALL_DIR) $(1)/etc/config
  126. $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
  127. $(INSTALL_DIR) $(1)/etc/samba
  128. $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
  129. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
  130. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
  131. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
  132. $(INSTALL_DIR) $(1)/etc/init.d
  133. $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
  134. $(INSTALL_DIR) $(1)/usr/sbin
  135. $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
  136. $(LN) samba_multicall $(1)/usr/sbin/smbd
  137. $(LN) samba_multicall $(1)/usr/sbin/nmbd
  138. $(LN) samba_multicall $(1)/usr/sbin/smbpasswd
  139. endef
  140. define Package/samba36-client/install
  141. $(INSTALL_DIR) $(1)/usr/sbin
  142. $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
  143. $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
  144. endef
  145. define Package/samba36-net/install
  146. $(INSTALL_DIR) $(1)/usr/sbin
  147. $(INSTALL_BIN) $(PKG_BUILD_BIN)/net $(1)/usr/sbin
  148. endef
  149. $(eval $(call BuildPackage,samba36-client))
  150. $(eval $(call BuildPackage,samba36-server))
  151. $(eval $(call BuildPackage,samba36-net))