Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #
  2. # Copyright (C) 2007-2012 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.5
  10. PKG_RELEASE:=2
  11. PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
  12. http://ftp.samba.org/pub/samba/old-versions
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_MD5SUM:=2f0c14547333c1b48fd4728b031e7040
  15. PKG_LICENSE:=GPLv3
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  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:=http://www.samba.org/
  28. DEPENDS:=+USE_EGLIBC:librt
  29. endef
  30. define Package/samba36-client
  31. SECTION:=net
  32. CATEGORY:=Network
  33. TITLE:=Samba 3.6 SMB/CIFS client
  34. URL:=http://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 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_file__proc_sys_kernel_core_pattern=yes \
  53. libreplace_cv_HAVE_C99_VSNPRINTF=yes \
  54. libreplace_cv_HAVE_GETADDRINFO=yes \
  55. libreplace_cv_HAVE_IFACE_IFCONF=yes \
  56. LINUX_LFS_SUPPORT=yes \
  57. samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
  58. samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
  59. samba_cv_HAVE_IFACE_IFCONF=yes \
  60. samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
  61. samba_cv_HAVE_SECURE_MKSTEMP=yes \
  62. samba_cv_HAVE_WRFILE_KEYTAB=no \
  63. samba_cv_USE_SETREUID=yes \
  64. samba_cv_USE_SETRESUID=yes \
  65. samba_cv_have_setreuid=yes \
  66. samba_cv_have_setresuid=yes \
  67. ac_cv_header_zlib_h=no \
  68. samba_cv_zlib_1_2_3=no
  69. CONFIGURE_ARGS += \
  70. --exec-prefix=/usr \
  71. --prefix=/ \
  72. --disable-avahi \
  73. --disable-cups \
  74. --disable-pie \
  75. --disable-relro \
  76. --disable-static \
  77. --disable-swat \
  78. --disable-shared-libs \
  79. --with-codepagedir=/etc/samba \
  80. --with-configdir=/etc/samba \
  81. --with-included-iniparser \
  82. --with-included-popt \
  83. --with-lockdir=/var/lock \
  84. --with-logfilebase=/var/log \
  85. --with-nmbdsocketdir=/var/nmbd \
  86. --with-piddir=/var/run \
  87. --with-privatedir=/etc/samba \
  88. --with-sendfile-support \
  89. --without-cluster-support \
  90. --without-ads \
  91. --without-krb5 \
  92. --without-ldap \
  93. --without-pam \
  94. --without-winbind \
  95. --without-libtdb \
  96. --without-libtalloc \
  97. --without-libnetapi \
  98. --without-libsmbclient \
  99. --without-libsmbsharemodes \
  100. --without-libaddns \
  101. --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
  102. MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
  103. define Package/samba36-server/install
  104. $(INSTALL_DIR) $(1)/etc/config
  105. $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
  106. $(INSTALL_DIR) $(1)/etc/samba
  107. $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
  108. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
  109. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
  110. $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
  111. $(INSTALL_DIR) $(1)/etc/init.d
  112. $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
  113. $(INSTALL_DIR) $(1)/usr/sbin
  114. $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
  115. ln -sf samba_multicall $(1)/usr/sbin/smbd
  116. ln -sf samba_multicall $(1)/usr/sbin/nmbd
  117. ln -sf samba_multicall $(1)/usr/sbin/smbpasswd
  118. endef
  119. define Package/samba36-client/install
  120. $(INSTALL_DIR) $(1)/usr/sbin
  121. $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
  122. $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
  123. endef
  124. $(eval $(call BuildPackage,samba36-client))
  125. $(eval $(call BuildPackage,samba36-server))