From: Michael Tremer Date: Tue, 29 Aug 2023 19:34:06 +0000 (+0000) Subject: macros: Set arch in pakfire X-Git-Tag: 0.9.29~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6779a33f1638796e6b163cf0f596863720a63812;p=pakfire.git macros: Set arch in pakfire Signed-off-by: Michael Tremer --- diff --git a/macros/package-default.macro b/macros/package-default.macro index 485a05649..c708094f1 100644 --- a/macros/package-default.macro +++ b/macros/package-default.macro @@ -2,9 +2,6 @@ # Epoch information should always be set, starting with zero. epoch = 0 -# The default architecture is the architecture of the distribution. -arch = %{DISTRO_ARCH} - # Place to add URLs for sources download. source_dl = diff --git a/src/libpakfire/dist.c b/src/libpakfire/dist.c index 8becc8db3..8905cd873 100644 --- a/src/libpakfire/dist.c +++ b/src/libpakfire/dist.c @@ -71,6 +71,14 @@ static int pakfire_makefile_set_defaults(struct pakfire* pakfire, // Set vendor pakfire_parser_set(parser, NULL, "vendor", "%{DISTRO_VENDOR}", 0); + // Set arch + const char* arch = pakfire_get_arch(pakfire); + if (arch) { + r = pakfire_parser_set(parser, NULL, "arch", arch, 0); + if (r) + return r; + } + // Set DISTRO_NAME const char* name = pakfire_get_distro_name(pakfire); if (name)