1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-06-01 09:48:43 +02:00
build/pkg/rootfs-alix/build
David Oberhollenzer 5c8effa301 Remove unneccessarry prepare() hooks
- Packages that don't download anything don't need a prepare() hook
 - Packages that inherit the source from other packages should leave
   it untouched. If they get downloaded first, they should use the
   hook from the original package.

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

34 lines
748 B
Plaintext
Executable file

build() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
# setup skeleton
mkdir -pv ${BUILD}/{bin,etc,dev,sys,proc,tmp,var,run}
echo "/lib" > "$BUILD/etc/ld-musl-i386.path"
# install packages to rootfs
cat "$SCRIPTDIR/pkg/rootfs-alix/depends" | sort -u > "$BUILD/rawpkg"
dependencies "$BUILD/rawpkg" "$BUILD/etc/packages" "pkg"
echo "toolchain" >> "$BUILD/etc/packages"
rm -f "$BUILD/rawpkg"
while read pkgname; do
if [ ! -e "$PKGDEPLOYDIR/$pkgname" ]; then
continue
fi
cp -ru --remove-destination ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD"
done < "$BUILD/etc/packages"
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
mksquashfs "$BUILD" "$DEPLOY/rootfs.img" -all-root -no-progress -no-xattrs
}