1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-09 07:16:13 +02:00
build/pkg/release-alix/build
David Oberhollenzer 5dd2790a67 Add os-name & release
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-15 13:56:16 +01:00

41 lines
974 B
Plaintext
Executable file

DEPENDS="rootfs linux"
build() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
mkdir -p "$BUILD/$OS_RELEASE"
# copy output of immediate dependencies
for pkgname in $DEPENDS; do
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD/$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" "$BUILD"
for script in install.sh genimage.sh syslinux.cfg; do
cp "$SCRIPTDIR/$PKGDIR/$PKGNAME/$script" "$BUILD"
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$BUILD/$script"
sed -i 's#KERNELFILE#'$linux_image'#g' "$BUILD/$script"
sed -i 's#VERSIONDIR#'$OS_RELEASE'#g' "$BUILD/$script"
done
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
pushd "$PKGBUILDDIR" > /dev/null
tar czf "$DEPLOY/$PKGNAME.tar.gz" "${PKGDIR}-${PKGNAME}"
popd > /dev/null
}