Substitute GTK_BINVER_DEP as a substvar rather than using sed

This will make it easier to stop making d/control a generated file.
This commit is contained in:
Simon McVittie 2023-11-02 14:22:54 +00:00
parent fe7f8d646a
commit 385cee5c59
3 changed files with 10 additions and 11 deletions

6
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: gtk+3.0
Section: libs Section: libs
Priority: optional Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: Simon McVittie <smcv@debian.org>, Jeremy Bícha <jbicha@ubuntu.com> Uploaders: Simon McVittie <smcv@debian.org>, Dmitry Shachnev <mitya57@debian.org>, Jeremy Bícha <jbicha@ubuntu.com>
Build-Depends: adwaita-icon-theme-full <!nocheck>, Build-Depends: adwaita-icon-theme-full <!nocheck>,
at-spi2-core <!nocheck>, at-spi2-core <!nocheck>,
dbus-daemon <!nocheck>, dbus-daemon <!nocheck>,
@ -74,7 +74,7 @@ Depends: adwaita-icon-theme,
${misc:Depends}, ${misc:Depends},
${shlibs:Depends}, ${shlibs:Depends},
libgtk-3-common (>= ${source:Version}) libgtk-3-common (>= ${source:Version})
Provides: gtk3-binver-3.0.0 Provides: ${gtk:BinVer}
Recommends: libgtk-3-bin, Recommends: libgtk-3-bin,
librsvg2-common librsvg2-common
Suggests: gvfs, Suggests: gvfs,
@ -93,7 +93,7 @@ Section: debian-installer
Architecture: any Architecture: any
Depends: ${misc:Depends}, Depends: ${misc:Depends},
${shlibs:Depends} ${shlibs:Depends}
Provides: gtk3-binver-3.0.0 Provides: ${gtk:BinVer}
Description: GTK graphical user interface library - minimal runtime Description: GTK graphical user interface library - minimal runtime
This is a udeb, or a microdeb, for the debian-installer. This is a udeb, or a microdeb, for the debian-installer.
. .

4
debian/control.in vendored
View File

@ -74,7 +74,7 @@ Depends: adwaita-icon-theme,
${misc:Depends}, ${misc:Depends},
${shlibs:Depends}, ${shlibs:Depends},
@COMMON_PKG@ (>= ${source:Version}) @COMMON_PKG@ (>= ${source:Version})
Provides: @GTK_BINVER_DEP@ Provides: ${gtk:BinVer}
Recommends: @BIN_PKG@, Recommends: @BIN_PKG@,
librsvg2-common librsvg2-common
Suggests: gvfs, Suggests: gvfs,
@ -93,7 +93,7 @@ Section: debian-installer
Architecture: any Architecture: any
Depends: ${misc:Depends}, Depends: ${misc:Depends},
${shlibs:Depends} ${shlibs:Depends}
Provides: @GTK_BINVER_DEP@ Provides: ${gtk:BinVer}
Description: GTK graphical user interface library - minimal runtime Description: GTK graphical user interface library - minimal runtime
This is a udeb, or a microdeb, for the debian-installer. This is a udeb, or a microdeb, for the debian-installer.
. .

11
debian/rules vendored
View File

@ -67,7 +67,6 @@ debian/%: debian/%.in
-e "s#@SONAME@#$(SONAME)#g" \ -e "s#@SONAME@#$(SONAME)#g" \
-e "s#@APIVER@#$(APIVER)#g" \ -e "s#@APIVER@#$(APIVER)#g" \
-e "s#@VERSION@#$(DEB_VERSION_UPSTREAM)#g" \ -e "s#@VERSION@#$(DEB_VERSION_UPSTREAM)#g" \
-e "s#@GTK_BINVER_DEP@#$(GTK_BINVER_DEP)#g" \
-e "s#@SHARED_PKG@#$(SHARED_PKG)#g" \ -e "s#@SHARED_PKG@#$(SHARED_PKG)#g" \
-e "s#@COMMON_PKG@#$(COMMON_PKG)#g" \ -e "s#@COMMON_PKG@#$(COMMON_PKG)#g" \
-e "s#@DEV_PKG@#$(DEV_PKG)#g" \ -e "s#@DEV_PKG@#$(DEV_PKG)#g" \
@ -273,11 +272,11 @@ override_dh_makeshlibs:
dh_makeshlibs -plibgail-3-0 -- -c4 dh_makeshlibs -plibgail-3-0 -- -c4
dh_makeshlibs --remaining-packages -X$(MODULES_BASE_PATH) dh_makeshlibs --remaining-packages -X$(MODULES_BASE_PATH)
dpkg_gencontrol_args = -Vgtk:BinVer=$(GTK_BINVER_DEP)
# libcloudproviders is in Ubuntu "universe" # libcloudproviders is in Ubuntu "universe"
override_dh_gencontrol:
ifneq ($(shell dpkg-vendor --query vendor),Ubuntu) ifneq ($(shell dpkg-vendor --query vendor),Ubuntu)
dh_gencontrol -- \ dpkg_gencontrol_args += -VcloudProvider:Depends='libcloudproviders-dev (>= 0.3.2)'
-VcloudProvider:Depends='libcloudproviders-dev (>= 0.3.2)'
else
dh_gencontrol
endif endif
override_dh_gencontrol:
dh_gencontrol -- $(dpkg_gencontrol_args)