]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - rpcbind/rpcbind.nm
rpcbind: New package.
[people/ms/ipfire-3.x.git] / rpcbind / rpcbind.nm
CommitLineData
c8f78a53
MT
1###############################################################################
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
4###############################################################################
5
6name = rpcbind
7version = 0.2.0
8release = 1
9
10groups = System/Daemons
11url = http://nfsv4.bullopensource.org
12license = BSD
13summary = Universal Addresses to RPC Program Number Mapper
14
15description
16 The rpcbind utility is a server that converts RPC program numbers into
17 universal addresses. It must be running on the host to be able to make
18 RPC calls on a server on that machine.
19end
20
21source_dl = http://downloads.sourceforge.net/rpcbind/
22sources = %{thisapp}.tar.bz2
23
24build
25 requires
26 autoconf
27 automake
28 libtirpc-devel
29 libtool
30 systemd-units
31 end
32
33 prepare_cmds
34 autoreconf -fisv
35
36 %{create_user}
37 end
38
39 configure_options += \
40 --enable-warmstarts \
41 --with-statedir=/var/lib/rpcbind \
42 --with-rpcuser=rpc \
43 --enable-debug
44
45 install_cmds
46 mkdir -pv %{BUILDROOT}%{sbindir}
47
48 mv -v %{BUILDROOT}{%{bindir},%{sbindir}}/rpcbind
49 mv -v %{BUILDROOT}{%{bindir},%{sbindir}}/rpcinfo
50
51 mkdir -pv -m 700 %{BUILDROOT}/var/lib/rpcbind
52 chown rpc:rpc %{BUILDROOT}/var/lib/rpcbind
53 end
54end
55
56create_user
57 getent group rpc >/dev/null || groupadd -r -g 32 rpc
58 getent passwd rpc >/dev/null || useradd -r -g 32 \
59 -c "Rpcbind Daemon" -d /var/lib/rpcbind -s /sbin/nologin rpc
60end
61
62packages
63 package %{name}
64 provides
65 portmap = %{thisver}
66 end
67
68 requires
69 setup >= 3.0-7
70 end
71
72 script prein
73 %{create_user}
74 end
75
76 script postin
77 systemctl daemon-reload >/dev/null 2>&1 || :
78 systemctl --no-reload enable rpcbind.service >/dev/null 2>&1 || :
79 end
80
81 script postup
82 systemctl daemon-reload >/dev/null 2>&1 || :
83 systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
84 end
85
86 script preun
87 systemctl --no-reload disable rpcbind.service >/dev/null 2>&1 || :
88 systemctl stop rpcbind.service >/dev/null 2>&1 || :
89 end
90
91 script postun
92 systemctl daemon-reload >/dev/null 2>&1 || :
93 end
94 end
95
96 package %{name}-debuginfo
97 template DEBUGINFO
98 end
99end