Commit f7a6f269 authored by ben's avatar ben

Thought about making separate redhat 7.x RPMs, now I don't think I'll bother


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@38 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 1383ebf1
......@@ -10,7 +10,7 @@ filelist = [SourceDir + "/rdiff-backup", "CHANGELOG",
# Various details about the files must also be specified by the rpm
# spec template.
spec_template = "dist/rdiff-backup.spec"
redhat_spec_template = "dist/rdiff-backup.rh7x.spec"
def GetVersion():
"""Return version string by reading in ./rdiff-backup"""
......@@ -51,14 +51,20 @@ def MakeTar(version):
def MakeSpecFile(version):
"""Create spec file using spec template"""
specfile = "rdiff-backup-%s-1.spec" % version
def helper(spec_template, specfile):
"""Added now that there are special redhat rpms"""
outfp = open(specfile, "w")
outfp.write("Version: %s\n" % version)
infp = open(spec_template, "r")
outfp.write(infp.read())
infp.close()
outfp.close()
return specfile
specfile = "rdiff-backup-%s-1.spec" % version
redhat_specfile = "rdiff-backup-%s-1.rh7x.spec" % version
helper(spec_template, specfile)
helper(redhat_spec_template, redhat_specfile)
return (specfile, redhat_specfile)
def Main():
cwd = os.getcwd()
......@@ -69,8 +75,8 @@ def Main():
print "Processing version " + version
tarfile = MakeTar(version)
print "Made tar file " + tarfile
specfile = MakeSpecFile(version)
print "Made specfile " + specfile
specfiles = MakeSpecFile(version)
print "Made specfiles %s and %s" % specfiles
if __name__ == "__main__": Main()
......@@ -13,7 +13,8 @@ def GetVersion():
if len(sys.argv) == 1:
specfile = "rdiff-backup-%s-1.spec" % GetVersion()
version = GetVersion()
specfile = "rdiff-backup-%s-1.spec" % version
print "Using specfile %s" % specfile
elif len(sys.argv) == 2:
specfile = sys.argv[1]
......@@ -28,9 +29,16 @@ srcrpm = base+".src.rpm"
noarchrpm = base+".noarch.rpm"
tarfile = "-".join(base.split("-")[:-1]) + ".tar.gz"
os.system("install -o root -g root -m 644 %s /usr/src/redhat/SOURCES" %
tarfile)
redhat_srcrpm = base+"rh7x.src.rpm"
redhat_noarchrpm = base+"rh7x.noarch.rpm"
redhat_patch = "rdiff-backup-rh7x.patch"
redhat_specfile = "rdiff-backup-%s-1.rh7x.spec" % version
os.system("install -o root -g root -m 644 %s %s /usr/src/redhat/SOURCES" %
tarfile, redhat_patch)
os.system("rpm -ba --sign -vv --target noarch " + specfile)
os.system("rpm -ba --sign -vv --target noarch.rh7x " + redhat
#os.system("install -o ben -g ben -m 644 /usr/src/redhat/SRPMS/%s ." % srcrpm)
os.system("install -o ben -g ben -m 644 /usr/src/redhat/RPMS/noarch/%s ." %
noarchrpm)
......@@ -7,6 +7,7 @@ Copyright: GPL
Group: Applications/Archiving
BuildRoot: %{_tmppath}/%{name}-root
requires: librsync, python2 >= 2.2
Patch: rdiff-backup-rh7x.patch
%description
rdiff-backup is a script, written in Python, that backs up one
......@@ -22,7 +23,7 @@ differences from the previous backup will be transmitted.
%prep
%setup
%patch
%build
%install
......@@ -42,6 +43,8 @@ install -m 644 rdiff-backup.1 $RPM_BUILD_ROOT/usr/share/man/man1/rdiff-backup.1
%doc CHANGELOG COPYING README FAQ.html
%changelog
* Sat Apr 6 2002 Ben Escoto <bescoto@stanford.edu>
- Made new version for Redhat 7.x series
* Sun Nov 4 2001 Ben Escoto <bescoto@stanford.edu>
- Initial RPM
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment