Substitute GTK_BINVER_DEP as a substvar rather than using sed
authorSimon McVittie <smcv@debian.org>
Thu, 2 Nov 2023 14:22:54 +0000 (14:22 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 8 Nov 2023 15:53:36 +0000 (15:53 +0000)
This will make it easier to stop making d/control a generated file.

debian/control
debian/control.in
debian/rules

index 03d8206fa3553ac78b760104cf1cd78da5d36c2d..f13181a3f9f7b31abb499d6e4f2fe780d1c3f30c 100644 (file)
@@ -2,7 +2,7 @@ Source: gtk+3.0
 Section: libs
 Priority: optional
 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>,
                at-spi2-core <!nocheck>,
                dbus-daemon <!nocheck>,
@@ -74,7 +74,7 @@ Depends: adwaita-icon-theme,
          ${misc:Depends},
          ${shlibs:Depends},
          libgtk-3-common (>= ${source:Version})
-Provides: gtk3-binver-3.0.0
+Provides: ${gtk:BinVer}
 Recommends: libgtk-3-bin,
             librsvg2-common
 Suggests: gvfs,
@@ -93,7 +93,7 @@ Section: debian-installer
 Architecture: any
 Depends: ${misc:Depends},
          ${shlibs:Depends}
-Provides: gtk3-binver-3.0.0
+Provides: ${gtk:BinVer}
 Description: GTK graphical user interface library - minimal runtime
  This is a udeb, or a microdeb, for the debian-installer.
  .
index f653f88087ad97a2769457616e6d6d83a624072a..91f2c6622863db9d74e3cbd1ccd5e8345a99115e 100644 (file)
@@ -74,7 +74,7 @@ Depends: adwaita-icon-theme,
          ${misc:Depends},
          ${shlibs:Depends},
          @COMMON_PKG@ (>= ${source:Version})
-Provides: @GTK_BINVER_DEP@
+Provides: ${gtk:BinVer}
 Recommends: @BIN_PKG@,
             librsvg2-common
 Suggests: gvfs,
@@ -93,7 +93,7 @@ Section: debian-installer
 Architecture: any
 Depends: ${misc:Depends},
          ${shlibs:Depends}
-Provides: @GTK_BINVER_DEP@
+Provides: ${gtk:BinVer}
 Description: GTK graphical user interface library - minimal runtime
  This is a udeb, or a microdeb, for the debian-installer.
  .
index bed31c1a84a4599757239a93db98ca2cdfce0902..6a86a4d2e7ead52923c4bc5c00a67080df8c517a 100755 (executable)
@@ -67,7 +67,6 @@ debian/%: debian/%.in
                -e "s#@SONAME@#$(SONAME)#g" \
                -e "s#@APIVER@#$(APIVER)#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#@COMMON_PKG@#$(COMMON_PKG)#g" \
                -e "s#@DEV_PKG@#$(DEV_PKG)#g" \
@@ -273,11 +272,11 @@ override_dh_makeshlibs:
        dh_makeshlibs -plibgail-3-0 -- -c4
        dh_makeshlibs --remaining-packages -X$(MODULES_BASE_PATH)
 
+dpkg_gencontrol_args = -Vgtk:BinVer=$(GTK_BINVER_DEP)
 # libcloudproviders is in Ubuntu "universe"
-override_dh_gencontrol:
 ifneq ($(shell dpkg-vendor --query vendor),Ubuntu)
-       dh_gencontrol -- \
-               -VcloudProvider:Depends='libcloudproviders-dev (>= 0.3.2)'
-else
-       dh_gencontrol
+dpkg_gencontrol_args += -VcloudProvider:Depends='libcloudproviders-dev (>= 0.3.2)'
 endif
+
+override_dh_gencontrol:
+       dh_gencontrol -- $(dpkg_gencontrol_args)