# old version (without -$pkgrel): ${1%%-*}
# new version (without -$pkgrel): ${2%%-*}

PKGNAME="plymouth-theme-stbsystem"
source /usr/share/makepkg/util/message.sh
colorize

_important_en(){
    msg2 "IMPORTANT !"
    msg2 "  Get list themes:"
    msg2 "    plymouth-set-default-theme -l"
    msg2 "  To set the theme, run as root:"
    msg2 "    plymouth-set-default-theme <theme_name>"
    msg2 "  Preview of the theme, run as root:"
    msg2 "    plymouth-preview <theme_name>"
}

_important_ru(){
    msg2 "Важно !"
    msg2 "  Вывести список тем:"
    msg2 "    plymouth-set-default-theme -l"
    msg2 "  Установить выбранную тему, запускать от root:"
    msg2 "    plymouth-set-default-theme <Название_Темы>"
    msg2 "  Предпросмотр выбранной темы, запускать от root:"
    msg2 "    plymouth-preview <Название_Темы>"
}

# arg 1:  the new package version
pre_install() {
    true
}

# arg 1:  the new package version
post_install() {
    post_upgrade $@
}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {
    true
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    if [[ ${LANG} == "ru_RU.UTF-8" ]]; then
        _important_ru
    else
        _important_en
    fi
}

# arg 1:  the old package version
pre_remove() {
    true
}

# arg 1:  the old package version
post_remove() {
    true
}
