From 727cb39d80b00b8a721a87a54ca9effa2cba220a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 9 Jan 2025 01:25:09 -0500 Subject: [PATCH 1/5] Rewrite Makefile install scripting - Use recommended[1] recursion via phony subdir rules and `$(MAKE) -C`, instead of scripted loop. Install can now be run in parallel with `make install -jN`. - Move many variables to top-level makefile, and `export` to sub-makes. - Break each Makefile's `install` rule up into `install-base` plus a set of `install-(DE)` rules, one for each Desktop Environment. All `install-*` rules are prerequisites of the main `install` rule. - Use ImageMagick to process PNG-format images during install, to ensure alpha channels are removed to avoid breaking GNOME Shell timed background transitions. - Update RPM spec file to add ImageMagick as a BuildRequires. [1]: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html --- Makefile | 47 ++++++++++++++++---- default/Makefile | 100 +++++++++++++++++++++++++------------------ extras/Makefile | 90 +++++++++++++++++++++++--------------- f41-backgrounds.spec | 1 + 4 files changed, 153 insertions(+), 85 deletions(-) diff --git a/Makefile b/Makefile index c88ed12..10f1163 100644 --- a/Makefile +++ b/Makefile @@ -2,15 +2,47 @@ SUBDIRS = default VERSION = 41.0.0 NAME = f41-backgrounds-$(VERSION) +WP_NAME=f41 +WP_BIGNAME=F41 + +WP_INSTALL_ROOT=$(DESTDIR)/usr/share +WP_REL_PATH=backgrounds/$(WP_NAME) + +WP_BG_ROOT=$(WP_INSTALL_ROOT)/$(WP_REL_PATH) +GNOME_BG_DIR=$(WP_INSTALL_ROOT)/gnome-background-properties +KDE_BG_DIR=$(WP_INSTALL_ROOT)/wallpapers/$(WP_BIGNAME) +MATE_BG_DIR=$(WP_INSTALL_ROOT)/mate-background-properties +MATE_BG_DEFAULT=$(WP_INSTALL_ROOT)/backgrounds/mate +PLASMA_BG_DIR=$(WP_INSTALL_ROOT)/plasma/desktoptheme +XFCE_BG_DIR=$(WP_INSTALL_ROOT)/xfce4/backdrops + +MAGICK=/usr/bin/magick +MKDIR=/bin/mkdir -p +INSTALL=/usr/bin/install -p -m644 -D +LN_S=/bin/ln -s +CP=/bin/cp -p +TOUCH_R=/bin/touch -r +BASENAME=/bin/basename + +RESOLUTIONS= \ + 1280x1024 640x480 800x600 1024x768 1152x864 1200x900 \ + 1280x960 1440x1080 1600x1200 1600x1280 1920x1440 2048x1536 \ + 800x480 1024x600 1152x720 1280x720 1280x768 1280x800 \ + 1366x768 1440x900 1680x1050 1920x1080 1920x1200 1920x1280 \ + 2160x1440 2304x1440 2560x1440 2560x1600 2960x1440 \ + 3000x2000 3200x1800 3440x1440 3840x2160 + +# Pass all variables to sub-makes +export + +.PHONY: $(SUBDIRS) install all + all: - @for i in $(SUBDIRS) ; do \ - (cd $$i; $(MAKE)) ;\ - done; -install: - @for i in $(SUBDIRS) ; do \ - (cd $$i; $(MAKE) install) ; \ - done; +$(SUBDIRS): + $(MAKE) -C $@ install + +install: $(SUBDIRS) dist: mkdir -p $(NAME) @@ -22,4 +54,3 @@ dist: cp -a extras $(NAME) tar -c --xz -f $(NAME).tar.xz $(NAME) rm -rf $(NAME) - diff --git a/default/Makefile b/default/Makefile index 79e6a63..9b0c321 100644 --- a/default/Makefile +++ b/default/Makefile @@ -1,56 +1,72 @@ -WP_NAME=f41 -WP_BIGNAME=F41 -WP_DIR=$(DESTDIR)/usr/share/backgrounds/$(WP_NAME) -WP_DIR_LN=/usr/share/backgrounds/$(WP_NAME) -GNOME_BG_DIR=$(DESTDIR)/usr/share/gnome-background-properties -KDE_BG_DIR=$(DESTDIR)/usr/share/wallpapers -MATE_BG_DIR=$(DESTDIR)/usr/share/mate-background-properties -MATE_BG_DEFAULT=$(DESTDIR)/usr/share/backgrounds/mate -PLASMA_BG_DIR=$(DESTDIR)/usr/share/plasma/desktoptheme -XFCE_BG_DIR=$(DESTDIR)/usr/share/xfce4/backdrops -INKSCAPE=/usr/bin/inkscape -MKDIR=/bin/mkdir -p -INSTALL=/usr/bin/install -p -m644 -D -LN_S=/bin/ln -s -CP=/bin/cp -p +WP_BG_DIR=$(WP_BG_ROOT)/default +WP_BG_REL=$(WP_REL_PATH)/default + +THEMES_PNG= \ + $(WP_NAME)-01-day.png \ + $(WP_NAME)-01-night.png + +WP_PNG_DESTS=$(THEMES_PNG:%=$(WP_BG_DIR)/%) +XFCE_PNG_DESTS=$(THEMES_PNG:%=$(XFCE_BG_DIR)/%) + +INSTALL_RULES= \ + install-base \ + install-gnome \ + install-budgie \ + install-kde \ + install-mate \ + install-xfce + +.PHONY: $(WP_PNG_DESTS) $(XFCE_PNG_DESTS) $(INSTALL_RULES) \ + all install + +$(WP_PNG_DESTS): OUTNAME = $(shell $(BASENAME) $@) +$(WP_PNG_DESTS): + $(MKDIR) $(WP_BG_DIR) + #~ Convert to RGB-format file (no alpha) and fix timestamp + $(MAGICK) $(OUTNAME) -alpha off $@ + $(TOUCH_R) $(OUTNAME) $@ + +$(XFCE_PNG_DESTS): OUTNAME = $(shell $(BASENAME) $@) +$(XFCE_PNG_DESTS): + $(MKDIR) $(XFCE_BG_DIR) + #~ Convert to RGB-format file (no alpha) and fix timestamp + $(MAGICK) $(OUTNAME) -alpha off $@ + $(TOUCH_R) $(OUTNAME) $@ all: -install: - $(MKDIR) $(WP_DIR)/default - $(INSTALL) $(WP_NAME).xml $(WP_DIR)/default/$(WP_NAME).xml - #~ Base background - for tod in 01-day 01-night; do \ - $(INSTALL) $(WP_NAME)-$${tod}.png $(WP_DIR)/default/$(WP_NAME)-$${tod}.png ; \ - done; - +install: $(INSTALL_RULES) + +install-base: $(WP_PNG_DESTS) + $(MKDIR) $(WP_BG_DIR) + $(INSTALL) $(WP_NAME).xml $(WP_BG_DIR)/$(WP_NAME).xml + #~ Base background images done by WP_PNG_DESTS rules + +install-gnome: #~ GNOME background $(MKDIR) $(GNOME_BG_DIR) $(INSTALL) gnome-backgrounds-$(WP_NAME).xml $(GNOME_BG_DIR)/$(WP_NAME).xml + +install-budgie: #~ Budgie background $(INSTALL) budgie-backgrounds-$(WP_NAME).xml $(GNOME_BG_DIR)/$(WP_NAME)-budgie.xml - + +install-kde: #~ KDE and Plasma background - $(MKDIR) $(KDE_BG_DIR)/$(WP_BIGNAME)/contents/images - $(MKDIR) $(KDE_BG_DIR)/$(WP_BIGNAME)/contents/images_dark - $(INSTALL) $(WP_NAME)-metadata.json $(KDE_BG_DIR)/$(WP_BIGNAME)/metadata.json - for res in 1280x1024 \ - 640x480 800x600 1024x768 1152x864 1200x900 1280x960 1440x1080 1600x1200 1600x1280 1920x1440 2048x1536 \ - 800x480 1024x600 1152x720 1280x720 1280x768 1280x800 1366x768 1440x900 1680x1050 1920x1080 1920x1200 1920x1280 \ - 2160x1440 2304x1440 2560x1440 2560x1600 2960x1440 3000x2000 3200x1800 3440x1440 3840x2160; do \ - $(LN_S) ../../../../backgrounds/$(WP_NAME)/default/$(WP_NAME)-01-day.png \ - $(KDE_BG_DIR)/$(WP_BIGNAME)/contents/images/$${res}.png ; \ - $(LN_S) ../../../../backgrounds/$(WP_NAME)/default/$(WP_NAME)-01-night.png \ - $(KDE_BG_DIR)/$(WP_BIGNAME)/contents/images_dark/$${res}.png ; \ + $(MKDIR) $(KDE_BG_DIR)/contents/images + $(MKDIR) $(KDE_BG_DIR)/contents/images_dark + $(INSTALL) $(WP_NAME)-metadata.json $(KDE_BG_DIR)/metadata.json + for res in $(RESOLUTIONS); do \ + $(LN_S) ../../../../$(WP_BG_REL)/$(WP_NAME)-01-day.png \ + $(KDE_BG_DIR)/contents/images/$${res}.png ; \ + $(LN_S) ../../../../$(WP_BG_REL)/$(WP_NAME)-01-night.png \ + $(KDE_BG_DIR)/contents/images_dark/$${res}.png ; \ done; +install-mate: #~ MATE background $(MKDIR) $(MATE_BG_DIR) $(INSTALL) mate-backgrounds-$(WP_NAME).xml $(MATE_BG_DIR)/$(WP_NAME).xml - - #~ XFCE background - $(MKDIR) $(XFCE_BG_DIR) - $(INSTALL) $(WP_NAME)-01-day.png \ - $(XFCE_BG_DIR)/$(WP_NAME).png - $(INSTALL) $(WP_NAME)-01-night.png \ - $(XFCE_BG_DIR)/$(WP_NAME)-01-night.png + +install-xfce: $(XFCE_PNG_DESTS) + #~ XFCE background images done by XFCE_PNG_DESTS rules diff --git a/extras/Makefile b/extras/Makefile index a9151ab..1c2d753 100644 --- a/extras/Makefile +++ b/extras/Makefile @@ -1,54 +1,74 @@ -F41_DIR=$(DESTDIR)/usr/share/backgrounds/f41 -GNOME_BG_DIR=$(DESTDIR)/usr/share/gnome-background-properties -MATE_BG_DIR=$(DESTDIR)/usr/share/mate-background-properties -KDE_BG_DIR=$(DESTDIR)/usr/share/wallpapers/ -XFCE_BG_DIR=$(DESTDIR)/usr/share/xfce4/backdrops -MKDIR=/bin/mkdir -p -PNGQUANT=/usr/bin/pngquant -INSTALL=/usr/bin/install -p -m644 -D -LN_S=/bin/ln -s +WP_BG_DIR=$(WP_BG_ROOT)/extras +WP_BG_REL=$(WP_REL_PATH)/extras THEMES_JPG= -THEMES_PNG=01-dark-blue\ +THEMES_PNG= \ + 01-dark-blue \ 01-light-blue +WP_PNG_DESTS=$(THEMES_PNG:%=$(WP_BG_DIR)/%.png) + +INSTALL_RULES= \ + install-base \ + install-gnome \ + install-kde \ + install-mate \ + install-xfce + +.PHONY: $(WP_PNG_DESTS) $(INSTALL_RULES) all install + +$(WP_PNG_DESTS): OUTNAME = $(shell $(BASENAME) $@) +$(WP_PNG_DESTS): + $(MKDIR) $(WP_BG_DIR) + #~ Convert to RGB-format file (no alpha) and fix timestamp + $(MAGICK) $(OUTNAME) -alpha off $@ + $(TOUCH_R) $(OUTNAME) $@ + all: -install: - $(MKDIR) $(F41_DIR)/extras +install: $(INSTALL_RULES) + +install-base: $(WP_PNG_DESTS) + $(MKDIR) $(WP_BG_DIR) + $(INSTALL) f41-extras.xml $(WP_BG_DIR)/f41-extras.xml + for theme in $(THEMES_JPG); do \ + $(INSTALL) $${theme}.jpg $(WP_BG_DIR)/$${theme}.jpg; \ + done + #~ Base background PNG images done by WP_PNG_DESTS rules + +install-gnome: $(MKDIR) $(GNOME_BG_DIR) + $(INSTALL) gnome-backgrounds-f41-extras.xml $(GNOME_BG_DIR)/f41-extras.xml + +install-mate: $(MKDIR) $(MATE_BG_DIR) + $(INSTALL) mate-backgrounds-f41-extras.xml $(MATE_BG_DIR)/f41-extras.xml + +install-xfce: $(MKDIR) $(XFCE_BG_DIR) - $(INSTALL) f41-extras.xml $(F41_DIR)/extras/f41-extras.xml - $(INSTALL) gnome-backgrounds-f41-extras.xml $(GNOME_BG_DIR)/f41-extras.xml - $(INSTALL) mate-backgrounds-f41-extras.xml $(MATE_BG_DIR)/f41-extras.xml + for theme in $(THEMES_JPG); do \ + $(LN_S) ../../$(WP_BG_REL)/$${theme}.jpg \ + $(XFCE_BG_DIR)/f41-$${theme}.jpg ;\ + done + for theme in $(THEMES_PNG); do \ + $(LN_S) ../../$(WP_BG_REL)/$${theme}.png \ + $(XFCE_BG_DIR)/f41-$${theme}.png ; \ + done + +install-kde: for theme in $(THEMES_JPG) ; do \ - $(INSTALL) $${theme}.jpg $(F41_DIR)/extras/$${theme}.jpg ;\ $(MKDIR) $(KDE_BG_DIR)/F41_$${theme}/contents/images ;\ $(INSTALL) $${theme}.desktop $(KDE_BG_DIR)/F41_$${theme}/metadata.desktop ; \ - for res in 1280x1024 \ - 640x480 800x600 1024x768 1152x864 1200x900 1280x960 1440x1080 1600x1200 1600x1280 1920x1440 2048x1536 \ - 800x480 1024x600 1152x720 1280x720 1280x768 1280x800 1366x768 1440x900 1680x1050 1920x1080 1920x1200 \ - 2160x1440 2304x1440 2560x1440 2560x1600 2960x1440 3000x2000 3200x1800 3440x1440 3840x2160; do \ - $(LN_S) ../../../../backgrounds/f41/extras/$${theme}.jpg \ - $(KDE_BG_DIR)/F41_$${theme}/contents/images/$${res}.jpg ; \ + for res in $(RESOLUTIONS); do \ + $(LN_S) ../../../../../$(WP_BG_REL)/$${theme}.jpg \ + $(KDE_BG_DIR)/F41_$${theme}/contents/images/$${res}.jpg ; \ done; \ - $(LN_S) ../../backgrounds/f41/extras/$${theme}.jpg \ - $(XFCE_BG_DIR)/f41-$${theme}.jpg ;\ done; - #~ Compress to 8-bit png format for theme in $(THEMES_PNG) ; do \ - $(INSTALL) $${theme}.png $(F41_DIR)/extras/$${theme}.png ; \ $(MKDIR) $(KDE_BG_DIR)/F41_$${theme}/contents/images ;\ $(INSTALL) $${theme}.desktop $(KDE_BG_DIR)/F41_$${theme}/metadata.desktop ; \ - for res in 1280x1024 \ - 640x480 800x600 1024x768 1152x864 1200x900 1280x960 1440x1080 1600x1200 1600x1280 1920x1440 2048x1536 \ - 800x480 1024x600 1152x720 1280x720 1280x768 1280x800 1366x768 1440x900 1680x1050 1920x1080 1920x1200 \ - 2160x1440 2304x1440 2560x1440 2560x1600 2960x1440 3000x2000 3200x1800 3440x1440 3840x2160; do \ - $(LN_S) ../../../../backgrounds/f41/extras/$${theme}.png \ - $(KDE_BG_DIR)/F41_$${theme}/contents/images/$${res}.png ; \ + for res in $(RESOLUTIONS); do \ + $(LN_S) ../../../../../$(WP_BG_REL)/$${theme}.png \ + $(KDE_BG_DIR)/F41_$${theme}/contents/images/$${res}.png ; \ done; \ - $(LN_S) ../../backgrounds/f41/extras/$${theme}.png \ - $(XFCE_BG_DIR)/f41-$${theme}.png ;\ done; - diff --git a/f41-backgrounds.spec b/f41-backgrounds.spec index f8a0967..eda457f 100644 --- a/f41-backgrounds.spec +++ b/f41-backgrounds.spec @@ -19,6 +19,7 @@ BuildArch: noarch BuildRequires: kde-filesystem BuildRequires: make +BuildRequires: ImageMagick Requires: %{name}-budgie = %{version}-%{release} Requires: %{name}-gnome = %{version}-%{release} From f886182da70f500744559a3b14857cce861c29dc Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 9 Jan 2025 01:36:24 -0500 Subject: [PATCH 2/5] Update spec file for repo changes --- f41-backgrounds.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/f41-backgrounds.spec b/f41-backgrounds.spec index eda457f..c4bbd6c 100644 --- a/f41-backgrounds.spec +++ b/f41-backgrounds.spec @@ -127,7 +127,7 @@ This package contains supplemental wallpapers for XFCE %endif %prep -%autosetup -n %{name} +%autosetup -n %{name}-%{version} %build @@ -141,7 +141,7 @@ This package contains supplemental wallpapers for XFCE %doc %files base -%license COPYING Attribution +%license CC-BY-SA-4.0 Attribution %dir %{_datadir}/backgrounds/%{bgname} %dir %{_datadir}/backgrounds/%{bgname}/default %{_datadir}/backgrounds/%{bgname}/default/%{bgname}*.{png,xml} From 83f545fb3827a59a88c3699120b23d192b792c9e Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 9 Jan 2025 01:44:49 -0500 Subject: [PATCH 3/5] Fix KDE install paths --- Makefile | 2 +- default/Makefile | 1 + extras/Makefile | 16 ++++++++-------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 10f1163..62cccb1 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ WP_INSTALL_ROOT=$(DESTDIR)/usr/share WP_REL_PATH=backgrounds/$(WP_NAME) WP_BG_ROOT=$(WP_INSTALL_ROOT)/$(WP_REL_PATH) +KDE_BG_ROOT=$(WP_INSTALL_ROOT)/wallpapers/ GNOME_BG_DIR=$(WP_INSTALL_ROOT)/gnome-background-properties -KDE_BG_DIR=$(WP_INSTALL_ROOT)/wallpapers/$(WP_BIGNAME) MATE_BG_DIR=$(WP_INSTALL_ROOT)/mate-background-properties MATE_BG_DEFAULT=$(WP_INSTALL_ROOT)/backgrounds/mate PLASMA_BG_DIR=$(WP_INSTALL_ROOT)/plasma/desktoptheme diff --git a/default/Makefile b/default/Makefile index 9b0c321..74bae37 100644 --- a/default/Makefile +++ b/default/Makefile @@ -1,5 +1,6 @@ WP_BG_DIR=$(WP_BG_ROOT)/default WP_BG_REL=$(WP_REL_PATH)/default +KDE_BG_DIR=$(KDE_BG_ROOT)/$(WP_BIGNAME) THEMES_PNG= \ $(WP_NAME)-01-day.png \ diff --git a/extras/Makefile b/extras/Makefile index 1c2d753..be684de 100644 --- a/extras/Makefile +++ b/extras/Makefile @@ -57,18 +57,18 @@ install-xfce: install-kde: for theme in $(THEMES_JPG) ; do \ - $(MKDIR) $(KDE_BG_DIR)/F41_$${theme}/contents/images ;\ - $(INSTALL) $${theme}.desktop $(KDE_BG_DIR)/F41_$${theme}/metadata.desktop ; \ + $(MKDIR) $(KDE_BG_ROOT)/F41_$${theme}/contents/images ;\ + $(INSTALL) $${theme}.desktop $(KDE_BG_ROOT)/F41_$${theme}/metadata.desktop ; \ for res in $(RESOLUTIONS); do \ - $(LN_S) ../../../../../$(WP_BG_REL)/$${theme}.jpg \ - $(KDE_BG_DIR)/F41_$${theme}/contents/images/$${res}.jpg ; \ + $(LN_S) ../../../../$(WP_BG_REL)/$${theme}.jpg \ + $(KDE_BG_ROOT)/F41_$${theme}/contents/images/$${res}.jpg ; \ done; \ done; for theme in $(THEMES_PNG) ; do \ - $(MKDIR) $(KDE_BG_DIR)/F41_$${theme}/contents/images ;\ - $(INSTALL) $${theme}.desktop $(KDE_BG_DIR)/F41_$${theme}/metadata.desktop ; \ + $(MKDIR) $(KDE_BG_ROOT)/F41_$${theme}/contents/images ;\ + $(INSTALL) $${theme}.desktop $(KDE_BG_ROOT)/F41_$${theme}/metadata.desktop ; \ for res in $(RESOLUTIONS); do \ - $(LN_S) ../../../../../$(WP_BG_REL)/$${theme}.png \ - $(KDE_BG_DIR)/F41_$${theme}/contents/images/$${res}.png ; \ + $(LN_S) ../../../../$(WP_BG_REL)/$${theme}.png \ + $(KDE_BG_ROOT)/F41_$${theme}/contents/images/$${res}.png ; \ done; \ done; From b557fcb90b67d8cb2ed4ab15f9d97a883741026a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 9 Jan 2025 01:55:01 -0500 Subject: [PATCH 4/5] XFCE: Rename background files for consistency The XFCE files are all installed to the same directory. Previously, the Makefile installed the images/symlinks as follows: - From the default/ directory: 01-day.png was installed (by copying) as f41.png 01-night.png was installed (by copying) as f41-01-night.png - From the extras/ directory: 01-dark-blue.png was symlinked as f41-01-dark-blue.png 01-light-blue.png was symlinked as f41-01-light-blue.png ...And then in the spec file, only f41.png was packaged in f41-backgrounds-xfce4, with the rest (including the default dark image) going into f41-backgrounds-extras-xfce4. Because the ImageMagick processing rules don't lend themselves to renaming the output file, and because it doesn't really make sense to package only _one_ of the two default theme files in the -xfce4 subpackage, this commit changes the install so that: 01-day.png is installed as f41-01-day.png 01-night.png is installed as f41-01-night.png 01-dark-blue.png is symlinked as f41-extras-01-dark-blue.png 01-light-blue.png is symlinked as f41-extras-01-light-blue.png The spec file will now create the main -xfce subpackage to contain f41*.png, _excluding_ f41-extras*.png. Those files will go into the -extras-xfce subpackage instead. This seems more consistent, and doesn't relegate the f41 dark background to second-class status. --- extras/Makefile | 4 ++-- f41-backgrounds.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extras/Makefile b/extras/Makefile index be684de..3916d25 100644 --- a/extras/Makefile +++ b/extras/Makefile @@ -48,11 +48,11 @@ install-xfce: $(MKDIR) $(XFCE_BG_DIR) for theme in $(THEMES_JPG); do \ $(LN_S) ../../$(WP_BG_REL)/$${theme}.jpg \ - $(XFCE_BG_DIR)/f41-$${theme}.jpg ;\ + $(XFCE_BG_DIR)/f41-extras-$${theme}.jpg ;\ done for theme in $(THEMES_PNG); do \ $(LN_S) ../../$(WP_BG_REL)/$${theme}.png \ - $(XFCE_BG_DIR)/f41-$${theme}.png ; \ + $(XFCE_BG_DIR)/f41-extras-$${theme}.png ; \ done install-kde: diff --git a/f41-backgrounds.spec b/f41-backgrounds.spec index c4bbd6c..4e548cc 100644 --- a/f41-backgrounds.spec +++ b/f41-backgrounds.spec @@ -161,7 +161,10 @@ This package contains supplemental wallpapers for XFCE %dir %{_datadir}/mate-background-properties/ %files xfce -%{_datadir}/xfce4/backdrops/%{bgname}.png +%{_datadir}/xfce4/backdrops/%{bgname}*.png +%if %{with_extras} +%exclude %{_datadir}/xfce4/backdrops/%{bgname}-extras*.png +%endif %dir %{_datadir}/xfce4/ %dir %{_datadir}/xfce4/backdrops/ @@ -180,7 +183,7 @@ This package contains supplemental wallpapers for XFCE %{_datadir}/mate-background-properties/%{bgname}-extras.xml %files extras-xfce -%{_datadir}/xfce4/backdrops/ +%{_datadir}/xfce4/backdrops/%{bgname}-extras*.png %endif %changelog From 3b2ab210fd27a430d2fb5ba5ef8ff9f1c89ec5f7 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 9 Jan 2025 02:16:04 -0500 Subject: [PATCH 5/5] Specfile: Turn with_extras into a real bcond_with --- f41-backgrounds.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/f41-backgrounds.spec b/f41-backgrounds.spec index 4e548cc..926292a 100644 --- a/f41-backgrounds.spec +++ b/f41-backgrounds.spec @@ -2,8 +2,8 @@ %global Bg_Name F41 %global bgname %(t="%{Bg_Name}";echo ${t,,}) -# Disable Extras subpackages -%global with_extras 0 +# Disable Extras subpackages by default +%bcond_with extras Name: %{bgname}-backgrounds Version: %{relnum}.0.0 @@ -83,7 +83,7 @@ Requires: xfdesktop This package contains XFCE4 desktop background for the Fedora %{relnum} default theme. -%if %{with_extras} +%if %{with extras} %package extras-base Summary: Base images for Extras Backgrounds License: CC-BY-4.0 AND CC-BY-SA-4.0 AND CC0-1.0 @@ -131,11 +131,11 @@ This package contains supplemental wallpapers for XFCE %build -%make_build +%make_build %{?with_extras:SUBDIRS="default extras"} %install -%make_install +%make_install %{?with_extras:SUBDIRS="default extras"} %files %doc @@ -162,15 +162,15 @@ This package contains supplemental wallpapers for XFCE %files xfce %{_datadir}/xfce4/backdrops/%{bgname}*.png -%if %{with_extras} +%if %{with extras} %exclude %{_datadir}/xfce4/backdrops/%{bgname}-extras*.png %endif %dir %{_datadir}/xfce4/ %dir %{_datadir}/xfce4/backdrops/ -%if %{with_extras} +%if %{with extras} %files extras-base -%license COPYING +%license CC-BY-SA-4.0 Attribution %{_datadir}/backgrounds/%{bgname}/extras/ %files extras-gnome