jobcore/dhclient/PKGBUILD

98 lines
3.1 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 |---------------------------------------
pkgbase=dhcp
pkgname=('dhcp' 'dhclient')
# separate patch levels with a period to maintain proper versioning.
_realver=4.4.3
pkgver=${_realver/-/.}
pkgrel=01
arch=('x86_64')
url='https://www.isc.org/dhcp/'
makedepends=('bash' 'iproute2' 'openldap')
# options=('!lto') ## remove # if you want the internationalization options to be included
source=("https://downloads.isc.org/isc/${pkgbase}/${_realver}/${pkgbase}-${_realver}.tar.gz"{,.asc}
'dhcp-sysusers.conf'
'dhcp-tmpfiles.conf')
build() {
cd "${srcdir}/${pkgbase}-${_realver}"
# SEE "note"
# --disable-dhcpv6 \
# see note on the dhcp/dhclient directory about this
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--disable-dhcpv4o6 \
--enable-binary-leases \
--enable-paranoia \
--with-ldap \
--with-ldapcrypto \
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
--with-cli-lease-file=/var/lib/dhclient/dhclient.leases
make -j1
}
package_dhcp(){
pkgdesc="A DHCP server, client, and relay agent w/o systemd & ipv6"
depends=('glibc' 'libldap')
backup=('etc/dhcpd.conf' )
# 'etc/dhcpd6.conf')
cd "${srcdir}/${pkgbase}-${_realver}"
make DESTDIR="${pkgdir}" install
install -D -m644 "${srcdir}/dhcp-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/dhcp.conf"
install -D -m644 "${srcdir}/dhcp-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/dhcp.conf"
# move and install config files in place
mv "${pkgdir}/etc/dhcpd.conf.example" "${pkgdir}/etc/dhcpd.conf"
# Remove dhclient
make -C client DESTDIR="${pkgdir}" uninstall
# install license
install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhcp/LICENSE"
}
package_dhclient(){
pkgdesc="A standalone DHCP client from the dhcp package w/o systemd & ipv6"
depends=('glibc' 'bash' 'iproute2' 'run-parts')
provides=('dhcp-client')
cd "${srcdir}/${pkgbase}-${_realver}"
make -C client DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/dhclient"
mv "${pkgdir}/etc/dhclient.conf.example" "${pkgdir}/usr/share/dhclient/"
install -d "${pkgdir}/var/lib/dhclient"
# install dhclient linux script
install -m755 client/scripts/linux "${pkgdir}/usr/bin/dhclient-script"
# install license
install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhclient/LICENSE"
}
#---- license gpg-key sha256sums ----
license=('custom:isc-dhcp')
validpgpkeys=('7E1C91AC8030A5A59D1EFAB9750F3C87723E4012') # Internet Systems Consortium, Inc. (Signing key, 2021-2022) <codesign@isc.org>
sha256sums=(0e3ec6b4c2a05ec0148874bcd999a66d05518378d77421f607fb0bc9d0135818 # dhcp-4.4.3.tar.gz
7cc76060099bf5058364b38fce502e58e221c42ade909bba266cc1a97bfc3900 # dhcp-4.4.3.tar.gz.asc
b16083e6bb572ffacaa7cd97e7fde5fcfa1b6dbeb166f162e2ec6e8ec4b928d6 # dhcp-sysusers.conf
abcd30e9e8428e34d22ab4d3074ef4bd84c2b11f5868597111b47d6f56d204da) # dhcp-tmpfiles.conf