]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - dhcp/dhcp.nm
dhcp: Bump release for rebuild against bind 9.9
[people/amarx/ipfire-3.x.git] / dhcp / dhcp.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = dhcp
7 version = 4.2.5
8 release = 3
9
10 groups = Networking/Daemons
11 url = http://isc.org/products/DHCP/
12 license = ISC
13 summary = Dynamic host configuration protocol software.
14
15 description
16 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
17 individual devices on an IP network to get their own network
18 configuration information (IP address, subnetmask, broadcast address,
19 etc.) from a DHCP server. The overall purpose of DHCP is to make it
20 easier to administer a large network.
21 end
22
23 source_dl = ftp://ftp.isc.org/isc/dhcp/%{version}/
24
25 # Apply patches in a special order.
26 patches = \
27 dhcp-4.2.5-remove-bind.patch \
28 dhcp-4.2.4-P1-remove-dst.patch \
29 dhcp-4.2.0-errwarn-message.patch \
30 dhcp-4.2.4-dhclient-options.patch \
31 dhcp-4.2.0-release-by-ifup.patch \
32 dhcp-4.2.0-dhclient-decline-backoff.patch \
33 dhcp-4.2.4-unicast-bootp.patch \
34 dhcp-4.2.0-default-requested-options.patch \
35 dhcp-4.2.2-xen-checksum.patch \
36 dhcp-4.2.5-manpages.patch \
37 dhcp-4.2.4-paths.patch \
38 dhcp-4.2.2-CLOEXEC.patch \
39 dhcp-4.2.0-garbage-chars.patch \
40 dhcp-4.2.0-add_timeout_when_NULL.patch \
41 dhcp-4.2.4-64_bit_lease_parse.patch \
42 dhcp-4.2.2-capability.patch \
43 dhcp-4.2.0-logpid.patch \
44 dhcp-4.2.4-UseMulticast.patch \
45 dhcp-4.2.5-sendDecline.patch \
46 dhcp-4.2.1-retransmission.patch \
47 dhcp-4.2.5-rfc3442-classless-static-routes.patch \
48 dhcp-4.2.0-honor-expired.patch \
49 dhcp-4.2.5-sharedlib.patch \
50 dhcp-4.2.5-PPP.patch \
51 dhcp-4.2.5-paranoia.patch \
52 dhcp-4.2.5-lpf-ib.patch \
53 dhcp-4.2.4-improved-xid.patch \
54 dhcp-4.2.2-gpxe-cid.patch \
55 dhcp-4.2.5-systemtap.patch \
56 dhcp-4.2.3-dhclient-decline-onetry.patch \
57 dhcp-4.2.3-P2-log_perror.patch \
58 dhcp-4.2.4-getifaddrs.patch \
59 dhcp-4.2.4-send_release.patch \
60 dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch \
61 dhcp-4.2.4-failOverPeer.patch \
62 dhcp-4.2.5b1-atf-pkgconfig.patch \
63 dhcp-4.2.4-P1-interval.patch \
64 dhcp-4.2.4-P2-conflex-do-forward-updates.patch \
65 dhcp-4.2.4-P2-dupl-key.patch \
66 dhcp-4.2.5-range6.patch \
67 dhcp-4.2.5-next-server.patch
68
69 build
70 requires
71 autoconf
72 automake
73 bind-devel>=9
74 bind-devel<10
75 groff
76 libtool
77 openldap-devel
78 libcap-ng-devel
79 systemd-units
80 end
81
82 CFLAGS += -fno-strict-aliasing
83
84 configure_options += \
85 --sysconfdir=%{sysconfdir}/dhcp \
86 --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
87 --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \
88 --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
89 --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases \
90 --with-srv-pid-file=/run/dhcpd.pid \
91 --with-srv6-pid-file=/run/dhcpd6.pid \
92 --with-cli-pid-file=/run/dhclient.pid \
93 --with-cli6-pid-file=/run/dhclient6.pid \
94 --with-relay-pid-file=/run/dhcrelay.pid \
95 --with-ldap \
96 --with-ldapcrypto \
97 --with-libbind=/usr/include/ \
98 --with-libbind-libs=/usr/lib/ \
99 --disable-static \
100 --enable-paranoia \
101 --enable-early-chroot
102
103 prepare_cmds
104 # Remove bundled BIND source
105 rm -rvf %{DIR_APP}/bind/bind.tar.gz
106
107 # Remove dst.
108 rm -rvf dst includes/isc-dhcp
109
110 # Regenerate build environment
111 #libtoolize --copy --force
112 autoreconf --verbose --force --install
113 end
114
115 install_cmds
116 rm -vf %{BUILDROOT}%{sysconfdir}/dhcp/dhclient.conf
117
118 # Create runtime folders.
119 mkdir -pv %{BUILDROOT}/var/lib/dhclient
120 mkdir -pv %{BUILDROOT}/var/lib/dhcpd
121
122 # Create empty lease files.
123 touch %{BUILDROOT}/var/lib/dhclient/dhclient.leases
124 touch %{BUILDROOT}/var/lib/dhclient/dhclient6.leases
125 touch %{BUILDROOT}/var/lib/dhcpd/dhcpd.leases
126 touch %{BUILDROOT}/var/lib/dhcpd/dhcpd6.leases
127 end
128 end
129
130 packages
131 package %{name}
132 requires
133 dhcp-common = %{thisver}
134 dhcp-libs = %{thisver}
135 /usr/lib/network/helpers/dhcpd-config-helper
136 end
137
138 prerequires += shadow-utils
139
140 configfiles
141 %{sysconfdir}/dhcp
142 end
143
144 script prein
145 getent group dhcpd >/dev/null || groupadd -r dhcpd
146 getent passwd dhcpd >/dev/null || \
147 useradd -r -g dhcpd -d /var/lib/dhcpd -s /sbin/nologin \
148 -c "User for the DHCP server" dhcpd
149 end
150
151 # Just search for new unit files that were just installed.
152 script postin
153 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
154 end
155
156 # Disable the service that is to be removed and stop it if it is still running.
157 script preun
158 /bin/systemctl --no-reload disable dhcpd.service >/dev/null 2>&1 || :
159 /bin/systemctl --no-reload disable dhcpd6.service >/dev/null 2>&1 || :
160 /bin/systemctl --no-reload disable dhcrelay.service >/dev/null 2>&1 || :
161 /bin/systemctl stop dhcpd.service >/dev/null 2>&1 || :
162 /bin/systemctl stop dhcpd6.service >/dev/null 2>&1 || :
163 /bin/systemctl stop dhcrelay.service >/dev/null 2>&1 || :
164 end
165
166 # Just tell systemd that unitfiles have been removed.
167 script postun
168 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
169 end
170
171 # Try to restart the service if it is running.
172 script postup
173 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
174 /bin/systemctl try-restart dhcpd.service >/dev/null 2>&1 || :
175 /bin/systemctl try-restart dhcpd6.service >/dev/null 2>&1 || :
176 /bin/systemctl try-restart dhcrelay.service >/dev/null 2>&1 || :
177 end
178 end
179
180 package dhclient
181 summary = DHCP client daemon and dhclient-script.
182 description = %{summary}
183
184 requires
185 dhcp-common = %{thisver}
186 dhcp-libs = %{thisver}
187 %{sbindir}/dhclient-script
188 end
189
190 files
191 %{unitdir}/dhclient*.service
192 %{sbindir}/dhclient
193 /usr/share/man/man5/dhclient*
194 /usr/share/man/man8/dhclient*
195 /var/lib/dhclient
196 end
197
198 script postin
199 systemctl daemon-reload >/dev/null 2>&1 || :
200 end
201
202 script postun
203 systemctl daemon-reload >/dev/null 2>&1 || :
204 end
205
206 script postup
207 systemctl daemon-reload >/dev/null 2>&1 || :
208 end
209
210 end
211
212 package %{name}-common
213 summary = Common files used by the dhcp client and server.
214 description = %{summary}
215
216 requires
217 dhcp-libs = %{thisver}
218 end
219
220 files
221 /usr/bin/
222 /usr/share/man/man1/omshell.1*
223 /usr/share/man/man5/dhcp-options.5*
224 /usr/share/man/man5/dhcp-eval.5*
225 end
226 end
227
228 package %{name}-libs
229 template LIBS
230 end
231
232 package %{name}-devel
233 template DEVEL
234 end
235
236 package %{name}-debuginfo
237 template DEBUGINFO
238 end
239 end