1 # Copyright (C) 2009 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
9 PKG_NAME:=nfs-kernel-server
12 PKG_MD5SUM:=2848072a5e53840b9bc520fbb6782b57
14 PKG_SOURCE_URL:=@SF/nfs
15 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
17 PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
19 include $(INCLUDE_DIR)/package.mk
21 define Package/nfs-kernel-server/Default
25 DEPENDS:=+libwrap +libblkid
26 URL:=http://nfs.sourceforge.net/
29 define Package/nfs-kernel-server
30 $(call Package/nfs-kernel-server/Default)
31 TITLE:=Kernel NFS server support
32 DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap
35 define Package/nfs-kernel-server/description
36 Kernel NFS server support
39 define Package/nfs-kernel-server-utils
40 $(call Package/nfs-kernel-server/Default)
41 TITLE:=NFS server utils
42 DEPENDS:=nfs-kernel-server
45 define Package/nfs-kernel-server-utils/description
49 define Package/nfs-kernel-server/conffiles
53 define Package/nfs-utils
54 $(call Package/nfs-kernel-server/Default)
58 TITLE:=updated mount utility (includes nfs4)
61 define Package/nfs-utils/description
62 Updated mount.nfs command - allows mounting nfs4 volumes
71 TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
72 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
75 $(call Build/Compile/Default, \
76 OPT="$(TARGET_CFLAGS)" \
77 INSTALLSUID="install -m 4755" \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
83 define Package/nfs-kernel-server/install
84 $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
85 $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
86 $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
87 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
88 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
89 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
90 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
93 define Package/nfs-kernel-server-utils/install
94 $(INSTALL_DIR) $(1)/usr/sbin
95 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
96 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
99 define Package/nfs-utils/install
100 $(INSTALL_DIR) $(1)/sbin
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
102 (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
105 $(eval $(call BuildPackage,nfs-kernel-server))
106 $(eval $(call BuildPackage,nfs-kernel-server-utils))
107 $(eval $(call BuildPackage,nfs-utils))