Merge pull request #826 from voidlinux/busybox-ntpd

Busybox ntpd
This commit is contained in:
Eivind Uggedal 2015-01-07 10:16:42 +01:00
commit 8ec0e6b483
10 changed files with 1056 additions and 23 deletions

1
srcpkgs/busybox-ntpd Symbolic link
View File

@ -0,0 +1 @@
busybox

1
srcpkgs/busybox-static Symbolic link
View File

@ -0,0 +1 @@
busybox

View File

@ -1 +0,0 @@
../busybox/files

View File

@ -1,14 +0,0 @@
. ${XBPS_SRCPKGDIR}/busybox/template
pkgname="busybox-static"
version=1.22.1
revision=1
wrksrc="busybox-${version}"
short_desc+=" (statically linked)"
update_pkgname=busybox
CFLAGS+=" -static"
do_install() {
vbin busybox busybox.static
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec logger -t busybox-ntpd

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec chpst -b ntpd busybox-ntpd -nN -p pool.ntp.org

View File

@ -0,0 +1 @@
busybox.dotconfig

View File

@ -1,7 +1,7 @@
# Build template for 'busybox'.
pkgname=busybox
version=1.22.1
revision=2
revision=4
hostmakedepends="perl"
short_desc="The Swiss Army Knife of Embedded Linux"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -10,16 +10,55 @@ homepage="http://www.busybox.net"
distfiles="${homepage}/downloads/busybox-$version.tar.bz2"
checksum=ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b
_cflags() {
local t=$1
local c="$CFLAGS"
case $t in
busybox-static) c="$c -static";;
esac
echo "$c"
}
pre_build() {
cp -f ${FILESDIR}/dotconfig .config
if [ "$CROSS_BUILD" ]; then
sed -e "s,\(CONFIG_CROSS_COMPILER_PREFIX\).*,\1=\"${XBPS_CROSS_TRIPLET}-\",g" -i .config
fi
mkdir -p src
mv * src || true
local t
for t in busybox busybox-static busybox-ntpd; do
mkdir -p $t
make -C $t CFLAGS="$(_cflags $t)" KBUILD_SRC=${wrksrc}/src \
-f ${wrksrc}/src/Makefile defconfig
cp -f ${FILESDIR}/${t}.dotconfig ${t}/.config
if [ "$CROSS_BUILD" ]; then
sed -e \
"s,\(CONFIG_CROSS_COMPILER_PREFIX\).*,\1=\"${XBPS_CROSS_TRIPLET}-\",g" \
-i ${t}/.config
fi
done
}
do_build() {
make ${makejobs}
local t
for t in busybox busybox-static busybox-ntpd; do
make -C $t CFLAGS="$(_cflags $t)" ${makejobs}
done
}
do_install() {
vbin busybox
vman docs/busybox.1
vbin busybox/busybox
vman busybox/docs/busybox.1
}
busybox-static_package() {
short_desc+=" (statically linked)"
pkg_install() {
vbin busybox-static/busybox busybox.static
}
}
busybox-ntpd_package() {
short_desc+=" (ntpd)"
pkg_install() {
vbin busybox-ntpd/busybox busybox-ntpd
vsv busybox-ntpd
}
}