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.

167 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.2
  9. PKG_RELEASE:=2
  10. PKG_HASH:=1748a046e452ceb2285cc07b61ec0f85af7c92ac443e111a6c8a1061254ca717
  11. PKG_SOURCE_URL:=@SF/nfs
  12. PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
  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. CONFIG_SQLITE3_TRUE="\#" \
  81. CONFIG_NFSDCLD_TRUE="\#"
  82. MAKE_FLAGS += \
  83. OPT="$(TARGET_CFLAGS)" \
  84. INSTALLSUID="install -m 4755" \
  85. DESTDIR="$(PKG_INSTALL_DIR)" \
  86. RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
  87. RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
  88. HOST_CFLAGS += -Dlinux \
  89. -Wno-error=missing-include-dirs
  90. HOST_CONFIGURE_ARGS += \
  91. --disable-gss \
  92. --disable-nfsv4 \
  93. --disable-nfsv41 \
  94. --without-tcp-wrappers
  95. HOST_CONFIGURE_VARS += \
  96. ac_cv_lib_event_event_dispatch=yes \
  97. ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \
  98. ac_cv_lib_blkid_blkid_get_library_version=yes \
  99. ac_cv_header_event_h=yes \
  100. ac_cv_header_nfsidmap_h=yes \
  101. ac_cv_header_blkid_blkid_h=yes \
  102. ac_cv_lib_resolv___res_querydomain=yes \
  103. GSSGLUE_CFLAGS=" " \
  104. GSSGLUE_LIBS=" " \
  105. RPCSECGSS_CFLAGS=" " \
  106. RPCSECGSS_LIBS=" " \
  107. CONFIG_SQLITE3_TRUE="\#" \
  108. CONFIG_NFSDCLD_TRUE="\#"
  109. define Host/Compile
  110. $(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all
  111. endef
  112. define Host/Install
  113. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  114. $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOSTPKG)/bin/rpcgen
  115. endef
  116. define Package/nfs-kernel-server/install
  117. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
  118. $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
  119. $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
  120. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/
  121. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
  122. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
  123. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
  124. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
  125. endef
  126. define Package/nfs-kernel-server-utils/install
  127. $(INSTALL_DIR) $(1)/usr/sbin
  128. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
  129. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
  130. endef
  131. define Package/nfs-utils/install
  132. $(INSTALL_DIR) $(1)/sbin
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
  134. (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
  135. endef
  136. $(eval $(call HostBuild))
  137. $(eval $(call BuildPackage,nfs-kernel-server))
  138. $(eval $(call BuildPackage,nfs-kernel-server-utils))
  139. $(eval $(call BuildPackage,nfs-utils))