diff options
author | Michael Scherer <misc@mandriva.com> | 2005-02-24 08:51:28 +0000 |
---|---|---|
committer | Michael Scherer <misc@mandriva.com> | 2005-02-24 08:51:28 +0000 |
commit | c99be8a19c4ad1ce8c46de299552d0604d9c19f6 (patch) | |
tree | ed26803e123280ab3f598b40e0bc5d0566184b69 /rpmbuildupdate | |
parent | 7e73440138508840a3eef740f3541ae3770bfe20 (diff) | |
download | bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar.gz bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar.bz2 bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.tar.xz bootsplash-c99be8a19c4ad1ce8c46de299552d0604d9c19f6.zip |
- %mkrel integration
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-x | rpmbuildupdate | 20 |
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 .= $_; |