summaryrefslogtreecommitdiffstats
path: root/rules/rpcbind.make
blob: e6e29a913f0ae28ba9bcb5925462d40e496c86b3 (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
# -*-makefile-*-
#
# Copyright (C) 2015 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# 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_RPCBIND) += rpcbind

#
# Paths and names
#
RPCBIND_VERSION	:= 0.2.3
RPCBIND_MD5	:= c8875246b2688a1adfbd6ad43480278d
RPCBIND		:= rpcbind-$(RPCBIND_VERSION)
RPCBIND_SUFFIX	:= tar.bz2
RPCBIND_URL	:= $(call ptx/mirror, SF, rpcbind/$(RPCBIND).$(RPCBIND_SUFFIX))
RPCBIND_SOURCE	:= $(SRCDIR)/$(RPCBIND).$(RPCBIND_SUFFIX)
RPCBIND_DIR	:= $(BUILDDIR)/$(RPCBIND)
RPCBIND_LICENSE	:= BSD-3-Clause

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

#
# autoconf
#
RPCBIND_CONF_TOOL	:= autoconf
RPCBIND_CONF_OPT	:= \
	$(CROSS_AUTOCONF_USR) \
	--disable-libwrap \
	--disable-debug \
	--disable-warmstarts \
	--with-rpcuser=rpcuser \
	--with-nss-modules=files \
	--$(call ptx/wwo, PTXCONF_RPCBIND_SYSTEMD_UNIT)-systemdsystemunitdir$(call ptx/ifdef,PTXCONF_RPCBIND_SYSTEMD_UNIT,=/lib/systemd/system)

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

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

	@$(call install_init, rpcbind)
	@$(call install_fixup, rpcbind,PRIORITY,optional)
	@$(call install_fixup, rpcbind,SECTION,base)
	@$(call install_fixup, rpcbind,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
	@$(call install_fixup, rpcbind,DESCRIPTION,missing)

	@$(call install_copy, rpcbind, 0, 0, 0755, -, /usr/bin/rpcbind)

ifdef PTXCONF_RPCBIND_SYSTEMD_UNIT
	@$(call install_alternative, rpcbind, 0, 0, 0644, \
		/lib/systemd/system/rpcbind.service)
	@$(call install_alternative, rpcbind, 0, 0, 0644, \
		/lib/systemd/system/rpcbind.socket)
	@$(call install_link, rpcbind, ../rpcbind.socket, \
		/lib/systemd/system/sockets.target.wants/rpcbind.socket)
endif

	@$(call install_finish, rpcbind)

	@$(call touch)

# vim: syntax=make