jobcore/dhcpcd/PKGBUILD

92 lines
3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dhcpcd
pkgver=10.0.8
pkgrel=01
pkgdesc="RFC2131 compliant DHCP client daemon w/o systemd"
#url="https://roy.marples.name/projects/dhcpcd/"
url="https://github.com/NetworkConfiguration/dhcpcd/releases/download/v"
depends=('glibc' 'sh' 'libeudev' 'openssl')
optdepends=('openresolv: resolvconf support')
provides=('dhcp-client')
backup=('etc/dhcpcd.conf')
install='dhcpcd.install'
options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory
#source=(https://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.xz
#https://github.com/NetworkConfiguration/dhcpcd/releases/download/v10.0.2/dhcpcd-10.0.2.tar.xz
source=($url$pkgver/$pkgname-$pkgver.tar.xz{,.asc}
dhcpcd.install
dhcpcd.sysusers
dhcpcd.tmpfiles)
prepare() {
printf "# Do not attempt to obtain an IPv4LL address if we failed to get one via DHCP. See RFC 3927.\nnoipv4ll\n" >> $pkgname-$pkgver/src/$pkgname.conf
}
build() {
cd ${pkgname}-${pkgver}
# configure variables
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/usr/bin \
--libexecdir=/usr/lib/dhcpcd \
--dbdir=/var/lib/dhcpcd \
--runstatedir=/run \
--privsepuser=dhcpcd
# Build
make
}
check() {
cd ${pkgname}-${pkgver}
make test
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
# Install License
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Set Options in /etc/dhcpcd.conf
echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
# install sysuser amd tmpfiles files
install -Dm644 "${srcdir}/dhcpcd.sysusers" "${pkgdir}/usr/lib/sysusers.d/dhcpcd.conf"
install -Dm644 "${srcdir}/dhcpcd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/dhcpcd.conf"
# strip files that somehow won't get stripped automatically
strip "$pkgdir/usr/bin/$pkgname"
strip "$pkgdir/usr/lib/$pkgname/dev/udev.so"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(BSD-2-Clause)
validpgpkeys=('A785ED2755955D9E93EA59F6597F97EA9AD45549') # Roy Marples (NetBSD) <roy@NetBSD.org>
#https://github.com/NetworkConfiguration/dhcpcd/releases
sha256sums=(d8dddf9f971a8d9ff828f33d8fa9f6d9a892a4a1429d230e9efb2be97dd0e313 # dhcpcd-10.0.8.tar.xz
9ba6d423f6c24717a85680efd6b9b72b7fdcd9310c845e767bc31bf2fcd3b233 # dhcpcd-10.0.8.tar.xz.asc
d40d51367fcf7e9596e42cd2bab59404633bedbab4d0a3183e7246b4677937b7 # dhcpcd.install
06788ad9f5f7ccb5d2a2da6f0322ff5771f8de82cfbe8b9ad954f2c38265e21b # dhcpcd.sysusers
55d57b958f6b7e4d4a538ee88b0fcc1a522050c2d38efb5d680139f618234b35) # dhcpcd.tmpfiles
## c776969fb8e2c0f01c1ff2063f6b82f5cf528257104a2f9d519ad0c234eb9474 dhcpcd-10.0.8-01-x86_64.pkg.tar.lz