69 lines
2.1 KiB
RPMSpec
69 lines
2.1 KiB
RPMSpec
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
|
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
|
|
# SPDX-FileContributor: jingyupu <pujingyu@iscas.ac.cn>
|
|
#
|
|
# SPDX-License-Identifier: MulanPSL-2.0
|
|
|
|
Name: openruyi-desktop-setup-labwc
|
|
Version: 0.1.0
|
|
Release: %autorelease
|
|
Summary: Preset labwc configuration for openRuyi desktop user
|
|
License: MIT
|
|
BuildArch: noarch
|
|
Source1: rc.xml
|
|
Source2: menu.xml
|
|
Source3: autostart
|
|
Source4: openruyi.png
|
|
|
|
Requires: labwc
|
|
Requires: wofi
|
|
Requires: sfwbar
|
|
Requires: swaybg
|
|
Requires: waybar
|
|
|
|
%description
|
|
Preset labwc configuration files for desktop users.
|
|
This package installs defaults under /usr/share and deploys them to
|
|
all existing user homes under /home on installation if missing.
|
|
|
|
%prep
|
|
|
|
%build
|
|
|
|
%install
|
|
install -d %{buildroot}%{_datadir}/openruyi-desktop-setup-labwc/labwc
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/openruyi-desktop-setup-labwc/labwc/rc.xml
|
|
install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/openruyi-desktop-setup-labwc/labwc/menu.xml
|
|
install -m 0755 %{SOURCE3} %{buildroot}%{_datadir}/openruyi-desktop-setup-labwc/labwc/autostart
|
|
install -m 0644 %{SOURCE4} %{buildroot}%{_datadir}/openruyi-desktop-setup-labwc/labwc/openruyi.png
|
|
|
|
%post
|
|
for homedir in /home/*; do
|
|
[ -d "$homedir" ] || continue
|
|
user="$(basename "$homedir")"
|
|
id -u "$user" >/dev/null 2>&1 || continue
|
|
|
|
target="$homedir/.config/labwc"
|
|
install -d -m 0755 "$target"
|
|
|
|
for f in rc.xml menu.xml autostart; do
|
|
[ -e "$target/$f" ] && continue
|
|
|
|
mode=0644
|
|
[ "$f" = "autostart" ] && mode=0755
|
|
install -m "$mode" "%{_datadir}/openruyi-desktop-setup-labwc/labwc/$f" "$target/$f"
|
|
chown "$user:$user" "$target/$f"
|
|
done
|
|
|
|
chown "$user:$user" "$target"
|
|
done
|
|
|
|
%files
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/rc.xml
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/menu.xml
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/autostart
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/openruyi.png
|
|
|
|
%changelog
|
|
%{?autochangelog}
|