parent
710e5e24e1
commit
4f52ccaf16
@ -1,2 +1,2 @@ |
|||||||
tar: . name=kometa-xdg-@version@ base=kometa-xdg-@version@ |
tar: . name=@name@-@version@ base=@name@-@version@ |
||||||
copy: COPYING |
copy: COPYING |
||||||
|
@ -1,201 +0,0 @@ |
|||||||
Name: kometa-xdg |
|
||||||
Summary: XDG desktop settings for Kometa distros |
|
||||||
Summary(ru): Настройки рабочего окружения дистрибутивов Комета |
|
||||||
License: GPL-3.0 |
|
||||||
Group: Graphical desktop/Other |
|
||||||
Version: 1.5 |
|
||||||
Release: alt1.1 |
|
||||||
Source0: kometa-xdg-%version.tar |
|
||||||
Source1: COPYING |
|
||||||
BuildArch: noarch |
|
||||||
BuildRequires: rpm-macros-systemd |
|
||||||
|
|
||||||
%description |
|
||||||
XDG desktop settings for Kometa distros |
|
||||||
%description -l ru_RU.UTF-8 |
|
||||||
Настройки рабочего окружения дистрибутивов Комета |
|
||||||
|
|
||||||
#-------------------------------------------------------------- |
|
||||||
|
|
||||||
%package core |
|
||||||
Summary: Engine to set distribution-specific desktop settings |
|
||||||
Summary(ru): Движок установки дистрибутиво-специфичных настроек рабочего стола |
|
||||||
Group: Graphical desktop/Other |
|
||||||
Requires: sed |
|
||||||
|
|
||||||
%description core |
|
||||||
Engine to set distribution-specific desktop settings. |
|
||||||
Sets environmental variables $XDG_CONFIG_DIRS and $XDG_DATA_DIRS, |
|
||||||
adding /etc/xdg/kometa and /usr/share/kometa into them. |
|
||||||
Can be used separately from Kometa. |
|
||||||
%description -l ru_RU.UTF-8 core |
|
||||||
Движок установки дистрибутиво-специфичных настроек рабочего стола. |
|
||||||
Устонавливает переменные окружения $XDG_CONFIG_DIRS и $XDG_DATA_DIRS, |
|
||||||
добавляя в них /etc/xdg/kometa и /usr/share/kometa. |
|
||||||
Может быть использован вне кометы. |
|
||||||
|
|
||||||
%files core |
|
||||||
%doc COPYING |
|
||||||
%dir /etc/xdg/kometa |
|
||||||
%dir /usr/share/kometa |
|
||||||
%_bindir/kometa-xdg-env |
|
||||||
%_user_env_gen_dir/10-kometa-xdg.sh |
|
||||||
/etc/profile.d/10-kometa-xdg.sh |
|
||||||
|
|
||||||
#-------------------------------------------------------------- |
|
||||||
|
|
||||||
# alternatives between plasma5-classic, plasma5-foo etc. can be added later |
|
||||||
|
|
||||||
%package plasma5-classic |
|
||||||
Summary: KDE 5 desktop settings for classic variant of Kometa |
|
||||||
Summary(ru): Настройки KDE 5 для классического варианта Кометы |
|
||||||
Group: Graphical desktop/KDE |
|
||||||
Requires: %name-core = %EVR |
|
||||||
Requires: kometa-icons-theme-classic |
|
||||||
|
|
||||||
%description plasma5-classic |
|
||||||
KDE 5 desktop settings for classic variant of Kometa |
|
||||||
%description -l ru_RU.UTF-8 plasma5-classic |
|
||||||
Настройки KDE 5 для классического варианта Кометы |
|
||||||
|
|
||||||
%files plasma5-classic |
|
||||||
%doc COPYING |
|
||||||
/etc/xdg/kometa/dolphinrc |
|
||||||
/etc/xdg/kometa/kcminputrc |
|
||||||
/etc/xdg/kometa/kdeglobals |
|
||||||
/etc/xdg/kometa/kxkbrc |
|
||||||
%dir /usr/share/kometa/kxmlgui5 |
|
||||||
%dir /usr/share/kometa/kxmlgui5/dolphin |
|
||||||
/usr/share/kometa/kxmlgui5/dolphin/dolphinui.rc |
|
||||||
|
|
||||||
#-------------------------------------------------------------- |
|
||||||
|
|
||||||
%define regex auth[[:space:]]([[:space:]]).*pam_env.so user_envfile=.kometa_env readenv=0 user_readenv=1 |
|
||||||
|
|
||||||
%package pam-env |
|
||||||
Summary: Hack PAM configs to make Qt5 applications ran by usermode use Kometa icons |
|
||||||
Summary(ru): Хак конфигов PAM, чтобы запущенные через usermode приложения на Qt5 использовали иконки Кометы |
|
||||||
Group: System/Base |
|
||||||
# %%_qt5_plugindir/platformthemes/libqgtk3.so |
|
||||||
Requires: libqt5-gui |
|
||||||
Requires: pam |
|
||||||
Requires(post): /bin/echo |
|
||||||
Requires(post): grep |
|
||||||
Requires(post): pam-config |
|
||||||
Requires(preun): grep |
|
||||||
Requires(preun): sed |
|
||||||
|
|
||||||
%description pam-env |
|
||||||
Hack PAM configs to make Qt5 applications ran by usermode use Kometa icons. |
|
||||||
%description -l ru_RU.UTF-8 pam-env |
|
||||||
Некоторые приложения, например, acc (alterator-standalone), запускаются из-под |
|
||||||
пользовательской сессии от root через usermode и при этом используют basealt |
|
||||||
в качестве иконки. В KDE 5 под X11 приложение само после запуска устанавливает иконку |
|
||||||
на панели задач. Темы иконок kometa* в качестве иконки basealt устанавливают логотип |
|
||||||
Кометы вместо Базальта, чтобы не создавать ошибочное впечатление, что Комета — продукт |
|
||||||
Базальта. Но из-под root Qt5 не узнает тему иконок и использует иконку basealt не из |
|
||||||
темы Кометы. Этот пакет при установке подключает выставление переменной окружения |
|
||||||
QT_QPA_PLATFORMTHEME=gtk3 для root, благодаря чему Qt5 начинает использовать |
|
||||||
пользовательскую тему иконок под root. Удаление пакета отключает выставление переменной. |
|
||||||
|
|
||||||
%files pam-env |
|
||||||
# copied to /root/.kometa_env by scriptlet |
|
||||||
%_datadir/kometa-pam-env |
|
||||||
|
|
||||||
%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. |
|
||||||
TEXT='auth\t\toptional\tpam_env.so user_envfile=.kometa_env readenv=0 user_readenv=1' |
|
||||||
# based on /etc/control.d/facilities/pam_access |
|
||||||
CONFIG_COMMON=/etc/pam.d/system-auth-common |
|
||||||
CONFIG_SYSTEM=/etc/pam.d/system-auth |
|
||||||
if [ -f "$CONFIG_COMMON" ] |
|
||||||
then |
|
||||||
CONFIG="$CONFIG_COMMON" |
|
||||||
else |
|
||||||
CONFIG="$(readlink -e "$CONFIG_SYSTEM")" || CONFIG="$CONFIG_SYSTEM" |
|
||||||
fi |
|
||||||
if ! grep -qE "%regex" "$CONFIG" |
|
||||||
then |
|
||||||
echo "Adding loading ~/.kometa_env into PAM configs..." |
|
||||||
cp "$CONFIG" "$CONFIG".rpmsave |
|
||||||
# do not rely that shell-builtin 'echo' is capable of '-e' (not POSIX sh) |
|
||||||
/bin/echo -e "$TEXT" >> "$CONFIG" |
|
||||||
fi |
|
||||||
|
|
||||||
%preun pam-env |
|
||||||
# Package removal, not upgrade |
|
||||||
if [ "$1" -eq 0 ]; then |
|
||||||
for file in /etc/pam.d/system-auth-common /etc/pam.d/system-auth |
|
||||||
do |
|
||||||
if grep -qE "^%regex" "$file"; then |
|
||||||
echo "Removing loading ~/.kometa_env from PAM config ${file}..." |
|
||||||
sed -i'.rpmsave' -E -e "/^%regex/d" "$file" |
|
||||||
fi |
|
||||||
done |
|
||||||
unlink /root/.kometa_env |
|
||||||
fi |
|
||||||
#-------------------------------------------------------------- |
|
||||||
|
|
||||||
%prep |
|
||||||
%setup -q |
|
||||||
cp %SOURCE1 . |
|
||||||
|
|
||||||
%build |
|
||||||
: |
|
||||||
|
|
||||||
%install |
|
||||||
|
|
||||||
mkdir -p %buildroot%_bindir |
|
||||||
mkdir -p %buildroot/etc/profile.d |
|
||||||
mkdir -p %buildroot/usr/lib/systemd/user-environment-generators |
|
||||||
install -m0755 scripts/kometa-xdg-env %buildroot%_bindir/kometa-xdg-env |
|
||||||
# for console |
|
||||||
install -m0755 scripts/profile.sh %buildroot/etc/profile.d/10-kometa-xdg.sh |
|
||||||
# for dbus services |
|
||||||
install -m0755 scripts/systemd.sh %buildroot%_user_env_gen_dir/10-kometa-xdg.sh |
|
||||||
|
|
||||||
mkdir -p %buildroot/etc/xdg/kometa |
|
||||||
cp -rv plasma5/XDG_CONFIG_DIRS/* %buildroot/etc/xdg/kometa |
|
||||||
mkdir -p %buildroot/usr/share/kometa |
|
||||||
cp -rv plasma5/XDG_DATA_DIRS/* %buildroot/usr/share/kometa |
|
||||||
|
|
||||||
mkdir -p %buildroot%_datadir |
|
||||||
echo QT_QPA_PLATFORMTHEME=gtk3 > %buildroot/%_datadir/kometa-pam-env |
|
||||||
|
|
||||||
%check |
|
||||||
cd scripts |
|
||||||
./test.sh |
|
||||||
|
|
||||||
%changelog |
|
||||||
* Wed Feb 16 2022 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.5-alt1.1 |
|
||||||
- Commit 1.5-alt1 by tema@ |
|
||||||
|
|
||||||
* Tue Feb 15 2022 Artem Proskurnev <tema@altlinux.org> 1.5-alt1 |
|
||||||
- Add power settings |
|
||||||
- Add Dolphin filer panel |
|
||||||
- Add "Set as wallpaper" |
|
||||||
- Set Chromium as the default browser |
|
||||||
|
|
||||||
* Fri Dec 24 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.4-alt1 |
|
||||||
- Add setting $XDG_DATA_DIRS, enable "Show Previews" button in Dolphin |
|
||||||
- Tune description: note that kometa-xdg-core can be used just to set env outside of Kometa |
|
||||||
|
|
||||||
* Thu Dec 16 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.3-alt1 |
|
||||||
- Turn off NumLock by default in KDE 5 |
|
||||||
|
|
||||||
* Thu Dec 16 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.2-alt1 |
|
||||||
- Hack to make alterator use correct icons (new subpackage kometa-xdg-pam-env) |
|
||||||
- Use macro for directory with systemd user environment generators (thanks to ldv@) |
|
||||||
|
|
||||||
* Tue Dec 14 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.1-alt1 |
|
||||||
- set default icon theme |
|
||||||
|
|
||||||
* Tue Dec 14 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.0-alt1 |
|
||||||
- Init |
|
@ -0,0 +1,144 @@ |
|||||||
|
%define _unpackaged_files_terminate_build 1 |
||||||
|
|
||||||
|
Name: mos-xdg |
||||||
|
Summary: XDG desktop settings for M OS distros |
||||||
|
Summary(ru): Настройки рабочего окружения дистрибутивов М ОС |
||||||
|
License: GPL-3.0 |
||||||
|
Group: Graphical desktop/Other |
||||||
|
Version: 2.0 |
||||||
|
Release: alt1 |
||||||
|
Source0: %name-%version.tar |
||||||
|
Source1: COPYING |
||||||
|
BuildArch: noarch |
||||||
|
BuildRequires: rpm-macros-systemd |
||||||
|
|
||||||
|
%description |
||||||
|
XDG desktop settings for M OS distros |
||||||
|
%description -l ru_RU.UTF-8 |
||||||
|
Настройки рабочего окружения дистрибутивов М ОС |
||||||
|
|
||||||
|
#-------------------------------------------------------------- |
||||||
|
|
||||||
|
%package core |
||||||
|
Summary: Engine to set distribution-specific desktop settings |
||||||
|
Summary(ru): Движок установки дистрибутиво-специфичных настроек рабочего стола |
||||||
|
Group: Graphical desktop/Other |
||||||
|
Requires: sed |
||||||
|
# package was renamed |
||||||
|
Obsoletes: kometa-xdg-core < 2.0 |
||||||
|
# this package was dropped as a very complex trick; |
||||||
|
# icons are replaced by a filetrigger more reliably |
||||||
|
Obsoletes: kometa-xdg-pam-env < 2.0 |
||||||
|
|
||||||
|
%description core |
||||||
|
Engine to set distribution-specific desktop settings. |
||||||
|
Sets environmental variables $XDG_CONFIG_DIRS and $XDG_DATA_DIRS, |
||||||
|
adding /etc/xdg/mos and /usr/share/mos into them. |
||||||
|
Can be used separately from M OS. |
||||||
|
%description -l ru_RU.UTF-8 core |
||||||
|
Движок установки дистрибутиво-специфичных настроек рабочего стола. |
||||||
|
Устонавливает переменные окружения $XDG_CONFIG_DIRS и $XDG_DATA_DIRS, |
||||||
|
добавляя в них /etc/xdg/mos и /usr/share/mos. |
||||||
|
Может быть использован вне М ОС. |
||||||
|
|
||||||
|
%files core |
||||||
|
%doc COPYING |
||||||
|
%dir /etc/xdg/mos |
||||||
|
%dir /usr/share/mos |
||||||
|
%_bindir/mos-xdg-env |
||||||
|
%_user_env_gen_dir/10-mos-xdg.sh |
||||||
|
/etc/profile.d/10-mos-xdg.sh |
||||||
|
|
||||||
|
#-------------------------------------------------------------- |
||||||
|
|
||||||
|
# alternatives between plasma5-classic, plasma5-foo etc. can be added later |
||||||
|
|
||||||
|
%package plasma5-classic |
||||||
|
Summary: KDE 5 desktop settings for classic variant of M OS |
||||||
|
Summary(ru): Настройки KDE 5 для классического варианта М ОС |
||||||
|
Group: Graphical desktop/KDE |
||||||
|
Requires: %name-core = %EVR |
||||||
|
Requires: mos-icons-theme-classic |
||||||
|
# package was renamed |
||||||
|
Obsoletes: kometa-xdg-plasma5-classic < 2.0 |
||||||
|
|
||||||
|
%description plasma5-classic |
||||||
|
KDE 5 desktop settings for classic variant of M OS |
||||||
|
%description -l ru_RU.UTF-8 plasma5-classic |
||||||
|
Настройки KDE 5 для классического варианта М ОС |
||||||
|
|
||||||
|
%files plasma5-classic |
||||||
|
%doc COPYING |
||||||
|
/etc/xdg/mos/dolphinrc |
||||||
|
/etc/xdg/mos/kcminputrc |
||||||
|
/etc/xdg/mos/kdeglobals |
||||||
|
/etc/xdg/mos/kxkbrc |
||||||
|
/etc/xdg/mos/powermanagementprofilesrc |
||||||
|
%dir /usr/share/mos/kxmlgui5 |
||||||
|
%dir /usr/share/mos/kxmlgui5/dolphin |
||||||
|
%dir /usr/share/mos/kservices5 |
||||||
|
%dir /usr/share/mos/kservices5/ServiceMenus |
||||||
|
/usr/share/mos/kxmlgui5/dolphin/dolphinui.rc |
||||||
|
/usr/share/mos/kservices5/ServiceMenus/setAsWallpaper.desktop |
||||||
|
|
||||||
|
#-------------------------------------------------------------- |
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -q |
||||||
|
cp %SOURCE1 . |
||||||
|
|
||||||
|
%build |
||||||
|
: |
||||||
|
|
||||||
|
%install |
||||||
|
|
||||||
|
mkdir -p %buildroot%_bindir |
||||||
|
mkdir -p %buildroot/etc/profile.d |
||||||
|
mkdir -p %buildroot%_user_env_gen_dir |
||||||
|
install -m0755 scripts/mos-xdg-env %buildroot%_bindir/mos-xdg-env |
||||||
|
# for console |
||||||
|
install -m0755 scripts/profile.sh %buildroot/etc/profile.d/10-mos-xdg.sh |
||||||
|
# for dbus services |
||||||
|
install -m0755 scripts/systemd.sh %buildroot%_user_env_gen_dir/10-mos-xdg.sh |
||||||
|
|
||||||
|
mkdir -p %buildroot/etc/xdg/mos |
||||||
|
cp -rv plasma5/XDG_CONFIG_DIRS/* %buildroot/etc/xdg/mos |
||||||
|
mkdir -p %buildroot/usr/share/mos |
||||||
|
cp -rv plasma5/XDG_DATA_DIRS/* %buildroot/usr/share/mos |
||||||
|
|
||||||
|
%check |
||||||
|
cd scripts |
||||||
|
./test.sh |
||||||
|
|
||||||
|
%changelog |
||||||
|
* Tue Apr 26 2022 Mikhail Novosyolov <mikhailnov@altlinux.org> 2.0-alt1 |
||||||
|
- Rename from Kometa to M OS (Moscow OS) |
||||||
|
- Drop pam-env hackery due to being useless (icons are reliably replaced by a filetrigger) |
||||||
|
- Package /etc/xdg/mos/powermanagementprofilesrc |
||||||
|
- Package /usr/share/mos/kservices5/ServiceMenus/setAsWallpaper.desktop |
||||||
|
|
||||||
|
* Wed Feb 16 2022 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.5-alt1.1 |
||||||
|
- Commit 1.5-alt1 by tema@ |
||||||
|
|
||||||
|
* Tue Feb 15 2022 Artem Proskurnev <tema@altlinux.org> 1.5-alt1 |
||||||
|
- Add power settings |
||||||
|
- Add Dolphin filer panel |
||||||
|
- Add "Set as wallpaper" |
||||||
|
- Set Chromium as the default browser |
||||||
|
|
||||||
|
* Fri Dec 24 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.4-alt1 |
||||||
|
- Add setting $XDG_DATA_DIRS, enable "Show Previews" button in Dolphin |
||||||
|
- Tune description: note that mos-xdg-core can be used just to set env outside of Kometa |
||||||
|
|
||||||
|
* Thu Dec 16 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.3-alt1 |
||||||
|
- Turn off NumLock by default in KDE 5 |
||||||
|
|
||||||
|
* Thu Dec 16 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.2-alt1 |
||||||
|
- Hack to make alterator use correct icons (new subpackage mos-xdg-pam-env) |
||||||
|
- Use macro for directory with systemd user environment generators (thanks to ldv@) |
||||||
|
|
||||||
|
* Tue Dec 14 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.1-alt1 |
||||||
|
- set default icon theme |
||||||
|
|
||||||
|
* Tue Dec 14 2021 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.0-alt1 |
||||||
|
- Init |
@ -1,3 +1,3 @@ |
|||||||
#!/bin/sh |
#!/bin/sh |
||||||
KOMETA_XDG_TYPE=profile |
MOS_XDG_TYPE=profile |
||||||
. kometa-xdg-env |
. mos-xdg-env |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
#!/bin/sh |
#!/bin/sh |
||||||
KOMETA_XDG_TYPE=systemd |
MOS_XDG_TYPE=systemd |
||||||
. kometa-xdg-env |
. mos-xdg-env |
||||||
|
Loading…
Reference in new issue