2018-06-02 16:52:53 +02:00
|
|
|
VERSION="0.4"
|
2018-03-04 16:35:28 +01:00
|
|
|
SRCDIR="init-${VERSION}"
|
2018-04-05 00:16:32 +02:00
|
|
|
TARBALL="${SRCDIR}.tar.xz"
|
2018-03-04 16:35:28 +01:00
|
|
|
URL="http://infraroot.at/pygos"
|
2018-06-02 16:52:53 +02:00
|
|
|
SHA256SUM="a128be18bbabca600e0553ec539e953eda0a467a337826d520c5fe3ef893ab03"
|
2018-03-04 16:35:28 +01:00
|
|
|
DEPENDS="toolchain"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local SOURCE="$1"
|
|
|
|
local DEPLOY="$2"
|
|
|
|
|
2018-04-06 01:03:29 +02:00
|
|
|
$SOURCE/configure --prefix="" --host="$TARGET" --sbindir=/bin \
|
|
|
|
--libexecdir=/lib/libexec
|
2018-03-04 16:35:28 +01:00
|
|
|
|
|
|
|
make -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
|
|
|
local DEPLOY="$2"
|
|
|
|
local svc
|
|
|
|
|
|
|
|
make DESTDIR="$DEPLOY" install-strip
|
|
|
|
|
2018-04-21 19:39:48 +02:00
|
|
|
cp -r ${SCRIPTDIR}/pkg/${PKGNAME}/{etc,lib,share} "$DEPLOY"
|
2018-03-04 16:35:28 +01:00
|
|
|
|
2018-05-10 14:41:13 +02:00
|
|
|
include_merge "INIT"
|
2018-03-04 16:35:28 +01:00
|
|
|
|
2018-04-05 00:16:32 +02:00
|
|
|
if [ "x$HWCLOCK" == "xyes" ]; then
|
|
|
|
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
|
|
|
|
fi
|
2018-03-04 16:35:28 +01:00
|
|
|
|
2018-04-27 10:53:45 +02:00
|
|
|
svc=$(file_path_override "ifrename")
|
|
|
|
if [ ! -z "$svc" ]; then
|
|
|
|
cp "$svc" "$DEPLOY/etc/netcfg/ifrename"
|
|
|
|
ln -s "/share/init/ifrename" "$DEPLOY/etc/init.d/ifrename"
|
|
|
|
fi
|
|
|
|
|
2018-04-27 22:54:28 +02:00
|
|
|
svc=$(file_path_override "interfaces")
|
|
|
|
if [ ! -z "$svc" ]; then
|
|
|
|
for svc in $svc/*; do
|
|
|
|
[ -f "$svc" ] || continue
|
|
|
|
cp "$svc" "$DEPLOY/etc/netcfg/"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2018-03-04 16:35:28 +01:00
|
|
|
for svc in $GETTY_TTY; do
|
|
|
|
ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc"
|
|
|
|
done
|
|
|
|
|
2018-05-05 21:53:34 +02:00
|
|
|
if [ ! -z "$DHCP_PORTS" ]; then
|
|
|
|
ln -s "/share/init/dhcpcdmaster" \
|
|
|
|
"$DEPLOY/etc/init.d/dhcpcdmaster"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for svc in $DHCP_PORTS; do
|
|
|
|
ln -s "/share/init/dhcpcd" "$DEPLOY/etc/init.d/dhcpcd@$svc"
|
|
|
|
done
|
|
|
|
|
2018-06-05 00:25:39 +02:00
|
|
|
for svc in $SERVICES; do
|
|
|
|
ln -s "/share/init/$svc" "$DEPLOY/etc/init.d/$svc"
|
|
|
|
done
|
|
|
|
|
|
|
|
unset -v i GETTY_TTY HWCLOCK DHCP_PORTS SERVICES
|
2018-03-04 16:35:28 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
return
|
2018-05-10 14:41:13 +02:00
|
|
|
}
|