aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/templates/submit_package.pl
blob: 2b0e966d45b6e1e8eb0c381553180a360fdaaff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
use strict;
use warnings;

my $svn_server = 'svn.<%= domain %>';
my $packagersgroup="<%= scope.lookupvar('buildsystem::base::packagers_group') %>";

my $login = getpwuid($<);
my (undef, undef, undef, $members) = getgrnam $packagersgroup;
if (not $members =~ /\b$login\b/) {
	print "You are not in $packagersgroup group\n";
	exit 1;
}

# for bug 914 
# https://bugs.mageia.org/show_bug.cgi?id=914
map { $_ =~ s|^svn\+ssh://$svn_server/|svn://$svn_server/| } @ARGV; 
exec "/usr/share/mgarepo/create-srpm", @ARGV;