mirror of
https://github.com/pygos/build.git
synced 2024-11-24 20:10:42 +01: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>
31 lines
878 B
Text
Executable file
31 lines
878 B
Text
Executable file
DEPENDS="rootfs linux"
|
|
SUBPKG="release"
|
|
|
|
build() {
|
|
pkg install -om -r "$PKGBUILDDIR/$OS_RELEASE" linux
|
|
|
|
pkg dump -l pkg -r "$SYSROOT" "$REPODIR/rootfs.pkg" \
|
|
> "$PKGBUILDDIR/files.txt"
|
|
|
|
gensquashfs -F "$PKGBUILDDIR/files.txt" "$OS_RELEASE/rootfs.img"
|
|
rm "$PKGBUILDDIR/files.txt"
|
|
|
|
# copy helper scripts
|
|
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() {
|
|
tar czf "$BUILDROOT/release.tar.gz" *
|
|
touch "$PKGDEPLOYDIR/release.files" "$PKGDEPLOYDIR/release.desc"
|
|
}
|