From: Wayne Davison Date: Mon, 27 Apr 2015 00:30:15 +0000 (-0700) Subject: Handle configure's new version style. X-Git-Tag: v3.1.2pre1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=461086bbe7af30177ab6f9e1958125c383892a7c;p=thirdparty%2Frsync.git Handle configure's new version style. --- diff --git a/packaging/nightly-rsync b/packaging/nightly-rsync index 44e85587..6e888bea 100755 --- a/packaging/nightly-rsync +++ b/packaging/nightly-rsync @@ -59,13 +59,13 @@ if ($make_tar) { my $confversion; open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n"; while () { - 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"; $_ = ; diff --git a/packaging/release-rsync b/packaging/release-rsync index b15aae1f..5f77c2e8 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -67,13 +67,13 @@ check_git_state($master_branch, 1, 1); my $confversion; open(IN, '<', 'configure.ac') or die $!; while () { - 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 $!; $_ = ; @@ -202,8 +202,8 @@ foreach my $fn (@tweak_files) { undef $/; $_ = ; $/ = "\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