2018-09-28 00:39:22 +02:00
|
|
|
DEPENDS="rootfs"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local SOURCE="$1"
|
|
|
|
local DEPLOY="$2"
|
|
|
|
|
2019-02-27 14:22:03 +01:00
|
|
|
pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" -R "$REPODIR" $DEPENDS
|
2018-09-28 00:39:22 +02:00
|
|
|
|
|
|
|
# copy helper scripts
|
|
|
|
local linux_image="vmlinuz"
|
|
|
|
local rootfs_image="rootfs.img"
|
|
|
|
|
|
|
|
for script in runqemu.sh cmdline.txt kernel.txt; do
|
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/$script" "$PKGBUILDDIR"
|
|
|
|
|
|
|
|
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"
|
|
|
|
done
|
|
|
|
|
|
|
|
# boot partition
|
|
|
|
mkdir "$PKGBUILDDIR/bootfs"
|
|
|
|
mv "$PKGBUILDDIR/$OS_RELEASE" "$PKGBUILDDIR/bootfs"
|
|
|
|
mv "$PKGBUILDDIR/cmdline.txt" "$PKGBUILDDIR/bootfs"
|
|
|
|
mv "$PKGBUILDDIR/kernel.txt" "$PKGBUILDDIR/bootfs"
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
|
|
|
local DEPLOY="$2"
|
|
|
|
|
|
|
|
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
2019-02-27 14:22:03 +01:00
|
|
|
|
|
|
|
touch "$2/$PKGNAME.files"
|
|
|
|
cat > "$2/$PKGNAME.desc" <<_EOF
|
|
|
|
name $PKGNAME
|
|
|
|
_EOF
|
2018-09-28 00:39:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
check_update() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|