summaryrefslogtreecommitdiffstats
path: root/debian/helpers/getdefault.pl
blob: 49ca758dd51d04ea3fc846bc67f8bb8893c274d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

# Get default Go implementation.

use warnings;
use strict;

use Debian::Debhelper::Dh_Lib;

if (hostarch() eq "ppc64") {
	printf("gccgo-go\n");
	exit 0;
}

my %known_packages = map { $_ => 1 } getpackages('arch');
if (exists($known_packages{'golang-go'})) {
	printf("golang-go\n");
} else {
	printf("gccgo-go\n");
}