PKGBUILD 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Maintainer (Arch): Ronald van Haren <ronald.archlinux.org>
  2. # Contributor (Arch): Tom Killian <tom.archlinux.org>
  3. # Contributor (Arch): Judd Vinet <jvinet.zeroflux.org>
  4. # Contributor (Artix): artoo <artoo@cromnix.org>
  5. # Maintainer: André Silva <emulatorman@hyperbola.info>
  6. # Contributor: Márcio Silva <coadde@hyperbola.info>
  7. # Contributor: Tobias Dausend <throgh@hyperbola.info>
  8. pkgname=dhcpcd
  9. pkgver=7.1.0
  10. _debver=$pkgver
  11. _debrel=2
  12. pkgrel=3
  13. pkgdesc="RFC2131 compliant DHCP client daemon"
  14. url='https://roy.marples.name/projects/dhcpcd'
  15. arch=('i686' 'x86_64')
  16. license=('Simplified-BSD')
  17. groups=('base')
  18. depends=('sh' 'eudev')
  19. makedepends=('quilt')
  20. optdepends=('openresolv: resolvconf support'
  21. 'logger: message logging support')
  22. provides=('dhcp-client')
  23. backup=('etc/dhcpcd.conf'
  24. 'etc/sv/dhcpcd/conf')
  25. options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory
  26. install=dhcpcd.install
  27. source=("${pkgname}-${pkgver}.tar.xz::https://github.com/NetworkConfiguration/dhcpcd/archive/refs/tags/v${pkgver}.tar.gz"
  28. "https://deb.debian.org/debian/pool/main/d/dhcpcd5/dhcpcd5_${_debver}-${_debrel}.debian.tar.xz"
  29. "dhcpcd.initd"
  30. "dhcpcd.conf"
  31. "dhcpcd.run")
  32. sha512sums=('167c1a461fa05d79e4f56fc401041d57d2086294e678b7b53099790d61bbf4bb6d4ce5e36330dce643194910302d9cea8161dddca0cad38146aff34e9d213a02'
  33. 'c8e3bdfa9d1aa8d899c3c0b5ce19dd13bbf05850639540dd68b08a04e5224c262130119569c1ce5e5248e0e1cb43a0ae7e1d4a789f31e7e323747f9b2b639d3f'
  34. '6d3220155f2d9ed3e3a00afd378eeb70d435e19804201f8bb35498f1f7f3dfdaeaa2f4a01a18f5e96b457d9c173bc6a206b3e67ebf6d95da7e7b350dcd153fde'
  35. '00b4f6774fd6f864344bc087ff0fafdd485293527db2a4bef0ca2ba37639383f56977c794687c345b705462c2ad442062205938ec9e5e79647aeba2f9f530537'
  36. 'fb7686be787e13ae4dfbad280102e57a8d9b32531bc7ba655959865d50b9afef13c44006f25f79e8780f7ed1c92f5a2479a3aa4aa9ca392bff9c7eb2ece91540')
  37. prepare() {
  38. cd "${srcdir}/${pkgname}-${pkgver}"
  39. if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
  40. # Debian patches
  41. export QUILT_PATCHES=debian/patches
  42. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  43. export QUILT_DIFF_ARGS='--no-timestamps'
  44. mv "$srcdir"/debian .
  45. quilt push -av
  46. fi
  47. }
  48. build() {
  49. cd "${srcdir}/${pkgname}-${pkgver}"
  50. # configure variables
  51. ./configure \
  52. --prefix=/usr \
  53. --sysconfdir=/etc \
  54. --sbindir=/sbin \
  55. --libdir=/lib \
  56. --libexecdir=/usr/libexec/dhcpcd \
  57. --dbdir=/var/lib/dhcpcd \
  58. --with-hook=ntp.conf \
  59. --with-hook=wpa_supplicant \
  60. --rundir=/run
  61. # Build
  62. make
  63. }
  64. check() {
  65. cd "${srcdir}/${pkgname}-${pkgver}"
  66. make test
  67. }
  68. package() {
  69. cd "${srcdir}/${pkgname}-${pkgver}"
  70. make DESTDIR="${pkgdir}" install
  71. # Install License
  72. install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/$pkgname"
  73. # Set Options in /etc/dhcpcd.conf
  74. echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
  75. # Set network group permissions in /etc/dhcpcd.conf for dhcpcd-ui
  76. chgrp network "${pkgdir}/etc/dhcpcd.conf"
  77. chmod g+w "${pkgdir}/etc/dhcpcd.conf"
  78. # Install OpenRC init file
  79. install -Dm755 "${srcdir}/dhcpcd.initd" "${pkgdir}/etc/init.d/dhcpcd"
  80. # Install runit files
  81. install -Dm644 "${srcdir}/dhcpcd.conf" "${pkgdir}/etc/sv/dhcpcd/conf"
  82. install -Dm755 "${srcdir}/dhcpcd.run" "${pkgdir}/etc/sv/dhcpcd/run"
  83. }