aboutsummaryrefslogtreecommitdiffstats
path: root/genplatform.in
diff options
context:
space:
mode:
Diffstat (limited to 'genplatform.in')
-rw-r--r--genplatform.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/genplatform.in b/genplatform.in
new file mode 100644
index 0000000..0a22495
--- /dev/null
+++ b/genplatform.in
@@ -0,0 +1,20 @@
+#!/usr/sbin/perl
+
+# $Id$
+use strict;
+use warnings;
+
+my @ALLARCH=qw{
+ @RPMALLARCH@
+};
+
+my $suffix = '-@RPMCANONVENDOR@-@RPMOS@-gnu';
+my $canonarch = $ARGV[0] || `uname -m`;
+chomp($canonarch);
+
+my $found = 0;
+foreach my $arch (reverse @ALLARCH) {
+ $arch eq $canonarch and $found = 1;
+ $found or next;
+ printf "$arch$suffix\n";
+}