]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - dhcp/dhcp.nm
dhcp: Move pid files, create runtime dirs and lease files.
[people/ms/ipfire-3.x.git] / dhcp / dhcp.nm
CommitLineData
cc52c523 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
cc52c523
MT
4###############################################################################
5
802ea3af
MT
6name = dhcp
7version = 4.2.1-P1
3dd085a5 8release = 2
cc52c523 9
802ea3af
MT
10groups = Networking/Daemons
11url = http://isc.org/products/DHCP/
12license = ISC
13summary = Dynamic host configuration protocol software.
cc52c523 14
802ea3af 15description
cc52c523
MT
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.
802ea3af
MT
21end
22
23source_dl =
24
25build
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 \
3dd085a5
SS
30 --with-srv-pid-file=/run/dhcpd.pid \
31 --with-cli-pid-file=/run/dhclient.pid \
32 --with-relay-pid-file=/run/dhcrelay.pid
802ea3af
MT
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
3dd085a5
SS
44
45 # Create runtime folders.
802ea3af 46 mkdir -pv %{BUILDROOT}/var/lib/dhclient
3dd085a5
SS
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
802ea3af
MT
52
53 # Remove header files.
54 # There is nothing that makes use out of them.
55 rm -rfv %{BUILDROOT}/usr/include
56 end
57end
58
59packages
60 package %{name}
61 end
62end