diff options
author | tcely <tcely@users.noreply.github.com> | 2019-02-09 07:47:30 -0500 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-05-03 19:05:59 +0200 |
commit | 5a7034c8e234c705dd7e0f8d191e632ad68a920b (patch) | |
tree | 3a3d8dc02a0b5d3ec300db9bc6944d7a19134735 | |
parent | 9bab9a346bb17cd49c6b1e3c62b4bfbb86d31042 (diff) | |
download | aports-5a7034c8e234c705dd7e0f8d191e632ad68a920b.tar.bz2 aports-5a7034c8e234c705dd7e0f8d191e632ad68a920b.tar.xz |
main/dhcp: add -openrc subpackages
-rw-r--r-- | main/dhcp/APKBUILD | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD index 537401c2bb..e4ed58678b 100644 --- a/main/dhcp/APKBUILD +++ b/main/dhcp/APKBUILD @@ -15,7 +15,7 @@ pkgusers="dhcp" pkggroups="dhcp" makedepends="perl linux-headers $depends_dhclient $depends_dhclient_optional" install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade" -subpackages="$pkgname-doc $pkgname-dev $pkgname-dbg dhclient dhcrelay" +subpackages="$pkgname-doc $pkgname-dev $pkgname-dbg $pkgname-openrc dhclient dhcrelay dhcrelay-openrc" source="http://ftp.isc.org/isc/$pkgname/${_realver}/$pkgname-$_realver.tar.gz 01-dhclient-script-fix-bare-ip.patch 02-dhclient-script-remove-bashisms.patch @@ -63,16 +63,35 @@ check() { package() { 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 + mv "$pkgdir"/etc "$pkgdir/etc.$pkgname" + install -m755 -D "$srcdir"/dhcrelay.initd "$pkgdir"/etc/init.d/dhcrelay + install -m644 -D "$srcdir"/dhcrelay.confd "$pkgdir"/etc/conf.d/dhcrelay + mv "$pkgdir"/etc "$pkgdir"/etc.dhcrelay + + make DESTDIR="$pkgdir" install + #install -m751 -D "$builddir"/client/scripts/linux "$pkgdir"/sbin/dhclient-script install -m751 -D "$srcdir"/dhclient-script-alpine "$pkgdir"/sbin/dhclient-script install -d "$pkgdir"/var/lib/dhcp install -d "$pkgdir"/var/run/dhcp } +openrc() { + local dir _etcdir="$pkgdir/etc.${subpkgname%-openrc}" + for dir in conf.d init.d; do + if [ -d "$_etcdir/$dir" ]; then + mkdir -p "$pkgdir"/etc + mv "$_etcdir/$dir" "$pkgdir"/etc/ + fi + done + rmdir "$_etcdir" || : + + default_openrc +} + dhclient() { pkgdesc="ISC dhcp client" depends="$depends_dhclient" @@ -93,10 +112,6 @@ dhcrelay() { install -d "$subpkgdir"/var/run/dhcp \ "$subpkgdir"/usr/sbin mv "$pkgdir"/usr/sbin/dhcrelay "$subpkgdir"/usr/sbin/ - install -m755 -D "$srcdir"/dhcrelay.initd \ - "$subpkgdir"/etc/init.d/dhcrelay - install -m644 -D "$srcdir"/dhcrelay.confd \ - "$subpkgdir"/etc/conf.d/dhcrelay } sha512sums="684ae349f224918c9f8cec7bd6c55cd0b83ad2b5827375b2876ca088eb05b7ff1364e50f6dc24f2485c610d9be94d4ba3020f60a0fa0ef63962349d191b887e7 dhcp-4.4.1.tar.gz |