1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-20 12:36:14 +02:00
build/pkg/release-rpi3/build
David Oberhollenzer ffacb26218 Remove depends file
Instead of having a "depends" file with a list of packages, add a
"DEPENDS" variable to the build script.

Generate the rootfs dependencies from a config file stored in the
cfg directory.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-01-30 14:02:09 +01:00

37 lines
844 B
Plaintext
Executable file

DEPENDS="rootfs-rpi3 linux-rpi3 boot-rpi3"
build() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
# copy output of immediate dependencies
mkdir -p "$BUILD/boot"
for pkgname in $DEPENDS; do
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD/boot"
fi
done
# copy files from this package
cp "$SCRIPTDIR/pkg/release-${CFG}/cmdline.txt" "$BUILD/boot"
cp "$SCRIPTDIR/pkg/release-${CFG}/install.sh" "$BUILD"
cp "$SCRIPTDIR/pkg/release-${CFG}/genimage.sh" "$BUILD"
# substitute file names in scripts
local rootfs_image="rootfs.img"
sed -i 's/ROOTFSFILE/'$rootfs_image'/g' "$BUILD/boot/cmdline.txt"
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
pushd "$PKGBUILDDIR" > /dev/null
tar czf "${DEPLOY}/release-${CFG}.tar.gz" "release-${CFG}"
popd > /dev/null
}