core/dhcpcd/PKGBUILD

52 lines
1.6 KiB
Bash
Raw Normal View History

2010-11-07 21:32:51 +08:00
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-03-13 23:25:19 +08:00
pkgname=dhcpcd
2010-11-07 21:32:51 +08:00
pkgver=5.2.8
2010-04-04 22:20:41 +08:00
pkgrel=1
2010-03-13 23:25:19 +08:00
pkgdesc="RFC2131 compliant DHCP client daemon"
url="http://roy.marples.name/dhcpcd/"
arch=('i686' 'x86_64')
license=('BSD')
groups=('base')
depends=('glibc' 'sh')
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')
2010-11-07 21:32:51 +08:00
sha1sums=('3a7ffc6d3599fd4146791853b083dc577d8dd9c0'
'b67b9ce6a2faaca75fea356966a16be2283b7db0')
2010-03-13 23:25:19 +08:00
build() {
cd ${srcdir}/${pkgname}-${pkgver}
# configure variables
./configure --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd
# Build
make || return 1
2010-11-07 21:32:51 +08:00
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
2010-03-13 23:25:19 +08:00
make DESTDIR=${pkgdir} install || return 1
# Create Binary Symlink
install -d ${pkgdir}/usr/sbin || return 1
ln -sf /sbin/dhcpcd ${pkgdir}/usr/sbin/dhcpcd || return 1
# Install Configuration File used in /etc/rc.d/network
install -D -m644 ../dhcpcd.conf.d $pkgdir/etc/conf.d/$pkgname || return 1
# Install License
install -d $pkgdir/usr/share/licenses/$pkgname || return 1
awk '{if(FNR<27)print $0}' ${srcdir}/${pkgname}-${pkgver}/configure.h \
2010-11-07 21:32:51 +08:00
>> ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
2010-03-13 23:25:19 +08:00
# Set Options in /etc/dhcpcd.conf
echo noipv4ll >> ${pkgdir}/etc/dhcpcd.conf || return 1 # Disable ip4vall
}