source: packages/net/nfs-kernel-server/Makefile @ 25519

Last change on this file since 25519 was 25519, checked in by nbd, 5 years ago

nfs-kernel-server: add a host build for rpcgen with the header file fixes, fix patching of generated files

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 3.8 KB
Line 
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
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=nfs-kernel-server
10PKG_VERSION:=1.1.6
11PKG_RELEASE:=1
12PKG_MD5SUM:=b0d1b8ec5c8c081a340cfc77bb8670cd
13
14PKG_SOURCE_URL:=@SF/nfs
15PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
16
17HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
18PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
19PKG_INSTALL:=1
20PKG_BUILD_PARALLEL:=1
21PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
22
23include $(INCLUDE_DIR)/host-build.mk
24include $(INCLUDE_DIR)/package.mk
25
26define Package/nfs-kernel-server/Default
27  SECTION:=net
28  CATEGORY:=Network
29  SUBMENU:=Filesystem
30  DEPENDS:=+libwrap +libblkid +libuuid +USE_UCLIBC:librpc
31  URL:=http://nfs.sourceforge.net/
32endef
33
34define 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
38endef
39
40define Package/nfs-kernel-server/description
41  Kernel NFS server support
42endef
43
44define Package/nfs-kernel-server-utils
45  $(call Package/nfs-kernel-server/Default)
46  TITLE:=NFS server utils
47  DEPENDS:=nfs-kernel-server
48endef
49
50define Package/nfs-kernel-server-utils/description
51  NFS server utils
52endef
53
54define Package/nfs-kernel-server/conffiles
55/etc/exports
56endef
57
58define Package/nfs-utils
59  $(call Package/nfs-kernel-server/Default)
60  SECTION:=utils
61  CATEGORY:=Utilities
62  DEPENDS+= +libevent +USE_UCLIBC:librpc
63  TITLE:=updated mount utility (includes nfs4)
64endef
65
66define Package/nfs-utils/description
67  Updated mount.nfs command - allows mounting nfs4 volumes
68endef
69
70TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include -Drpc_uint=uint
71TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC)
72
73CONFIGURE_ARGS += \
74        --disable-gss \
75        --disable-nfsv4 \
76        --enable-static \
77        --enable-shared
78
79MAKE_FLAGS += \
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
85
86HOST_CFLAGS += -Dlinux
87
88HOST_CONFIGURE_ARGS += \
89        --disable-gss \
90        --disable-nfsv4
91
92HOST_CONFIGURE_VARS += \
93        ac_cv_lib_event_event_dispatch=yes \
94        ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \
95        ac_cv_lib_blkid_blkid_get_library_version=yes \
96        ac_cv_header_event_h=yes \
97        ac_cv_header_nfsidmap_h=yes \
98        ac_cv_header_blkid_blkid_h=yes \
99        GSSGLUE_CFLAGS=" " \
100        GSSGLUE_LIBS=" " \
101        RPCSECGSS_CFLAGS=" " \
102        RPCSECGSS_LIBS=" " \
103
104
105define Host/Compile
106        $(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all
107endef
108
109define Host/Install
110        $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOST)/bin/rpcgen
111endef
112
113define Package/nfs-kernel-server/install
114        $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
115        $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
116        $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
117        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/
118        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
119        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
120        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
121        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
122endef
123
124define Package/nfs-kernel-server-utils/install
125        $(INSTALL_DIR) $(1)/usr/sbin
126        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
127        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
128endef
129
130define Package/nfs-utils/install
131        $(INSTALL_DIR) $(1)/sbin
132        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
133        (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
134endef
135
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))
Note: See TracBrowser for help on using the repository browser.