summaryrefslogtreecommitdiff
path: root/testing/dhcpcd/PKGBUILD
blob: 422486a8ec437a95f694615e953ab42f25293450 (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 142023 2011-11-04 06:51:06Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Tom Killian <tom.archlinux.org>
# Contributor: Judd Vinet <jvinet.zeroflux.org>

pkgname=dhcpcd
pkgver=5.2.12
pkgrel=3
pkgdesc="RFC2131 compliant DHCP client daemon"
url="http://roy.marples.name/dhcpcd/"
arch=('i686' 'x86_64')
license=('BSD')
groups=('base')
depends=('glibc' 'sh' 'inetutils' 'iproute2')
backup=('etc/conf.d/dhcpcd' '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.conf.d' 'remove_ifconfig.patch')
sha1sums=('27378a251705c7888332e6d60eea7805d1f8aeb5'
          'b67b9ce6a2faaca75fea356966a16be2283b7db0'
          'de3e14a24b479b2832c6671ba12586444bd86ebe')

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

  # remove ifconfig call but use ip (iproute2) instead
  patch -Np0 -i ${srcdir}/remove_ifconfig.patch

  # configure variables
  ./configure --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd

  # Build
  make
}

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

  # Create Binary Symlink
  install -d ${pkgdir}/usr/sbin
  ln -sf /sbin/dhcpcd ${pkgdir}/usr/sbin/dhcpcd

  # Install Configuration File used in /etc/rc.d/network
  install -D -m644 ../dhcpcd.conf.d $pkgdir/etc/conf.d/$pkgname

  # Install License
  install -d $pkgdir/usr/share/licenses/$pkgname
  awk '{if(FNR<27)print $0}' ${srcdir}/${pkgname}-${pkgver}/configure.h \
        >> ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE

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