summaryrefslogtreecommitdiffstats
path: root/rules/nfsutils.make
blob: 929f53c7223efb1af474f76041a92863ccecc59f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# -*-makefile-*-
#
# Copyright (C) 2003-2006 by Pengutronix e.K., Hildesheim, Germany
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_NFSUTILS) += nfsutils

#
# Paths and names
#
NFSUTILS_VERSION	:= 1.3.3
NFSUTILS_MD5		:= 9b87d890669eaaec8e97a2b0a35b2665
NFSUTILS		:= nfs-utils-$(NFSUTILS_VERSION)
NFSUTILS_SUFFIX		:= tar.bz2
NFSUTILS_URL		:= $(call ptx/mirror, SF, nfs/$(NFSUTILS).$(NFSUTILS_SUFFIX))
NFSUTILS_SOURCE		:= $(SRCDIR)/$(NFSUTILS).$(NFSUTILS_SUFFIX)
NFSUTILS_DIR		:= $(BUILDDIR)/$(NFSUTILS)
NFSUTILS_LICENSE	:= GPL-2.0-or-later

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

NFSUTILS_CONF_ENV	:= \
	$(CROSS_ENV) \
	knfsd_cv_bsd_signals=no

#
# autoconf
#
NFSUTILS_CONF_TOOL	:= autoconf
NFSUTILS_CONF_OPT	:= \
	$(CROSS_AUTOCONF_USR) \
	--exec-prefix=/usr \
	--disable-nfsv4 \
	--disable-nfsv41 \
	--disable-gss \
	--disable-svcgss \
	--disable-kprefix \
	--disable-uuid \
	--$(call ptx/endis, PTXCONF_NFSUTILS_CLIENT)-mount \
	--$(call ptx/endis, PTXCONF_NFSUTILS_CLIENT)-libmount-mount \
	--$(call ptx/endis, PTXCONF_GLOBAL_IPV6)-tirpc \
	$(GLOBAL_IPV6_OPTION) \
	--disable-mountconfig \
	--disable-nfsdcltrack \
	--enable-osdlogin \
	--disable-caps \
	$(GLOBAL_LARGE_FILE_OPTION) \
	--with-statedir=/var/lib/nfs \
	--with-statdpath=/var/lib/nfs \
	--with-statduser=rpcuser \
	--with-systemd=/usr/lib/systemd/system \
	--with-rpcgen=internal \
	--without-mountfile \
	--without-tcp-wrappers \
	--without-krb5 \
	--without-gssglue

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/nfsutils.targetinstall:
	@$(call targetinfo)

	@$(call install_init, nfsutils)
	@$(call install_fixup, nfsutils,PRIORITY,optional)
	@$(call install_fixup, nfsutils,SECTION,base)
	@$(call install_fixup, nfsutils,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
	@$(call install_fixup, nfsutils,DESCRIPTION,missing)

	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/showmount)

	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/rpc.statd)
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/start-statd)
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/sm-notify)

	@$(call install_copy, nfsutils, rpcuser, 0, 0755, \
		/var/lib/nfs)

ifdef PTXCONF_NFSUTILS_SYSTEMD_UNIT
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/tmpfiles.d/nfs.conf)
else
	@$(call install_copy, nfsutils, rpcuser, 0, 0644, -, \
		/var/lib/nfs/etab)
	@$(call install_copy, nfsutils, rpcuser, 0, 0644, -, \
		/var/lib/nfs/rmtab)
	@$(call install_copy, nfsutils, rpcuser, 0, 0644, -, \
		/var/lib/nfs/xtab)
	@$(call install_copy, nfsutils, rpcuser, 0, 0644, -, \
		/var/lib/nfs/state)
	@$(call install_copy, nfsutils, rpcuser, 0, 0755, \
		/var/lib/nfs/sm)
	@$(call install_copy, nfsutils, rpcuser, 0, 0755, \
		/var/lib/nfs/sm.bak)
endif

ifdef PTXCONF_NFSUTILS_CLIENT
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/mount.nfs)
	@$(call install_link, nfsutils, mount.nfs, /usr/sbin/umount.nfs)
endif

ifdef PTXCONF_NFSUTILS_SERVER
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/rpc.nfsd)
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/rpc.mountd)
	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/exportfs)

	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/etc/exports)
endif

#	#
#	# busybox init: start scripts
#	#
ifdef PTXCONF_INITMETHOD_BBINIT
ifdef PTXCONF_NFSUTILS_NFSD_STARTSCRIPT
	@$(call install_alternative, nfsutils, 0, 0, 0755, /etc/init.d/nfsd)

ifneq ($(call remove_quotes,$(PTXCONF_NFSUTILS_NFSD_BBINIT_LINK)),)
	@$(call install_link, nfsutils, \
		../init.d/nfsd, \
		/etc/rc.d/$(PTXCONF_NFSUTILS_NFSD_BBINIT_LINK))
endif
endif
endif

ifdef PTXCONF_NFSUTILS_SYSTEMD_UNIT
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/rpc-statd.service)
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/rpc-statd-notify.service)
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/var-lib-nfs.mount)
	@$(call install_link, nfsutils, ../var-lib-nfs.mount, \
		/usr/lib/systemd/system/local-fs.target.requires/var-lib-nfs.mount)

ifdef PTXCONF_NFSUTILS_CLIENT
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/nfs-client.target)
	@$(call install_link, nfsutils, ../nfs-client.target, \
		/usr/lib/systemd/system/multi-user.target.wants/nfs-client.target)
	@$(call install_link, nfsutils, ../nfs-client.target, \
		/usr/lib/systemd/system/remote-fs.target.wants/nfs-client.target)
endif
ifdef PTXCONF_NFSUTILS_SERVER
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/proc-fs-nfsd.mount)
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/nfs-mountd.service)
	@$(call install_alternative, nfsutils, 0, 0, 0644, \
		/usr/lib/systemd/system/nfs-server.service)
	@$(call install_link, nfsutils, ../nfs-server.service, \
		/usr/lib/systemd/system/multi-user.target.wants/nfs-server.service)
endif
endif
	@$(call install_finish, nfsutils)
	@$(call touch)

# vim: syntax=make