mirror of
https://github.com/pygos/build.git
synced 2024-11-25 04:20:41 +01:00
45 lines
1.1 KiB
Text
Executable file
45 lines
1.1 KiB
Text
Executable file
DEPENDS=$(cat_file_merge "ROOTFS" | sort -u)
|
|
|
|
build() {
|
|
local listing="$PKGDEPLOYDIR/$PKGNAME.files"
|
|
local desc="$PKGDEPLOYDIR/$PKGNAME.desc"
|
|
|
|
# generate package description and file listing
|
|
pkg install -l pkg -r "$TCDIR/$TARGET" $DEPENDS | sort -u > "$listing"
|
|
touch "$desc"
|
|
|
|
# move configuration to preserve directory
|
|
mkdir -pv "$TCDIR/$TARGET/cfg/preserve" "$TCDIR/$TARGET/cfg/overlay"
|
|
|
|
mv "$TCDIR/$TARGET/etc" "$TCDIR/$TARGET/cfg/preserve/etc"
|
|
mv "$TCDIR/$TARGET/usr" "$TCDIR/$TARGET/cfg/preserve/usr"
|
|
mv "$TCDIR/$TARGET/var/lib" "$TCDIR/$TARGET/cfg/preserve/var_lib"
|
|
rm -rf "$TCDIR/$TARGET/var"
|
|
|
|
sed -i 's#etc/#cfg/preserve/etc/#g' "$listing"
|
|
sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$listing"
|
|
sed -i 's#usr/#cfg/preserve/usr/#g' "$listing"
|
|
|
|
egrep -v "^(dir|file|slink) (var|etc|usr)" "$listing" > "./temp"
|
|
mv "./temp" "$listing"
|
|
|
|
cat <<_EOF >> "$listing"
|
|
dir etc 0755 0 0
|
|
dir var 0755 0 0
|
|
dir usr 0755 0 0
|
|
dir cfg 0755 0 0
|
|
dir cfg/preserve 0755 0 0
|
|
dir cfg/preserve/etc 0755 0 0
|
|
dir cfg/preserve/usr 0755 0 0
|
|
dir cfg/preserve/var_lib 0755 0 0
|
|
dir cfg/overlay 0755 0 0
|
|
_EOF
|
|
}
|
|
|
|
deploy() {
|
|
return
|
|
}
|
|
|
|
check_update() {
|
|
return
|
|
}
|