2023-06-09 17:03:33 +02:00

49 lines
1.1 KiB
Plaintext

# Maintainer: psykose <alice@ayaya.dev>
pkgname=linuxptp
pkgver=4.0
pkgrel=0
pkgdesc="User space PTP stack for Linux"
url="https://linuxptp.nwtime.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
bsd-compat-headers
linux-headers
"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/richardcochran/linuxptp/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # no tests
_bins="hwstamp_ctl nsm phc2sys phc_ctl pmc ptp4l timemaster ts2phc tz2alt"
for _bin in $_bins; do
depends="$depends $pkgname-$_bin=$pkgver-r$pkgrel"
subpackages="$subpackages $pkgname-$_bin:split"
done
build() {
make \
CC="${CC:-cc}" \
version="$pkgver" \
EXTRA_CFLAGS="$CFLAGS -flto=auto"
}
package() {
make \
prefix=/usr \
mandir=/usr/share/man \
DESTDIR="$pkgdir" \
install
}
split() {
local name="${subpkgname#"$pkgname"-}"
pkgdesc="$pkgdesc ($name utility)"
depends=""
amove usr/sbin/$name
}
sha512sums="
763de5654f0426f2f489223e02fb3dd39a3a830751b366406657efe33bb923b5b38edada7b62de3efed6d257d5d386ece0d42a5eb92da5e5d443eac9b32e105d linuxptp-4.0.tar.gz
"