2018-01-24 13:41:45 +01:00
|
|
|
DEPENDS="rootfs linux-rpi3 boot-rpi3"
|
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-01-17 00:56:06 +01:00
|
|
|
# copy output of immediate dependencies
|
2018-02-16 23:22:04 +01:00
|
|
|
mkdir -p "$PKGBUILDDIR/boot"
|
2018-01-16 23:07:29 +01:00
|
|
|
|
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/boot"
|
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 files from this package
|
2018-02-16 23:22:04 +01:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/cmdline.txt" "$PKGBUILDDIR/boot"
|
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/install.sh" "$PKGBUILDDIR"
|
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/genimage.sh" "$PKGBUILDDIR"
|
2018-01-17 00:56:06 +01:00
|
|
|
|
|
|
|
# substitute file names in scripts
|
2018-02-16 23:22:04 +01:00
|
|
|
mkdir -p "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
|
|
mv "$PKGBUILDDIR/boot/rootfs.img" "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
|
|
mv "$PKGBUILDDIR/boot/vmlinuz" "$PKGBUILDDIR/boot/$OS_RELEASE"
|
2018-01-17 00:56:06 +01:00
|
|
|
|
2018-02-14 19:15:20 +01:00
|
|
|
local rootfs_image="$OS_RELEASE/rootfs.img"
|
|
|
|
local kernel_image="$OS_RELEASE/vmlinuz"
|
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$PKGBUILDDIR/boot/cmdline.txt"
|
|
|
|
sed -i 's#KERNELFILE#'$kernel_image'#g' "$PKGBUILDDIR/boot/config.txt"
|
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
|
|
|
|
}
|