mirror of
https://github.com/pygos/build.git
synced 2024-11-23 03:29:46 +01:00
39c0c2c98d
Just install the kernel package to the rootfs /boot directory and add a step to the rootfs package to move /boot data out of the squasfs image. Add linux package as regular dependency to the rootfs. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
41 lines
No EOL
930 B
Text
Executable file
41 lines
No EOL
930 B
Text
Executable file
DEPENDS="rootfs"
|
|
|
|
build() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
mkdir -p "$PKGBUILDDIR/$OS_RELEASE"
|
|
|
|
# copy output of immediate dependencies
|
|
for pkgname in $DEPENDS; do
|
|
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
|
|
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* \
|
|
"$PKGBUILDDIR/$OS_RELEASE"
|
|
fi
|
|
done
|
|
|
|
# copy additional files from this package, subsitute filenames
|
|
local linux_image="$OS_RELEASE/vmlinuz"
|
|
local rootfs_image="$OS_RELEASE/rootfs.img"
|
|
|
|
cp "/usr/share/syslinux/mbr.bin" "$PKGBUILDDIR"
|
|
|
|
for script in install.sh genimage.sh syslinux.cfg; 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
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
|
}
|
|
|
|
check_update() {
|
|
return
|
|
} |