mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-09 23:27:15 +08:00
60 lines
1.8 KiB
Bash
60 lines
1.8 KiB
Bash
#
|
|
# 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>
|
|
|
|
pkgname=dhcpcd
|
|
pkgver=5.6.6
|
|
pkgrel=1
|
|
pkgdesc="RFC2131 compliant DHCP client daemon"
|
|
url="http://roy.marples.name/projects/dhcpcd/"
|
|
arch=('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'
|
|
'dhcpcd@.service'
|
|
'dhcpcd.service')
|
|
sha1sums=('783f90caa7fd5c58463c2f4d02d5542e8860908e'
|
|
'b67b9ce6a2faaca75fea356966a16be2283b7db0'
|
|
'6245b8db7e6f39a0305571726bb693a53901c400'
|
|
'cad7ad8621af58bccccae421cc5d3f1360b02273')
|
|
|
|
build() {
|
|
cd ${srcdir}/${pkgname}-${pkgver}
|
|
|
|
# configure variables
|
|
./configure --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd --rundir=/run
|
|
|
|
# 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
|
|
|
|
# install systemd unit
|
|
install -Dm644 "$srcdir/dhcpcd@.service" "$pkgdir/usr/lib/systemd/system/dhcpcd@.service"
|
|
install -Dm644 "$srcdir/dhcpcd.service" "$pkgdir/usr/lib/systemd/system/dhcpcd.service"
|
|
}
|