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
:=b0d1b8ec5c8c081a340cfc77bb8670cd
14 PKG_SOURCE_URL
:=@SF
/nfs
15 PKG_SOURCE
:=nfs-utils-
$(PKG_VERSION
).
tar.bz2
17 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/nfs-utils-
$(PKG_VERSION
)
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/nfs-utils-
$(PKG_VERSION
)
21 PKG_BUILD_DEPENDS
:=$(PKG_NAME
)/host
23 include $(INCLUDE_DIR
)/host-build.mk
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/nfs-kernel-server
/Default
30 DEPENDS
:=+libwrap
+libblkid
+libuuid
+USE_UCLIBC
:librpc
31 URL
:=http
://nfs.sourceforge.net
/
34 define Package
/nfs-kernel-server
35 $(call Package
/nfs-kernel-server
/Default
)
36 TITLE
:=Kernel NFS server support
37 DEPENDS
+= +kmod-fs-nfsd
+kmod-fs-nfs
+portmap
40 define Package
/nfs-kernel-server
/description
41 Kernel NFS server support
44 define Package
/nfs-kernel-server-utils
45 $(call Package
/nfs-kernel-server
/Default
)
46 TITLE
:=NFS server utils
47 DEPENDS
:=nfs-kernel-server
50 define Package
/nfs-kernel-server-utils
/description
54 define Package
/nfs-kernel-server
/conffiles
58 define Package
/nfs-utils
59 $(call Package
/nfs-kernel-server
/Default
)
62 DEPENDS
+= +libevent
+USE_UCLIBC
:librpc
63 TITLE
:=updated mount utility
(includes nfs4
)
66 define Package
/nfs-utils
/description
67 Updated mount.nfs command
- allows mounting nfs4 volumes
70 TARGET_CFLAGS
+= -I
$(PKG_BUILD_DIR
)/lib
-I
$(STAGING_DIR
)/usr
/include -Drpc_uint
=uint
71 TARGET_LDFLAGS
+= -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
$(LIBRPC
)
80 OPT
="$(TARGET_CFLAGS)" \
81 INSTALLSUID
="install -m 4755" \
82 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 RPCGEN_PATH
=$(STAGING_DIR_HOST
)/bin
/rpcgen \
84 RPCGEN
=$(STAGING_DIR_HOST
)/bin
/rpcgen
86 HOST_CFLAGS
+= -Dlinux
88 HOST_CONFIGURE_ARGS
+= \
91 --without-tcp-wrappers
93 HOST_CONFIGURE_VARS
+= \
94 ac_cv_lib_event_event_dispatch
=yes \
95 ac_cv_lib_nfsidmap_nfs4_init_name_mapping
=yes \
96 ac_cv_lib_blkid_blkid_get_library_version
=yes \
97 ac_cv_header_event_h
=yes \
98 ac_cv_header_nfsidmap_h
=yes \
99 ac_cv_header_blkid_blkid_h
=yes \
102 RPCSECGSS_CFLAGS
=" " \
107 $(MAKE
) -C
$(HOST_BUILD_DIR
)/tools
/rpcgen
all
111 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/tools
/rpcgen
/rpcgen
$(STAGING_DIR_HOST
)/bin
/rpcgen
114 define Package
/nfs-kernel-server
/install
115 $(INSTALL_DIR
) $(1)/etc
/init.d
$(1)/usr
/sbin
116 $(INSTALL_DATA
) .
/files
/nfsd.exports
$(1)/etc
/exports
117 $(INSTALL_BIN
) .
/files
/nfsd.init
$(1)/etc
/init.d
/nfsd
118 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/statd
/sm-notify
$(1)/usr
/sbin
/
119 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/statd
/statd
$(1)/usr
/sbin
/rpc.statd
120 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/nfsd
/nfsd
$(1)/usr
/sbin
/rpc.nfsd
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/mountd
/mountd
$(1)/usr
/sbin
/rpc.mountd
122 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/exportfs
/exportfs
$(1)/usr
/sbin
/
125 define Package
/nfs-kernel-server-utils
/install
126 $(INSTALL_DIR
) $(1)/usr
/sbin
127 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/showmount
/showmount
$(1)/usr
/sbin
128 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/utils
/nfsstat
/nfsstat
$(1)/usr
/sbin
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
)
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
))