Define a "srcdir" in the spec file and use it in the URLs for the
authorWayne Davison <wayned@samba.org>
Tue, 1 Apr 2008 19:19:36 +0000 (12:19 -0700)
committerWayne Davison <wayned@samba.org>
Tue, 1 Apr 2008 19:55:27 +0000 (12:55 -0700)
source files so that they use the unchanging src or src-preview
subdirectory location for the file.

packaging/lsb/rsync.spec
packaging/release-rsync

index dd74ac3..6cd25cd 100644 (file)
@@ -3,9 +3,10 @@ Name: rsync
 Version: 3.0.1
 %define fullversion %{version}pre3
 Release: 0.1.pre3
+%define srcdir src-previews
 Group: Applications/Internet
-Source0: http://rsync.samba.org/ftp/rsync/rsync-%{fullversion}.tar.gz
-Source1: http://rsync.samba.org/ftp/rsync/rsync-patches-%{fullversion}.tar.gz
+Source0: http://rsync.samba.org/ftp/rsync/%{srcdir}/rsync-%{fullversion}.tar.gz
+Source1: http://rsync.samba.org/ftp/rsync/%{srcdir}/rsync-patches-%{fullversion}.tar.gz
 URL: http://rsync.samba.org/
 
 Prefix: %{_prefix}
index b0c9f45..371f41d 100755 (executable)
@@ -151,7 +151,8 @@ $_ = <STDIN>;
 
 (my $finalversion = $version) =~ s/pre\d+//;
 my %specvars = ( 'Version:' => $finalversion, 'Release:' => $release,
-                '%define fullversion' => "\%{version}$pre", 'Released' => "$version." );
+                '%define fullversion' => "\%{version}$pre", 'Released' => "$version.",
+                '%define srcdir' => $srcdir );
 my @tweak_files = ( glob('packaging/*.spec'), glob('packaging/*/*.spec'), glob('*.yo'),
                    qw( configure.in rsync.h NEWS OLDNEWS options.c ) );