Commit f43e0dcb authored by Natanael Copa's avatar Natanael Copa
Browse files

main/ppp: fix backwards compat for upgraders

we let ppp be an empty meta package that pulls in all subpackages
except -dev and -doc.

This makes the ppp package compatible with previous releases and
prevents breakage for upgraders.

ref #3622
parent 48be440a
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ppp pkgname=ppp
pkgver=2.4.7 pkgver=2.4.7
pkgrel=0 pkgrel=1
pkgdesc="A daemon which implements the PPP protocol for dial-up networking" pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
url="http://www.samba.org/ppp/" url="http://www.samba.org/ppp/"
arch="all" arch="all"
license="custom:GPL/BSD" license="BSD and LGPLv2+ and GPLv2+ and Public Domain"
depends=
makedepends= makedepends=
subpackages="$pkgname-doc $pkgname-dev $pkgname-chat $pkgname-radius subpackages="$pkgname-doc $pkgname-dev $pkgname-chat $pkgname-radius
$pkgname-atm $pkgname-pppoe $pkgname-l2tp $pkgname-winbind $pkgname-atm $pkgname-pppoe $pkgname-l2tp $pkgname-winbind
$pkgname-passprompt $pkgname-passwordfd $pkgname-minconn $pkgname-passprompt $pkgname-passwordfd $pkgname-minconn
$pkgname-daemon
" "
# for compatibility reasons the 'ppp' package is an empty meta package
# that pulls in all except -dev and -doc subpackages
depends="$pkgname-chat $pkgname-radius
$pkgname-atm $pkgname-pppoe $pkgname-l2tp $pkgname-winbind
$pkgname-passprompt $pkgname-passwordfd $pkgname-minconn
$pkgname-daemon
"
source="ftp://ftp.samba.org/pub/$pkgname/$pkgname-$pkgver.tar.gz source="ftp://ftp.samba.org/pub/$pkgname/$pkgname-$pkgver.tar.gz
defaultroute-metric.3.patch defaultroute-metric.3.patch
musl-fix-headers.patch musl-fix-headers.patch
...@@ -67,41 +76,52 @@ package() { ...@@ -67,41 +76,52 @@ package() {
install -D -m644 etc.ppp/options "$pkgdir"/etc/ppp/options install -D -m644 etc.ppp/options "$pkgdir"/etc/ppp/options
install -D -m600 etc.ppp/pap-secrets "$pkgdir"/etc/ppp/pap-secrets install -D -m600 etc.ppp/pap-secrets "$pkgdir"/etc/ppp/pap-secrets
install -D -m600 etc.ppp/chap-secrets "$pkgdir"/etc/ppp/chap-secrets install -D -m600 etc.ppp/chap-secrets "$pkgdir"/etc/ppp/chap-secrets
# busybox ifup/ifdown needs pon/poff
install -D -m644 scripts/pon.1 "$pkgdir"/usr/share/man/man1/pon.1 install -D -m644 scripts/pon.1 "$pkgdir"/usr/share/man/man1/pon.1
install -D -m755 scripts/pon "$pkgdir"/usr/bin/pon || return 1
install -D -m755 scripts/poff "$pkgdir"/usr/bin/poff || return 1
install -d "$pkgdir"/usr/share/doc/ppp install -d "$pkgdir"/usr/share/doc/ppp
cp scripts/* "$pkgdir"/usr/share/doc/ppp/ for i in scripts/*; do
rm "$pkgdir"/usr/share/doc/ppp/pon.1 case $i in
pon|poff|*.1) continue;
esac
if [ -f "$i" ]; then
cp $i "$pkgdir"/usr/share/doc/ppp/ || return 1
fi
done
install -d "$pkgdir"/etc/ppp/peers install -d "$pkgdir"/etc/ppp/peers
} }
atm() { atm() {
pkgdesc="pppd plugin to implement PPPoATM protocol" pkgdesc="pppd plugin to implement PPPoATM protocol"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/pppoatm.so 755 _mv usr/lib/pppd/$pkgver/pppoatm.so 755
} }
minconn() { minconn() {
pkgdesc="pppd plugin to implement a 'minconnect' option" pkgdesc="pppd plugin to implement a 'minconnect' option"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/minconn.so 755 _mv usr/lib/pppd/$pkgver/minconn.so 755
} }
winbind() { winbind() {
pkgdesc="WINBIND plugin for pppd" pkgdesc="WINBIND plugin for pppd"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/winbind.so 755 _mv usr/lib/pppd/$pkgver/winbind.so 755
} }
passprompt() { passprompt() {
pkgdesc="pppd plugin to invoke an external PAP password prompter" pkgdesc="pppd plugin to invoke an external PAP password prompter"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/passprompt.so 755 _mv usr/lib/pppd/$pkgver/passprompt.so 755
} }
passwordfd() { passwordfd() {
pkgdesc="pppd plugin let's you pass the password via a file descriptor" pkgdesc="pppd plugin let's you pass the password via a file descriptor"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/passwordfd.so 755 _mv usr/lib/pppd/$pkgver/passwordfd.so 755
} }
...@@ -112,21 +132,21 @@ chat() { ...@@ -112,21 +132,21 @@ chat() {
l2tp() { l2tp() {
pkgdesc="pppd plugin to implement PPPoL2TP protocol" pkgdesc="pppd plugin to implement PPPoL2TP protocol"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/openl2tp.so 755 _mv usr/lib/pppd/$pkgver/openl2tp.so 755
_mv usr/lib/pppd/$pkgver/pppol2tp.so 755 _mv usr/lib/pppd/$pkgver/pppol2tp.so 755
} }
pppoe() { pppoe() {
pkgdesc="pppd plugin for kernel-mode PPPoE on Linux" pkgdesc="pppd plugin for kernel-mode PPPoE on Linux"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/rp-pppoe.so 755 _mv usr/lib/pppd/$pkgver/rp-pppoe.so 755
_mv usr/sbin/pppoe-discovery 755 _mv usr/sbin/pppoe-discovery 755
} }
radius() { radius() {
pkgdesc="RADIUS plugin for pppd" pkgdesc="RADIUS plugin for pppd"
depends="ppp" depends="pppd"
_mv usr/lib/pppd/$pkgver/radius.so 755 _mv usr/lib/pppd/$pkgver/radius.so 755
_mv usr/lib/pppd/$pkgver/radattr.so 755 _mv usr/lib/pppd/$pkgver/radattr.so 755
_mv usr/lib/pppd/$pkgver/radrealms.so 755 _mv usr/lib/pppd/$pkgver/radrealms.so 755
...@@ -141,6 +161,13 @@ _mv() { ...@@ -141,6 +161,13 @@ _mv() {
install -m $2 -D "$pkgdir"/$1 "$subpkgdir"/$1 install -m $2 -D "$pkgdir"/$1 "$subpkgdir"/$1
rm "$pkgdir"/$1 rm "$pkgdir"/$1
} }
daemon() {
pkgdesc="A daemon which implements the PPP protocol"
mkdir -p "$subpkgdir"
mv "$pkgdir"/* "$subpkgdir"/ || return 1
}
md5sums="78818f40e6d33a1d1de68a1551f6595a ppp-2.4.7.tar.gz md5sums="78818f40e6d33a1d1de68a1551f6595a ppp-2.4.7.tar.gz
5a5c2d1bdca62979d9ed7a5a648e86d1 defaultroute-metric.3.patch 5a5c2d1bdca62979d9ed7a5a648e86d1 defaultroute-metric.3.patch
8d2128c74d62a2844491a24794b05a3e musl-fix-headers.patch 8d2128c74d62a2844491a24794b05a3e musl-fix-headers.patch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment