]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Handle configure's new version style.
authorWayne Davison <wayned@samba.org>
Mon, 27 Apr 2015 00:30:15 +0000 (17:30 -0700)
committerWayne Davison <wayned@samba.org>
Fri, 1 May 2015 21:26:21 +0000 (14:26 -0700)
packaging/nightly-rsync
packaging/release-rsync

index 44e855872e0df66f29339e880ab57bf66f7a5012..6e888bea603835b8fb605910aac621edc23ee8cf 100755 (executable)
@@ -59,13 +59,13 @@ if ($make_tar) {
     my $confversion;
     open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n";
     while (<IN>) {
-       if (/^RSYNC_VERSION=(.*)/) {
+       if (/^AC_INIT\(\[rsync\],\s+\[(\d.+?)\]/) {
            $confversion = $1;
            last;
        }
     }
     close IN;
-    die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion;
+    die "Unable to find AC_INIT with version in configure.ac\n" unless defined $confversion;
 
     open(IN, '<', 'OLDNEWS') or die "Unable to open OLDNEWS: $!\n";
     $_ = <IN>;
index b15aae1f202badadec9271234865216a9d326ea8..5f77c2e8d95226fe08a9fd8b5c19a763502908c5 100755 (executable)
@@ -67,13 +67,13 @@ check_git_state($master_branch, 1, 1);
 my $confversion;
 open(IN, '<', 'configure.ac') or die $!;
 while (<IN>) {
-    if (/^RSYNC_VERSION=(.*)/) {
+    if (/^AC_INIT\(\[rsync\],\s+\[(\d.+?)\]/) {
        $confversion = $1;
        last;
     }
 }
 close IN;
-die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion;
+die "Unable to find AC_INIT with version in configure.ac\n" unless defined $confversion;
 
 open(IN, '<', 'OLDNEWS') or die $!;
 $_ = <IN>;
@@ -202,8 +202,8 @@ foreach my $fn (@tweak_files) {
     undef $/; $_ = <IN>; $/ = "\n";
     close IN;
     if ($fn =~ /configure/) {
-       s/^RSYNC_VERSION=.*/RSYNC_VERSION=$version/m
-           or die "Unable to update RSYNC_VERSION in $fn\n";
+       s/^(AC_INIT\(\[rsync\],\s+\[)\d.+?(\])/$1$version$2/m
+           or die "Unable to update AC_INIT with version in $fn\n";
     } elsif ($fn =~ /\.spec/) {
        while (my($str, $val) = each %specvars) {
            s/^\Q$str\E .*/$str $val/m