mirror of
https://github.com/pygos/build.git
synced 2024-11-17 00:47:10 +01:00
ae57b55b9c
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
36 lines
831 B
Text
Executable file
36 lines
831 B
Text
Executable file
DEPENDS="rootfs 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/$PKGDIR/$PKGNAME/cmdline.txt" "$BUILD/boot"
|
|
cp "$SCRIPTDIR/$PKGDIR/$PKGNAME/install.sh" "$BUILD"
|
|
cp "$SCRIPTDIR/$PKGDIR/$PKGNAME/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/$PKGNAME.tar.gz" "${PKGDIR}-${PKGNAME}"
|
|
popd > /dev/null
|
|
}
|