debian: only install GSettings schema in pgtk build
authorXiyue Deng <manphiz@gmail.com>
Wed, 13 Mar 2024 17:22:46 +0000 (10:22 -0700)
committerRob Browning <rlb@defaultvalue.org>
Wed, 15 May 2024 05:48:21 +0000 (00:48 -0500)
Move /usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
from emacs-common to emacs-pgtk so that it won't trigger the addition
of a gsettings dependency for flavors that don't use it.

Closes: 1050393
debian/control
debian/rules

index e168717089f1d94785613cfb8e7c1aa586f7d046..3c04652c769aab2f74bcfa7e6d29c4f128336e44 100644 (file)
@@ -138,8 +138,15 @@ Provides: editor, emacs, emacsen, info-browser, mail-reader, news-reader
 Recommends: fonts-noto-color-emoji
 Suggests: emacs-common-non-dfsg
 Conflicts: emacs-gtk, emacs-lucid, emacs-nox
-Replaces: emacs-gtk, emacs-lucid, emacs-nox, emacs-bin-common (<< 1:29.2)
-Breaks: emacs-bin-common (<< 1:29.2)
+Replaces:
+ emacs-gtk,
+ emacs-lucid,
+ emacs-nox,
+ emacs-bin-common (<< 1:29.2),
+ emacs-common (<< 1:29.3+1-3~),
+Breaks:
+ emacs-bin-common (<< 1:29.2),
+ emacs-common (<< 1:29.3+1-3~),
 Description: GNU Emacs editor (with GTK+ Wayland GUI support)
  GNU Emacs is the extensible self-documenting text editor.  This
  package contains a version of Emacs with a graphical user interface
index 6250f60ea9b33e15c9bbf76dcfaf170fb8b5ad5d..a50d640e11654af0e929c0f21a0feba23ca7fa8f 100755 (executable)
@@ -425,6 +425,11 @@ override_dh_auto_install: $(autogen_install_files)
          cp -a $(install_dir_pgtk)/* $(pkgdir_common)
 
          rm -r $(pkgdir_common)/usr/bin
+         # Move to emacs-pgtk; only that pkg needs it, and it causes
+         # a gsettings-related dependency to be added (#1050393).
+         rm -r $(pkgdir_common)/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
+         # Remove and verify expectation it's empty
+         cd $(pkgdir_common)/usr/share && rmdir --parents glib-2.0/schemas
          rm \
            $(pkgdir_common)/$(libexec_dir_emacs)/hexl \
            $(pkgdir_common)/$(libexec_dir_emacs)/emacs-*.pdmp \
@@ -548,7 +553,7 @@ override_dh_auto_install: $(autogen_install_files)
 
         ##################################################
         # emacs-pgtk
-        ifneq (,$(findstring emacs, $(shell dh_listpackages)))
+        ifneq (,$(findstring emacs-pgtk, $(shell dh_listpackages)))
          $(call install_common_binpkg_bits,$(install_dir_pgtk),$(pkgdir_pgtk),emacs-pgtk,pgtk)
 
           # install desktop entries
@@ -557,6 +562,10 @@ override_dh_auto_install: $(autogen_install_files)
            debian/emacs.desktop \
            debian/emacs-term.desktop \
            $(pkgdir_pgtk)/usr/share/applications/
+         # install GSettings schema
+         install -D \
+           $(install_dir_pgtk)/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml \
+           $(pkgdir_pgtk)/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
         endif
 
         ##################################################