On Sat, 22 Dec 2007, Simon Richter wrote: > the attached patch adds a new variable DEB_VARIANT to the build > environment, which can be used to build different binary packages out of > the same source package in different circumstances.
I like the idea of standardizing on a variable name to detect for which distribution/variant we're building. > --- /tmp/CTGRa1SVPh/dpkg-1.14.12/scripts/dpkg-buildpackage.pl 2007-10-18 > 00:41:02.000000000 +0200 > +++ /tmp/Zg4BEoCa5A/dpkg-1.14.12/scripts/dpkg-buildpackage.pl 2007-12-22 > 00:09:07.000000000 +0100 > @@ -48,6 +48,7 @@ > -us unsigned source. > -uc unsigned changes. > -a<arch> Debian architecture we build for (implies -d). > + -V<variant> Distribution variant we build for > -b binary-only, do not build source. } also passed to > -B binary-only, no arch-indep files. } dpkg-genchanges > -S source only, no binary files. } > @@ -106,6 +107,11 @@ > my $diffignore = ''; > my $binarytarget = 'binary'; > my $targetarch = my $targetgnusystem = ''; > +my $variant = "debian"; > + > +if (defined($ENV{'DEB_VARIANT'})) { > + $variant = $ENV{'DEB_VARIANT'}; > +} IMO the default variant should be a variable imported from the Dpkg.pm (scripts/Dpkg.pm) module much like we're doing for other variables like $dpkglibdir and so on. Otherwise it looks fine. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/