You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
4.6 KiB

  1. # Copyright (C) 2009-2016 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=nfs-kernel-server
  8. PKG_VERSION:=2.3.3
  9. PKG_RELEASE:=2
  10. PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
  11. PKG_SOURCE_URL:=@SF/nfs
  12. PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
  13. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
  18. HOST_BUILD_DEPENDS:=libtirpc/host
  19. PKG_CONFIG_DEPENDS:= CONFIG_IPV6
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/nfs-kernel-server/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Filesystem
  26. DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
  27. URL:=http://nfs.sourceforge.net/
  28. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  29. endef
  30. define Package/nfs-kernel-server
  31. $(call Package/nfs-kernel-server/Default)
  32. TITLE:=Kernel NFS server support
  33. DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +rpcbind
  34. endef
  35. define Package/nfs-kernel-server/description
  36. Kernel NFS server support
  37. endef
  38. define Package/nfs-kernel-server-utils
  39. $(call Package/nfs-kernel-server/Default)
  40. TITLE:=NFS server utils
  41. DEPENDS:=nfs-kernel-server
  42. endef
  43. define Package/nfs-kernel-server-utils/description
  44. NFS server utils
  45. endef
  46. define Package/nfs-kernel-server/conffiles
  47. /etc/exports
  48. endef
  49. define Package/nfs-utils
  50. $(call Package/nfs-kernel-server/Default)
  51. SECTION:=utils
  52. CATEGORY:=Utilities
  53. DEPENDS+= +libevent2
  54. TITLE:=updated mount utility (includes nfs4)
  55. endef
  56. define Package/nfs-utils/description
  57. Updated mount.nfs command - allows mounting nfs4 volumes
  58. endef
  59. TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
  60. -Wno-error=strict-prototypes \
  61. -Wno-error=incompatible-pointer-types \
  62. -Wno-error=format-security \
  63. -Wno-error=undef \
  64. -Wno-error=missing-include-dirs
  65. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
  66. -L$(STAGING_DIR)/usr/lib/libevent
  67. CONFIGURE_ARGS += \
  68. --disable-gss \
  69. --disable-nfsv4 \
  70. --disable-nfsv41 \
  71. --enable-static \
  72. --enable-shared \
  73. --disable-caps
  74. ifeq ($(CONFIG_IPV6),n)
  75. CONFIGURE_ARGS += --disable-ipv6
  76. endif
  77. CONFIGURE_VARS += \
  78. libblkid_cv_is_recent=yes \
  79. ac_cv_lib_resolv___res_querydomain=yes \
  80. ac_cv_lib_bsd_daemon=no \
  81. CONFIG_SQLITE3_TRUE="\#" \
  82. CONFIG_NFSDCLD_TRUE="\#"
  83. MAKE_FLAGS += \
  84. OPT="$(TARGET_CFLAGS)" \
  85. INSTALLSUID="install -m 4755" \
  86. DESTDIR="$(PKG_INSTALL_DIR)" \
  87. RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
  88. RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
  89. HOST_CFLAGS += -Dlinux \
  90. -Wno-error=missing-include-dirs
  91. HOST_CONFIGURE_ARGS += \
  92. --disable-gss \
  93. --disable-nfsv4 \
  94. --disable-nfsv41 \
  95. --without-tcp-wrappers
  96. HOST_CONFIGURE_VARS += \
  97. ac_cv_lib_event_event_dispatch=yes \
  98. ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \
  99. ac_cv_lib_blkid_blkid_get_library_version=yes \
  100. ac_cv_header_event_h=yes \
  101. ac_cv_header_nfsidmap_h=yes \
  102. ac_cv_header_blkid_blkid_h=yes \
  103. ac_cv_lib_resolv___res_querydomain=yes \
  104. GSSGLUE_CFLAGS=" " \
  105. GSSGLUE_LIBS=" " \
  106. RPCSECGSS_CFLAGS=" " \
  107. RPCSECGSS_LIBS=" " \
  108. CONFIG_SQLITE3_TRUE="\#" \
  109. CONFIG_NFSDCLD_TRUE="\#"
  110. define Host/Compile
  111. $(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all
  112. endef
  113. define Host/Install
  114. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  115. $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOSTPKG)/bin/rpcgen
  116. endef
  117. define Package/nfs-kernel-server/install
  118. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
  119. $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
  120. $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
  121. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/
  122. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
  123. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
  124. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
  125. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
  126. endef
  127. define Package/nfs-kernel-server-utils/install
  128. $(INSTALL_DIR) $(1)/usr/sbin
  129. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
  130. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
  131. endef
  132. define Package/nfs-utils/install
  133. $(INSTALL_DIR) $(1)/sbin
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
  135. (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
  136. endef
  137. $(eval $(call HostBuild))
  138. $(eval $(call BuildPackage,nfs-kernel-server))
  139. $(eval $(call BuildPackage,nfs-kernel-server-utils))
  140. $(eval $(call BuildPackage,nfs-utils))