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