diff options
author | tcely <tcely@users.noreply.github.com> | 2018-03-02 09:08:37 -0500 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-07 09:57:46 +0000 |
commit | 79de4cf4c882bdc8a1e47373a5ad7d2053101358 (patch) | |
tree | 56d56d940ab804e3cb1fa3b55af4caf657130d1c /main/dhcp/APKBUILD | |
parent | 415dbf6ada1ef72565bb89bd27ec10ce99441ea3 (diff) | |
download | aports-79de4cf4c882bdc8a1e47373a5ad7d2053101358.tar.bz2 aports-79de4cf4c882bdc8a1e47373a5ad7d2053101358.tar.xz |
main/dhcp: Upgrade to 4.4.1
- use pkgname more places
- remove obsolete dhclient-script patch
- add check function
- fix bare ip in dhclient-script
- move bash dependency to dhclient package
- symlink example location of dhclient-script
Diffstat (limited to 'main/dhcp/APKBUILD')
-rw-r--r-- | main/dhcp/APKBUILD | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD index 4797ea5d24..d1a03bed46 100644 --- a/main/dhcp/APKBUILD +++ b/main/dhcp/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=dhcp -pkgver=4.3.5 +pkgver=4.4.1 _realver=${pkgver/_p/-P} pkgrel=0 pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)" @@ -11,28 +11,20 @@ depends= pkgusers="dhcp" pkggroups="dhcp" makedepends="perl linux-headers file" -install="dhcp.pre-install dhcp.pre-upgrade dhcp.post-upgrade" +install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade" subpackages="$pkgname-doc $pkgname-dev $pkgname-dbg dhclient dhcrelay" -source="http://ftp.isc.org/isc/dhcp/${_realver}/$pkgname-$_realver.tar.gz +source="http://ftp.isc.org/isc/$pkgname/${_realver}/$pkgname-$_realver.tar.gz + dhclient-script-fix-bare-ip.patch dhcp-3.0-fix-perms.patch - dhclient-script.patch dhcrelay.initd dhcrelay.confd dhcpd.confd dhcpd.initd" -_builddir="$srcdir"/$pkgname-$_realver -prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir/$pkgname-$_realver" build() { - cd "$_builddir" + cd "$builddir" # fix ipv6 export CFLAGS="$CFLAGS -D_GNU_SOURCE \ -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" @@ -49,24 +41,30 @@ build() { --enable-dhcpv6 \ --enable-paranoia \ --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - || return 1 - make -j1 -C bind && make || return 1 + --infodir=/usr/share/info + + make -j1 -C bind && make +} + +check() { + cd "$builddir" + make check } package() { - cd "$_builddir" + cd "$builddir" make DESTDIR="$pkgdir" install install -m755 -D "$srcdir"/dhcpd.initd "$pkgdir"/etc/init.d/dhcpd install -m644 -D "$srcdir"/dhcpd.confd "$pkgdir"/etc/conf.d/dhcpd - install -m751 -D "$_builddir"/client/scripts/linux "$pkgdir"/sbin/dhclient-script + install -m751 -D "$builddir"/client/scripts/linux "$pkgdir"/sbin/dhclient-script install -d "$pkgdir"/var/lib/dhcp install -d "$pkgdir"/var/run/dhcp } dhclient() { pkgdesc="ISC dhcp client" + depends="bash" install -d -o dhcp -g dhcp "$subpkgdir"/var/lib/dhcp install -d -o dhcp -g dhcp "$subpkgdir"/var/run/dhcp install -d "$subpkgdir"/usr/sbin @@ -74,6 +72,7 @@ dhclient() { install -d "$subpkgdir"/etc/dhcp mv "$pkgdir"/usr/sbin/dhclient "$subpkgdir"/usr/sbin/ mv "$pkgdir"/sbin/dhclient-script "$subpkgdir"/sbin/ + ln -s ../sbin/dhclient-script "$subpkgdir"/etc/dhclient-script mv "$pkgdir"/etc/dhcp/dhclient.conf* "$subpkgdir"/etc/dhcp/ } @@ -81,7 +80,7 @@ dhcrelay() { pkgdesc="ISC dhcp relay server" replaces="dhcp" install -d "$subpkgdir"/var/run/dhcp \ - "$subpkgdir"/usr/sbin || return 1 + "$subpkgdir"/usr/sbin mv "$pkgdir"/usr/sbin/dhcrelay "$subpkgdir"/usr/sbin/ install -m755 -D "$srcdir"/dhcrelay.initd \ "$subpkgdir"/etc/init.d/dhcrelay @@ -89,9 +88,9 @@ dhcrelay() { "$subpkgdir"/etc/conf.d/dhcrelay } -sha512sums="aba0e1d361eb9e7ed33fc48c0b0b9288057af9ec51775e40e27feb9ababc182506706fcf39079236ce36b0f7ded391e107474dc29de2e60ed45d37753505e1f0 dhcp-4.3.5.tar.gz +sha512sums="684ae349f224918c9f8cec7bd6c55cd0b83ad2b5827375b2876ca088eb05b7ff1364e50f6dc24f2485c610d9be94d4ba3020f60a0fa0ef63962349d191b887e7 dhcp-4.4.1.tar.gz +940ba576f9bfb395712e92e59c338428fe30f61da0ea0394f8f677c568322106556281fbb4528a33db7a039963ff892b4d6239aff9377d64927acc26f446c1a6 dhclient-script-fix-bare-ip.patch d5697a56fbbff25199962608986e7ffb533ed4afd3e344e3c79d2010dda73cc0b088f06c454e9f0c69eb054e09a374455fa71d3f73306e0c98fa76df4dd321b7 dhcp-3.0-fix-perms.patch -a86fdbc73d3342be97261ac4ee13d4fc8cda812378cb370a856ad98a973adc7f4afad070cb3bde466881d8feade11a0c72389bf3338dc400e30bfa30f24cb073 dhclient-script.patch 0c3eee11ee9771a3bd7f8076827e57296136a36e6c00c3149e7274fb7a479feae4dc7d744f3c66ac78ffc96f036e14a7a5a0806095495441f98d76737a34faa6 dhcrelay.initd fd15dbaa4c61c3c26f407bf13dde859470a1adba134da064b653ccc152ce42635ee8de2fe113ae21ba8470e97e3caad8c1a47b69eb25e5e92b40e26790b96f6d dhcrelay.confd 7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d dhcpd.confd |