1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-19 12:06:13 +02:00
build/pkg/basefiles/build
David Oberhollenzer fa4eff263b Cleanup: implement defaults for package functions
This commit adds an "emptypackage" template that implements defaults
for all package functions and is included before every package.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-16 15:16:58 +02:00

20 lines
613 B
Plaintext

deploy() {
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGDEPLOYDIR"
cp -r "$SCRIPTDIR/pkg/$PKGNAME/lib" "$PKGDEPLOYDIR"
# version info
local fname=$(echo "${OS_NAME}-release" | tr '[:upper:]' '[:lower:]')
echo "$OS_RELEASE" > "$PKGDEPLOYDIR/etc/$fname"
echo "file etc/$fname 0644 0 0" >> "$PKGDEPLOYDIR/${PKGNAME}.files"
# local config files
fname=$(file_path_override "resolv.conf")
if [ ! -z "$fname" ]; then
cp "$fname" "$PKGDEPLOYDIR/etc/resolv.conf"
echo "file etc/resolv.conf 0644 0 0" \
>> "$PKGDEPLOYDIR/${PKGNAME}.files"
fi
}