2018-07-15 16:19:44 +02:00
|
|
|
DEPENDS="rootfs"
|
2018-01-24 12:52:41 +01:00
|
|
|
|
2018-01-16 23:07:29 +01:00
|
|
|
build() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-01-16 23:07:29 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
mkdir -p "$PKGBUILDDIR/$OS_RELEASE"
|
2018-02-14 13:07:23 +01:00
|
|
|
|
2018-01-17 00:56:06 +01:00
|
|
|
# copy output of immediate dependencies
|
2018-01-24 12:52:41 +01:00
|
|
|
for pkgname in $DEPENDS; do
|
2018-01-17 00:56:06 +01:00
|
|
|
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
|
2018-02-16 23:22:04 +01:00
|
|
|
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* \
|
|
|
|
"$PKGBUILDDIR/$OS_RELEASE"
|
2018-01-17 00:56:06 +01:00
|
|
|
fi
|
2018-01-24 12:52:41 +01:00
|
|
|
done
|
2018-01-16 23:07:29 +01:00
|
|
|
|
2018-01-17 00:56:06 +01:00
|
|
|
# copy additional files from this package, subsitute filenames
|
2018-02-14 13:07:23 +01:00
|
|
|
local linux_image="$OS_RELEASE/vmlinuz"
|
|
|
|
local rootfs_image="$OS_RELEASE/rootfs.img"
|
2018-01-16 23:07:29 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
cp "/usr/share/syslinux/mbr.bin" "$PKGBUILDDIR"
|
2018-01-16 23:07:29 +01:00
|
|
|
|
2018-01-17 00:56:06 +01:00
|
|
|
for script in install.sh genimage.sh syslinux.cfg; do
|
2018-02-16 23:22:04 +01:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/$script" "$PKGBUILDDIR"
|
2018-01-16 23:07:29 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$PKGBUILDDIR/$script"
|
|
|
|
sed -i 's#KERNELFILE#'$linux_image'#g' "$PKGBUILDDIR/$script"
|
|
|
|
sed -i 's#VERSIONDIR#'$OS_RELEASE'#g' "$PKGBUILDDIR/$script"
|
2018-01-17 00:56:06 +01:00
|
|
|
done
|
2018-01-16 23:07:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-01-16 23:07:29 +01:00
|
|
|
|
2018-02-16 18:45:25 +01:00
|
|
|
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
2018-01-16 23:07:29 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
return
|
|
|
|
}
|