aboutsummaryrefslogtreecommitdiffstats
path: root/rpmbuildupdate
diff options
context:
space:
mode:
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-xrpmbuildupdate9
1 files changed, 7 insertions, 2 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index 3d0fdc8..2fa5c15 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -14,6 +14,8 @@
# TODO
# do not hardcode sudo urpmi command ( to use --deps on cluster )
+# rework configuration option
+# remove TODO and &sub call
use strict;
use AppConfig;
@@ -224,7 +226,9 @@ sub build
{
my $email;
my @l = getpwuid($<);
- $email = $ENV{EMAIL} ? $l[6]." <$ENV{EMAIL}>" : $l[6]." <$l[0]\@mandrakesoft.com>";
+ my $packager = `rpm --eval '\%packager'`;
+ chomp($packager);
+ $email = $packager ? $packager : ( $ENV{EMAIL} ? $l[6]." <$ENV{EMAIL}>" : $l[6]." <$l[0]\@mandrakesoft.com>");
$spec .= "* ".`LC_TIME=C date '+%a %b %e %Y'|tr -d '\n'`." ".$email.
" ".$newversion."-".$config{release}."\n";
$spec .= "- New release $newversion\n\n";
@@ -319,7 +323,8 @@ sub build
$found++ if(-e $basename);
chmod(0644,"${top}/SOURCES/$basename");
}
-
+
+ # TODO use output ?
open(SPECFILE, ">../SPECS/".$pkg.".spec") or die "Unable to open $pkg.spec";
print SPECFILE $spec;
close(SPECFILE);