mirror of
https://github.com/pygos/build.git
synced 2024-05-17 03:06:12 +02:00
David Oberhollenzer
fa4eff263b
This commit adds an "emptypackage" template that implements defaults for all package functions and is included before every package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
37 lines
1.2 KiB
Plaintext
Executable file
37 lines
1.2 KiB
Plaintext
Executable file
DEPENDS="rootfs boot-rpi boot-rpi-dtbo boot-rpi-dtb linux"
|
|
SUBPKG="release"
|
|
|
|
build() {
|
|
pkg install -om -r "$PKGBUILDDIR/boot" \
|
|
boot-rpi boot-rpi-dtbo boot-rpi-dtb linux
|
|
|
|
pkg dump -l pkg -r "$SYSROOT" "$REPODIR/rootfs.pkg" \
|
|
> "$PKGBUILDDIR/files.txt"
|
|
|
|
gensquashfs -F "$PKGBUILDDIR/files.txt" "boot/rootfs.img"
|
|
rm "$PKGBUILDDIR/files.txt"
|
|
|
|
# copy files from this package
|
|
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"
|
|
|
|
cat_file_override "rpi_config.txt" > "$PKGBUILDDIR/boot/config.txt"
|
|
cat_file_override "rpi_cmdline.txt" > "$PKGBUILDDIR/boot/cmdline.txt"
|
|
|
|
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"
|
|
}
|