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

Last change on this file since 25499 was 25499, checked in by nbd, 6 years ago

nfs-kernel-server: fix compile issues with uclibc and the new external librpc

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 2.9 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
17PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
18PKG_INSTALL:=1
19PKG_BUILD_PARALLEL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/nfs-kernel-server/Default
24  SECTION:=net
25  CATEGORY:=Network
26  SUBMENU:=Filesystem
27  DEPENDS:=+libwrap +libblkid +libuuid
28  URL:=http://nfs.sourceforge.net/
29endef
30
31define Package/nfs-kernel-server
32  $(call Package/nfs-kernel-server/Default)
33  TITLE:=Kernel NFS server support
34  DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap
35endef
36
37define Package/nfs-kernel-server/description
38  Kernel NFS server support
39endef
40
41define Package/nfs-kernel-server-utils
42  $(call Package/nfs-kernel-server/Default)
43  TITLE:=NFS server utils
44  DEPENDS:=nfs-kernel-server
45endef
46
47define Package/nfs-kernel-server-utils/description
48  NFS server utils
49endef
50
51define Package/nfs-kernel-server/conffiles
52/etc/exports
53endef
54
55define Package/nfs-utils
56  $(call Package/nfs-kernel-server/Default)
57  SECTION:=utils
58  CATEGORY:=Utilities
59  DEPENDS+= +libevent
60  TITLE:=updated mount utility (includes nfs4)
61endef
62
63define Package/nfs-utils/description
64  Updated mount.nfs command - allows mounting nfs4 volumes
65endef
66
67TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include -Drpc_uint=uint
68TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC)
69
70CONFIGURE_ARGS += \
71        --disable-gss \
72        --disable-nfsv4 \
73        --enable-static \
74        --enable-shared
75
76MAKE_FLAGS += \
77        OPT="$(TARGET_CFLAGS)" \
78        INSTALLSUID="install -m 4755" \
79        DESTDIR="$(PKG_INSTALL_DIR)"
80
81define Package/nfs-kernel-server/install
82        $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
83        $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
84        $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
85        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/
86        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
87        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
88        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
89        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
90endef
91
92define Package/nfs-kernel-server-utils/install
93        $(INSTALL_DIR) $(1)/usr/sbin
94        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
95        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
96endef
97
98define Package/nfs-utils/install
99        $(INSTALL_DIR) $(1)/sbin
100        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
101        (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
102endef
103
104$(eval $(call BuildPackage,nfs-kernel-server))
105$(eval $(call BuildPackage,nfs-kernel-server-utils))
106$(eval $(call BuildPackage,nfs-utils))
Note: See TracBrowser for help on using the repository browser.