]> git.ipfire.org Git - pakfire.git/commitdiff
macros: Set arch in pakfire
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Aug 2023 19:34:06 +0000 (19:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Aug 2023 19:34:06 +0000 (19:34 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
macros/package-default.macro
src/libpakfire/dist.c

index 485a05649a6f0086af1731d49f3bf19c0f0d3805..c708094f1893ae0e34474cb36d2367ae2ccf8912 100644 (file)
@@ -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  =
 
index 8becc8db387de489e66180ecc8a9a1b956484d75..8905cd873fa0839411cfa974465a920ff27dff08 100644 (file)
@@ -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)