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);
/drakx/tree/?id=fa03d29060fdf1675d018792351308c4ba44b237'>root/mdk-stage1/ppp/chat/Makefile.sol2
blob: f566cc68b49273068a52f3d579748aaf10ccfcca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Makefile for chat on Solaris 2
#

include ../solaris/Makedefs

CFLAGS = $(COPTS) -DNO_USLEEP -DSOL2

all:	chat

chat: chat.o
	$(CC) -o chat chat.o

install: chat
	$(INSTALL) -f $(BINDIR) chat
	$(INSTALL) -m 444 -f $(MANDIR)/man8 chat.8

clean:
	rm -f *~ *.o chat