aboutsummaryrefslogtreecommitdiffstats
path: root/genplatform.in
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-06-17 16:23:03 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-06-17 16:23:03 +0000
commit31d21f9ae093cd7f760464e523ca87f2bd24c6fa (patch)
tree7e4ef45a15a60657f5a5d1587d4f1da45e6c6ec3 /genplatform.in
parentb7098f1ef6f2dfbfaaf4eb3d98b1f09dd0446eb1 (diff)
downloadrpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar
rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar.gz
rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar.bz2
rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.tar.xz
rpm-setup-31d21f9ae093cd7f760464e523ca87f2bd24c6fa.zip
- push into platform all compat arch
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";
+}