1
0

Makefile 4.5 KB

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