@ -89,10 +89,15 @@ QT_QPA_PLATFORMTHEME=gtk3 для root, благодаря чему Qt5 начи
пользовательскую тему иконок под root. Удаление пакета отключает выставление переменной.
%files pam-env
/root/.kometa_env
# copied to /root/.kometa_env by scriptlet
%_datadir/kometa-pam-env
# echo -e is a bashism
%post pam-env
# sisyphus_check does not allow to package files inside /root,
# that is why I have to make this hack.
# IMHO it's OK to package /root/* here as in rootfiles.
cp %_datadir/kometa-pam-env /root/.kometa_env
# This scriptlet sees if pam_env.so <...> exists in PAM configuration and adds it to there if it does not.
# It does not add if if a sysadmin manually commented it out.
# /etc/control.d/facilities/ seemed to be too complex and not easy to use for this task, so inventing a bicycle.
@ -124,6 +129,7 @@ if [ "$1" -eq 0 ]; then
sed -i'.rpmsave' -E -e "/^%regex/d" "$file"
fi
done
unlink /root/.kometa_env
fi
#--------------------------------------------------------------
@ -148,8 +154,8 @@ install -m0755 scripts/systemd.sh %buildroot%_user_env_gen_dir/10-kometa-xdg.sh
mkdir -p %buildroot/etc/xdg/kometa
install -m0644 plasma5/* %buildroot/etc/xdg/kometa
mkdir -p %buildroot/root
echo QT_QPA_PLATFORMTHEME=gtk3 > %buildroot/root/.kometa_ env
mkdir -p %buildroot%_datadir
echo QT_QPA_PLATFORMTHEME=gtk3 > %buildroot/%_datadir/kometa-pam- env
%check
cd scripts