aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@mandriva.com>2005-02-24 08:51:28 +0000
committerMichael Scherer <misc@mandriva.com>2005-02-24 08:51:28 +0000
commitc99be8a19c4ad1ce8c46de299552d0604d9c19f6 (patch)
treeed26803e123280ab3f598b40e0bc5d0566184b69
parent7e73440138508840a3eef740f3541ae3770bfe20 (diff)
downloadbootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar
bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar.gz
bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar.bz2
bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar.xz
bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.zip
- %mkrel integration
-rwxr-xr-xrpmbuildupdate20
1 files changed, 19 insertions, 1 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index d500a70..1cae173 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -15,6 +15,8 @@
# TODO
# do not hardcode sudo urpmi command ( to use --deps on cluster )
# rework configuration option
+# add debian url ( like gnome or rh )
+# use more Hdlist ( see Hdlist->build() )
use strict;
use AppConfig;
@@ -226,13 +228,29 @@ sub build {
}
my $tar_ball='';
+
while (<$SPECFILE>) {
# Doing a s/// version
s/\%define\s+version\s+$version/\%define version $newversion/;
s/\%define\s+release\s+$release/\%define release $newrelease/;
s/Version:\s+$version/Version: $newversion/i;
s/Release:\s+$release/Release: $newrelease/i;
-
+
+ # TODO factorisation
+ # case of %define release %mkrel 2
+ if ( /^(.*\s\%mkrel\s+)(\d+)(.*)$/ )
+ {
+ $_ = "$1" . ( $2 + 1 ) . "$3\n";
+ }
+
+ # case of %define release %mkrel %rel
+ # and %define rel 2
+ if ( /^(\%define\s+rel\s+)(\d+)(.*)$/ )
+ {
+ $_ = "$1" . ( $2 + 1 ) . "$3\n";
+ }
+
+
eval $config{execute} if $config{execute};
$spec .= $_;