99 lines
3.8 KiB
RPMSpec
99 lines
3.8 KiB
RPMSpec
# Debuginfo package is useless.
|
|
%global debug_package %{nil}
|
|
|
|
Name: almalinux-backgrounds-extras
|
|
Version: 100.0
|
|
Release: 1%{?dist}
|
|
Summary: AlmaLinux-related desktop backgrounds for KDE and XFCE
|
|
BuildArch: noarch
|
|
|
|
#Group: System Environment/Base
|
|
URL: https://almalinux.org
|
|
Source0: metadata.json
|
|
License: MIT
|
|
|
|
Requires: almalinux-backgrounds
|
|
Requires: coreutils
|
|
Conflicts: desktop-backgrounds-compat
|
|
Provides: desktop-backgrounds-compat
|
|
|
|
%description
|
|
AlmaLinux-related desktop backgrounds for KDE and XFCE
|
|
|
|
%prep
|
|
|
|
%build
|
|
|
|
%install
|
|
# Declare an array for background types
|
|
declare -a bgtypes=("default")
|
|
# Declare an array for background sizes
|
|
declare -a sizes=("1024x600.png" "1024x768.png" "1152x720.png" "1152x864.png" "1200x900.png" "1280x1024.png" "1280x720.png" "1280x768.png" "1280x800.png" "1280x960.png" "1366x768.png" "1440x1080.png" "1440x900.png" "1600x1200.png" "1600x1280.png" "1680x1050.png" "1920x1080.png" "1920x1200.png" "1920x1280.png" "1920x1440.png" "2048x1536.png" "2160x1440.png" "2304x1440.png" "2560x1440.png" "2560x1600.png" "2960x1440.png" "3000x2000.png" "3200x1800.png" "3440x1440.png" "3840x2160.png" "640x480.png" "800x480.png" "800x600.png")
|
|
# Declare an array for schemes and their corresponding images
|
|
declare -a contents=("images" "images_dark")
|
|
declare -A schemes
|
|
schemes["images"]="almalinux-day.jpg"
|
|
schemes["images_dark"]="almalinux-night.jpg"
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/backgrounds/images
|
|
cd %{buildroot}%{_datadir}
|
|
# Loop through the above array(s) types, contents and sizes to create links and install metadata
|
|
for bg in "${bgtypes[@]}"
|
|
do
|
|
# Remove any old folders and create new structure
|
|
rm -rf %{_datadir}/wallpapers/Alma-$bg*
|
|
|
|
# Loop through the contents array
|
|
for content in "${contents[@]}"
|
|
do
|
|
mkdir -p %{buildroot}%{_datadir}/wallpapers/Alma-$bg/contents/${content}/
|
|
# create symlink for all sizes
|
|
for size in "${sizes[@]}"
|
|
do
|
|
ln -sf ../../../../backgrounds/${schemes[$content]} %{buildroot}%{_datadir}/wallpapers/Alma-$bg/contents/${content}/$size
|
|
done
|
|
done
|
|
|
|
# Install metadata
|
|
install -p -m 644 %{SOURCE0} %{buildroot}%{_datadir}/wallpapers/Alma-$bg/metadata.json
|
|
done
|
|
|
|
# Defaults for schemes
|
|
ln -s ./almalinux.xml %{buildroot}%{_datadir}/backgrounds/default.xml
|
|
# light scheme
|
|
ln -s ./almalinux-day.jpg %{buildroot}%{_datadir}/backgrounds/default.png
|
|
ln -s ../almalinux-day.jpg %{buildroot}%{_datadir}/backgrounds/images/default.png
|
|
ln -s ../almalinux-day.jpg %{buildroot}%{_datadir}/backgrounds/images/default-16_9.png
|
|
ln -s ../almalinux-day.jpg %{buildroot}%{_datadir}/backgrounds/images/default-16_10.png
|
|
ln -s ../almalinux-day.jpg %{buildroot}%{_datadir}/backgrounds/images/default-5_4.png
|
|
# dark scheme
|
|
ln -s ./almalinux-night.jpg %{buildroot}%{_datadir}/backgrounds/default-dark.png
|
|
ln -s ../almalinux-night.jpg %{buildroot}%{_datadir}/backgrounds/images/default-dark.png
|
|
ln -s ../almalinux-night.jpg %{buildroot}%{_datadir}/backgrounds/images/default-dark-16_9.png
|
|
ln -s ../almalinux-night.jpg %{buildroot}%{_datadir}/backgrounds/images/default-dark-16_10.png
|
|
ln -s ../almalinux-night.jpg %{buildroot}%{_datadir}/backgrounds/images/default-dark-5_4.png
|
|
|
|
%post
|
|
|
|
%postun
|
|
|
|
%posttrans
|
|
|
|
%files
|
|
%{_datadir}/wallpapers/Alma-default
|
|
%{_datadir}/backgrounds/default.xml
|
|
%{_datadir}/backgrounds/default.png
|
|
%{_datadir}/backgrounds/images/default.png
|
|
%{_datadir}/backgrounds/images/default-16_9.png
|
|
%{_datadir}/backgrounds/images/default-16_10.png
|
|
%{_datadir}/backgrounds/images/default-5_4.png
|
|
%{_datadir}/backgrounds/default-dark.png
|
|
%{_datadir}/backgrounds/images/default-dark.png
|
|
%{_datadir}/backgrounds/images/default-dark-16_9.png
|
|
%{_datadir}/backgrounds/images/default-dark-16_10.png
|
|
%{_datadir}/backgrounds/images/default-dark-5_4.png
|
|
|
|
%changelog
|
|
* Mon Jan 20 2025 Yuriy Kohut <ykohut@almalinux.org> - 100.0-1
|
|
- Initial build for AlmaLinux 10
|