summaryrefslogtreecommitdiff
path: root/core/dhcpcd/PKGBUILD
blob: 5e2fb8a2de7c999a0834fb097acfe4f7e50abc33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id: PKGBUILD 192483 2013-08-12 21:11:39Z dreisner $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Tom Killian <tom.archlinux.org>
# Contributor: Judd Vinet <jvinet.zeroflux.org>

pkgname=dhcpcd
pkgver=6.0.5
pkgrel=1
pkgdesc="RFC2131 compliant DHCP client daemon"
url="http://roy.marples.name/projects/dhcpcd/"
arch=('i686' 'x86_64' 'mips64el')
license=('BSD')
groups=('base')
depends=('glibc' 'sh')
provides=('dhcp-client')
backup=('etc/dhcpcd.conf')
options=('emptydirs')  # We Need the Empty /var/lib/dhcpcd Directory
source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2"
        'dhcpcd_.service'
        'dhcpcd.service')
sha1sums=('433555ac11669333344d7ec80120f3ccdd0fcae5'
          '6245b8db7e6f39a0305571726bb693a53901c400'
          'e49e01041f831281a1cd0c97ca21204e0aa07fda')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  # configure variables
  ./configure \
      --sbindir=/usr/bin \
      --libexecdir=/usr/lib/dhcpcd \
      --dbdir=/var/lib/dhcpcd \
      --rundir=/run

  # Build
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  # Install License
  install -d $pkgdir/usr/share/licenses/$pkgname
  sed 26q "$srcdir/$pkgname-$pkgver/control.h" \
      >>"$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  # Set Options in /etc/dhcpcd.conf
  echo noipv4ll >> ${pkgdir}/etc/dhcpcd.conf # Disable ip4vall

  # install systemd files
  install -Dm644 ${srcdir}/dhcpcd_.service ${pkgdir}/usr/lib/systemd/system/dhcpcd@.service
  install -Dm644 ${srcdir}/dhcpcd.service ${pkgdir}/usr/lib/systemd/system/dhcpcd.service # FS#31543
}