59 lines
1.9 KiB
RPMSpec
59 lines
1.9 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
|
|
|
|
Requires: labwc
|
|
Requires: wofi
|
|
Requires: sfwbar
|
|
Requires: swaybg
|
|
Requires: waybar
|
|
|
|
%description
|
|
Preset labwc configuration files for the openruyi desktop user.
|
|
This package installs defaults under /usr/share and deploys them to
|
|
/home/openruyi/.config/labwc 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
|
|
|
|
%post
|
|
if id -u openruyi >/dev/null 2>&1; then
|
|
install -d -m 0755 /home/openruyi/.config/labwc
|
|
for f in rc.xml menu.xml autostart; do
|
|
if [ ! -e /home/openruyi/.config/labwc/$f ]; then
|
|
install -m 0644 %{_datadir}/openruyi-desktop-setup-labwc/labwc/$f /home/openruyi/.config/labwc/$f
|
|
if [ "$f" = "autostart" ]; then
|
|
chmod 0755 /home/openruyi/.config/labwc/$f
|
|
fi
|
|
fi
|
|
done
|
|
chown -R openruyi:openruyi /home/openruyi/.config/labwc
|
|
fi
|
|
|
|
%files
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/rc.xml
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/menu.xml
|
|
%{_datadir}/openruyi-desktop-setup-labwc/labwc/autostart
|
|
|
|
%changelog
|
|
%{?autochangelog}
|