aboutsummaryrefslogtreecommitdiffstats
path: root/rpmgenplatform.in
blob: 885b5261f183ce86783c09629c08ffbb8ca4eeed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl

# $Id$
use strict;
use warnings;
use Getopt::Long;

GetOptions(
    'o=s' => \my $output,
);

my @ALLARCH=qw{
    noarch
    @RPMALLARCH@
};

my $anysuffix = '-.*-@RPMOS@';
my $suffix = '-@RPMCANONVENDOR@-@RPMOS@-gnu';
my $canonarch = $ARGV[0] || `uname -m`;
chomp($canonarch);

my $houtput;
if ($output && $output ne '-') {
    open($houtput, '>', $output) or die "Cannot open `$output': $!\n";
} else {
    $houtput = *STDOUT;
}

foreach my $suf ($suffix, $anysuffix) {
    my $found = 0;
    my %done = ();
    foreach my $arch (reverse @ALLARCH) {
        $arch eq $canonarch and $found = 1;
        $found or next;
        $done{$arch} and next;
        $done{$arch} = 1;
        print $houtput "$arch$suf\n";
    }
}

close($houtput) if ($houtput);
ntext:space:mode:
authorMystery Man <unknown@mandriva.org>2003-03-15 15:26:37 +0000
committerMystery Man <unknown@mandriva.org>2003-03-15 15:26:37 +0000
commit6f745bb1829160c3da8034b00ea4725faf7f4340 (patch)
treea6222c0684337a5283590c2b74bb538261086d18 /mdk-stage1/lomount.h
parentbad9352db6617835f12292f262952def1207dcb1 (diff)
downloaddrakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar
drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar.gz
drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar.bz2
drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.tar.xz
drakx-backup-do-not-use-6f745bb1829160c3da8034b00ea4725faf7f4340.zip
This commit was manufactured by cvs2svn to create tag 'V9_1_25mdk'.V9_1_25mdk
Diffstat (limited to 'mdk-stage1/lomount.h')
-rw-r--r--mdk-stage1/lomount.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/mdk-stage1/lomount.h b/mdk-stage1/lomount.h
deleted file mode 100644
index 3b8a30ac1..000000000
--- a/mdk-stage1/lomount.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Guillaume Cottenceau (gc@mandrakesoft.com)
- *
- * Copyright 2000 MandrakeSoft
- *
- * This software may be freely redistributed under the terms of the GNU
- * public license.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef LOMOUNT_H
-#define LOMOUNT_H
-
-int lomount(char *loopfile, char *where);
-int loumount(void);
-
-#endif