2022-08-22 23:58:24 +00:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2020-present Fewtarius
|
|
|
|
|
|
|
|
PKG_NAME="splash"
|
|
|
|
PKG_VERSION="$(date +%Y%m%d)"
|
|
|
|
PKG_ARCH="any"
|
|
|
|
PKG_LICENSE="apache2"
|
|
|
|
PKG_SITE=""
|
|
|
|
PKG_URL=""
|
2022-08-23 11:23:08 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain imagemagick"
|
2022-08-22 23:58:24 +00:00
|
|
|
PKG_LONGDESC="Boot splash screens"
|
|
|
|
PKG_TOOLCHAIN="manual"
|
|
|
|
|
2022-08-23 11:23:08 +00:00
|
|
|
make_init() {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
2022-08-22 23:58:24 +00:00
|
|
|
make_target() {
|
2022-08-23 11:23:08 +00:00
|
|
|
:
|
2022-08-22 23:58:24 +00:00
|
|
|
}
|
|
|
|
|
2022-08-23 11:23:08 +00:00
|
|
|
mksplash() {
|
2022-08-23 21:02:26 +00:00
|
|
|
SPLASH="${ROOT}/distributions/${DISTRO}/splash/splash.png"
|
2022-08-26 23:18:56 +00:00
|
|
|
if [ -n "${SPLASH_RESOLUTION}" ]
|
2022-08-23 11:23:08 +00:00
|
|
|
then
|
2022-08-26 23:18:56 +00:00
|
|
|
|
|
|
|
# Switch the resolution so the rotated image will scale correctly.
|
|
|
|
HRES=$(echo "${SPLASH_RESOLUTION}" | awk 'BEGIN {FS="x"} {print $1}')
|
|
|
|
VRES=$(echo "${SPLASH_RESOLUTION}" | awk 'BEGIN {FS="x"} {print $2}')
|
|
|
|
if [ "${VRES}" -gt "${HRES}" ]
|
|
|
|
then
|
|
|
|
convert ${SPLASH} -quality 100 -background black -resize ${VRES}x${HRES} -gravity center -extent ${VRES}x${HRES} ${1}/splash.png
|
|
|
|
else
|
|
|
|
convert ${SPLASH} -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splash.png
|
|
|
|
fi
|
|
|
|
convert ${SPLASH} -rotate 270 -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splashl.png
|
2022-08-23 11:23:08 +00:00
|
|
|
else
|
2022-08-28 15:37:12 +00:00
|
|
|
cp ${SPLASH} ${1}
|
2022-08-28 17:47:38 +00:00
|
|
|
convert ${SPLASH} -rotate 90 -quality 100 -background black -gravity center ${1}/splashl.png
|
2022-08-23 11:23:08 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_init() {
|
2022-08-22 23:58:24 +00:00
|
|
|
mkdir -p ${INSTALL}/splash
|
2022-08-23 11:23:08 +00:00
|
|
|
mksplash ${INSTALL}/splash
|
2022-08-22 23:58:24 +00:00
|
|
|
}
|
|
|
|
|
2022-08-23 11:23:08 +00:00
|
|
|
makeinstall_target() {
|
2022-08-22 23:58:24 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/config/splash
|
2022-08-23 11:23:08 +00:00
|
|
|
mksplash ${INSTALL}/usr/config/splash
|
2022-08-22 23:58:24 +00:00
|
|
|
}
|