diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 15:18:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 15:18:47 +0000 |
commit | d2d0e62500b55c7e30669fbc5fbd6b05eedaba8d (patch) | |
tree | e8b659eaeac65cc9c27b732fd3fc3f79aa34cd8c /debian/rules | |
parent | Adding upstream version 3.38.1. (diff) | |
download | gnome-software-debian.tar.xz gnome-software-debian.zip |
Adding debian version 3.38.1-1.debian/3.38.1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8595ee9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,112 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed + +# Fix the Flatpak plugin: https://launchpad.net/bugs/1650783 +export DEB_LDFLAGS_MAINT_STRIP := -Wl,-Bsymbolic-functions + +GS_CONFIGURE_FLAGS = \ + -Dgnome_desktop=true \ + -Dodrs=true \ + -Dostree=false \ + -Dpackagekit=true \ + -Dpackagekit_autoremove=true \ + -Drpm_ostree=false \ + -Dubuntu_reviews=false \ + +# these are conditionally re-enabled later +GS_CONFIGURE_FLAGS += \ + -Dfwupd=false \ + -Dflatpak=false \ + -Dgudev=false \ + -Dmalcontent=false \ + -Dvalgrind=false + +ifeq ($(DEB_HOST_ARCH_OS), linux) + # Enable Flatpak support on supported architectures + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64)) + GS_CONFIGURE_FLAGS += -Dflatpak=true -Dmalcontent=true + endif + + # Enable GUdev support on Linux + GS_CONFIGURE_FLAGS += -Dgudev=true + + # Enable fwupd support on Linux + GS_CONFIGURE_FLAGS += -Dfwupd=true + + # Enable snap support on supported architectures + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 ppc64el s390x)) + GS_CONFIGURE_FLAGS += -Dsnap=true + endif + + # Enable valgrind support on supported architectures + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386 mips mips64 mips64el mipsel powerpc ppc64el s390x)) + GS_CONFIGURE_FLAGS += -Dvalgrind=true + endif +endif + +DISTRO_ID = debian +FREE_REPOS = \'@DISTRO@-*-main\' +FREE_URL = https:\/\/www.debian.org\/social_contract\#guidelines +ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) + DISTRO_ID = ubuntu + FREE_REPOS = \'@DISTRO@-*-main\', \'@DISTRO@-*-universe\' + FREE_URL = https:\/\/www.ubuntu.com\/about\/about-ubuntu\/licensing +else ifeq (yes,$(shell dpkg-vendor --derives-from Tanglu && echo yes)) + DISTRO_ID = tanglu +else ifeq (yes,$(shell dpkg-vendor --derives-from PureOS && echo yes)) + DISTRO_ID = pureos +endif + +%: + dh $@ --with gnome + +override_dh_auto_configure: + dh_auto_configure -- $(GS_CONFIGURE_FLAGS) + +override_dh_auto_install: + dh_auto_install +ifneq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) + rm -f debian/tmp/usr/lib/*/gs-plugins-*/libgs_plugin_ubuntu* +endif + +override_dh_installgsettings: + sed "s#@FREE_REPOS@#$(FREE_REPOS)#g" debian/gnome-software.gsettings-override.in > debian/gnome-software.gsettings-override + sed -i "s/@DISTRO@/$(DISTRO_ID)/g" debian/gnome-software.gsettings-override + sed -i "s/@URL@/$(FREE_URL)/g" debian/gnome-software.gsettings-override + dh_installgsettings + +override_dh_install: + # Remove unused files + rm -f debian/tmp/usr/lib/*/gs-plugins-*/*.a + rm -f debian/tmp/usr/lib/*/gs-plugins-*/*.la + rm -f debian/tmp/usr/lib/*/gs-plugins-*/libgs_plugin_fedora* + rm -f debian/tmp/usr/lib/*/libgnomesoftware.a + dh_install + +override_dh_missing: + dh_missing --fail-missing + + # These files are split out to separate packages + rm -f debian/gnome-software/usr/lib/*/gs-plugins-*/libgs_plugin_flatpak* + rm -f debian/gnome-software/usr/lib/*/gs-plugins-*/libgs_plugin_snap* + rm -f debian/gnome-software/usr/share/metainfo/org.gnome.Software.Plugin.Flatpak.metainfo.xml + rm -f debian/gnome-software/usr/share/metainfo/org.gnome.Software.Plugin.Snap.metainfo.xml + +override_dh_makeshlibs: + dh_makeshlibs -Xlibgs_plugin + +# DISABLED +override_dh_auto_test: + +override_dh_gencontrol: +ifeq ($(shell dpkg-vendor --query vendor),Ubuntu) + dh_gencontrol -- -Vplugin:Recommends='gnome-software-plugin-snap [linux-any]' +else + dh_gencontrol -- -Vplugin:Suggests='gnome-software-plugin-snap [linux-any]' +endif + +override_dh_clean: + rm -f debian/gnome-software.gsettings-override + dh_clean |