mirror of
https://github.com/pygos/build.git
synced 2024-05-08 14:56:13 +02:00
David Oberhollenzer
268c0a605b
This commit renames the release packages so they all produce a single package named "release", creates a preference listing from the PREFERED_PROVIDER array and lets `pkg buildstrategy` decide what package to build. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
32 lines
919 B
Plaintext
Executable file
32 lines
919 B
Plaintext
Executable file
DEPENDS="rootfs boot-rpi3"
|
|
SUBPKG="release"
|
|
|
|
build() {
|
|
pkg install -om -r "$PKGBUILDDIR/boot" -R "$REPODIR" $DEPENDS
|
|
|
|
# copy files from this package
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/cmdline.txt" "$PKGBUILDDIR/boot"
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/install.sh" "$PKGBUILDDIR"
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/genimage.sh" "$PKGBUILDDIR"
|
|
|
|
# substitute file names in scripts
|
|
mkdir -p "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
mv "$PKGBUILDDIR/boot/rootfs.img" "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
mv "$PKGBUILDDIR/boot/vmlinuz" "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
|
|
local rootfs_image="$OS_RELEASE/rootfs.img"
|
|
local kernel_image="$OS_RELEASE/vmlinuz"
|
|
|
|
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$PKGBUILDDIR/boot/cmdline.txt"
|
|
sed -i 's#KERNELFILE#'$kernel_image'#g' "$PKGBUILDDIR/boot/config.txt"
|
|
}
|
|
|
|
deploy() {
|
|
tar czf "$BUILDROOT/release.tar.gz" *
|
|
touch "$PKGDEPLOYDIR/release.files" "$PKGDEPLOYDIR/release.desc"
|
|
}
|
|
|
|
check_update() {
|
|
return
|
|
}
|