From: Derrick Brashear Date: Tue, 15 Jan 2008 23:42:08 +0000 (+0000) Subject: redhat-makesrpm-deal-with-cellservdb-20080115 X-Git-Tag: BP-openafs-windows-kdfs-ifs~201 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=64ef3f518eee22b167ff5043b01dc1f3251f10bd redhat-makesrpm-deal-with-cellservdb-20080115 LICENSE IPL10 autofetch the CellServDB based on the spec or let one be provided --- diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index 122e798..8dc5e5c 100755 --- a/src/packaging/RedHat/makesrpm.pl +++ b/src/packaging/RedHat/makesrpm.pl @@ -16,9 +16,10 @@ my $srcball = shift; my $docball = shift; my $relnotes = shift; my $changelog = shift; +my $cellservdb = shift; if (!$srcball && !$docball) { - printf "Usage: [ []]\n"; + printf "Usage: [ [ []]]\n"; exit(1); } @@ -67,7 +68,6 @@ File::Copy::copy($docball, $tmpdir."/rpmdir/SOURCES/openafs-$version-doc.tar.bz2") or die "Unable to copy $docball into position\n"; - # Populate it with all the stuff in the packaging directory, except the # specfile my $pkgdirh = IO::Dir->new($srcdir."/src/packaging/RedHat") @@ -96,6 +96,14 @@ system("cat ".$srcdir."/src/packaging/RedHat/openafs.spec.in | ". $tmpdir."/rpmdir/SPECS/openafs.spec") == 0 or die "sed failed : $!\n"; +if ($cellservdb) { + File::Copy::copy($cellservdb, + $tmpdir."/rpmdir/SOURCES/$cellservdb") + or die "Unable to copy $cellservdb into position\n"; +} else { + system("cd ".$tmpdir."/rpmdir/SOURCES && wget `cat ".$srcdir."/src/packaging/RedHat/openafs.spec.in |grep dl/cellservdb |awk '{print \$2}'`") +} + if ($relnotes) { File::Copy::copy($relnotes, $tmpdir."/rpmdir/SOURCES/RELNOTES-$version")