]> git.ipfire.org Git - ipfire-3.x.git/blob - dhcp/dhcp.nm
dhcp: Move pid files, create runtime dirs and lease files.
[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.1-P1
8 release = 2
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 =
24
25 build
26 configure_options += \
27 --sysconfdir=/etc \
28 --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
29 --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
30 --with-srv-pid-file=/run/dhcpd.pid \
31 --with-cli-pid-file=/run/dhclient.pid \
32 --with-relay-pid-file=/run/dhcrelay.pid
33
34 install_cmds
35 rm -vf %{BUILDROOT}/etc/dhclient.conf
36
37 # Move the client to /sbin, create dirs
38 # and remove the default config.
39 mkdir -pv %{BUILDROOT}/sbin
40 mv -v %{BUILDROOT}/usr/sbin/dhclient %{BUILDROOT}/sbin/dhclient
41
42 install -v -m 755 %{DIR_SOURCE}/dhclient-script \
43 %{BUILDROOT}/sbin/dhclient-script
44
45 # Create runtime folders.
46 mkdir -pv %{BUILDROOT}/var/lib/dhclient
47 mkdir -pv %{BUILDROOT}/var/lib/dhcpd
48
49 # Create empty lease files.
50 touch %{BUILDROOT}/var/lib/dhclient/dhclient.leases
51 touch %{BUILDROOT}/var/lib/dhcpd/dhcpd.leases
52
53 # Remove header files.
54 # There is nothing that makes use out of them.
55 rm -rfv %{BUILDROOT}/usr/include
56 end
57 end
58
59 packages
60 package %{name}
61 end
62 end