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.

152 lines
4.1 KiB

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