name = dhcp
version = 4.2.2
-release = 2
+release = 5
groups = Networking/Daemons
url = http://isc.org/products/DHCP/
libtool
openldap-devel
libcap-ng-devel
+ systemd-units
end
CFLAGS += \
-Wl,--as-needed
configure_options += \
- --sysconfdir=/etc \
+ --sysconfdir=%{sysconfdir}/dhcp \
--with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
- --with-srv6-lease-file=/var/lib/dhcpd/dhcp6.leases \
+ --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \
--with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
--with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases \
--with-srv-pid-file=/run/dhcpd.pid \
end
install_cmds
- rm -vf %{BUILDROOT}/etc/dhclient.conf
+ rm -vf %{BUILDROOT}%{sysconfdir}/dhcp/dhclient.conf
# Move the client to /sbin, create dirs
# and remove the default config.
packages
package %{name}
-
requires
- dhcp-common
+ dhcp-common = %{thisver}
+ dhcp-libs = %{thisver}
+ /usr/lib/network/helpers/dhcpd-config-helper
end
prerequires += shadow-utils
+ configfiles
+ %{sysconfdir}/dhcp
+ end
+
script prein
getent group dhcpd >/dev/null || groupadd -r dhcpd
getent passwd dhcpd >/dev/null || \
useradd -r -g dhcpd -d /var/lib/dhcpd -s /sbin/nologin \
-c "User for the DHCP server" dhcpd
- exit 0
end
# Just search for new unit files that were just installed.
description = %{summary}
requires
- dhcp-common
+ dhcp-common = %{thisver}
+ dhcp-libs = %{thisver}
end
files
+ %{unitdir}/dhclient*.service
/sbin
/usr/share/man/man5/dhclient*
/usr/share/man/man8/dhclient*
/var/lib/dhclient
end
+
+ script postin
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ end
+
+ script postun
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ end
+
+ script postup
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ end
+
end
package %{name}-common
summary = Common files used by the dhcp client and server.
description = %{summary}
+ requires
+ dhcp-libs = %{thisver}
+ end
+
files
/usr/bin/
/usr/share/man/man1/omshell.1*