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.

159 lines
4.4 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.1
  9. PKG_RELEASE:=1
  10. PKG_HASH:=ca92f1ab86b2af4dcd62d7716d46a6cdec268e83fe8d564cd8ff1464cc495989
  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. include $(INCLUDE_DIR)/host-build.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/nfs-kernel-server/Default
  21. SECTION:=net
  22. CATEGORY:=Network
  23. SUBMENU:=Filesystem
  24. DEPENDS:=+libwrap +libblkid +libuuid $(LIBRPC_DEPENDS)
  25. URL:=http://nfs.sourceforge.net/
  26. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  27. endef
  28. define Package/nfs-kernel-server
  29. $(call Package/nfs-kernel-server/Default)
  30. TITLE:=Kernel NFS server support
  31. DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap
  32. endef
  33. define Package/nfs-kernel-server/description
  34. Kernel NFS server support
  35. endef
  36. define Package/nfs-kernel-server-utils
  37. $(call Package/nfs-kernel-server/Default)
  38. TITLE:=NFS server utils
  39. DEPENDS:=nfs-kernel-server
  40. endef
  41. define Package/nfs-kernel-server-utils/description
  42. NFS server utils
  43. endef
  44. define Package/nfs-kernel-server/conffiles
  45. /etc/exports
  46. endef
  47. define Package/nfs-utils
  48. $(call Package/nfs-kernel-server/Default)
  49. SECTION:=utils
  50. CATEGORY:=Utilities
  51. DEPENDS+= +libevent2 +USE_UCLIBC:librpc
  52. TITLE:=updated mount utility (includes nfs4)
  53. endef
  54. define Package/nfs-utils/description
  55. Updated mount.nfs command - allows mounting nfs4 volumes
  56. endef
  57. TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include/libevent \
  58. -I$(STAGING_DIR)/usr/include/ -Drpc_uint=uint
  59. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) \
  60. -L$(STAGING_DIR)/usr/lib/libevent
  61. CONFIGURE_ARGS += \
  62. --disable-gss \
  63. --disable-nfsv4 \
  64. --disable-nfsv41 \
  65. --disable-ipv6 \
  66. --enable-static \
  67. --enable-shared \
  68. --disable-caps \
  69. --disable-tirpc \
  70. --disable-nfsdcld
  71. CONFIGURE_VARS += \
  72. libblkid_cv_is_recent=yes \
  73. ac_cv_lib_resolv___res_querydomain=yes \
  74. CONFIG_SQLITE3_TRUE="\#" \
  75. CONFIG_NFSDCLD_TRUE="\#"
  76. MAKE_FLAGS += \
  77. OPT="$(TARGET_CFLAGS)" \
  78. INSTALLSUID="install -m 4755" \
  79. DESTDIR="$(PKG_INSTALL_DIR)" \
  80. RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
  81. RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
  82. HOST_CFLAGS += -Dlinux
  83. HOST_CONFIGURE_ARGS += \
  84. --disable-gss \
  85. --disable-nfsv4 \
  86. --disable-nfsv41 \
  87. --disable-ipv6 \
  88. --disable-tirpc \
  89. --without-tcp-wrappers
  90. HOST_CONFIGURE_VARS += \
  91. ac_cv_lib_event_event_dispatch=yes \
  92. ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \
  93. ac_cv_lib_blkid_blkid_get_library_version=yes \
  94. ac_cv_header_event_h=yes \
  95. ac_cv_header_nfsidmap_h=yes \
  96. ac_cv_header_blkid_blkid_h=yes \
  97. GSSGLUE_CFLAGS=" " \
  98. GSSGLUE_LIBS=" " \
  99. RPCSECGSS_CFLAGS=" " \
  100. RPCSECGSS_LIBS=" " \
  101. CONFIG_SQLITE3_TRUE="\#" \
  102. CONFIG_NFSDCLD_TRUE="\#"
  103. define Host/Compile
  104. $(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all
  105. endef
  106. define Host/Install
  107. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  108. $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOSTPKG)/bin/rpcgen
  109. endef
  110. define Package/nfs-kernel-server/install
  111. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
  112. $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
  113. $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
  114. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/
  115. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
  116. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
  117. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
  118. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
  119. endef
  120. define Package/nfs-kernel-server-utils/install
  121. $(INSTALL_DIR) $(1)/usr/sbin
  122. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
  123. $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
  124. endef
  125. define Package/nfs-utils/install
  126. $(INSTALL_DIR) $(1)/sbin
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
  128. (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
  129. endef
  130. $(eval $(call HostBuild))
  131. $(eval $(call BuildPackage,nfs-kernel-server))
  132. $(eval $(call BuildPackage,nfs-kernel-server-utils))
  133. $(eval $(call BuildPackage,nfs-utils))