aboutsummaryrefslogtreecommitdiffstats
path: root/rpmbuildupdate
diff options
context:
space:
mode:
authorMichael Scherer <misc@mandriva.com>2004-08-30 15:17:35 +0000
committerMichael Scherer <misc@mandriva.com>2004-08-30 15:17:35 +0000
commit89e1cf9782236a7d933504694a73fb00b7dd4b40 (patch)
treea4e698e9fed2ac98edf228257eec14b5f5da066e /rpmbuildupdate
parent49c43971b70a4df332cc7b704ada23a924d95981 (diff)
downloadbootsplash-89e1cf9782236a7d933504694a73fb00b7dd4b40.tar
bootsplash-89e1cf9782236a7d933504694a73fb00b7dd4b40.tar.gz
bootsplash-89e1cf9782236a7d933504694a73fb00b7dd4b40.tar.bz2
bootsplash-89e1cf9782236a7d933504694a73fb00b7dd4b40.tar.xz
bootsplash-89e1cf9782236a7d933504694a73fb00b7dd4b40.zip
- use rpm --eval , pterjan idea
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);