9
specfile = "duplicity-%s-1.spec" % version
10
print "Using specfile %s" % specfile
12
print "Syntax: %s version_number" % sys.argv[0]
15
base = ".".join(specfile.split(".")[:-1])
16
srcrpm = base+".src.rpm"
17
i386rpm = base+".i386.rpm"
18
source_rpm = base+".src.rpm"
19
tarfile = "-".join(base.split("-")[:-1]) + ".tar.gz"
21
# These assume the rpm root directory $HOME/rpm. The
22
# nonstandard location allows for building by non-root user.
23
assert not os.system("cp %s $HOME/rpm/SOURCES" % (tarfile,))
24
assert not os.system("rpm -ba --sign -vv --target i386 " + specfile)
25
assert not os.system("cp $HOME/rpm/RPMS/i386/%s ." % i386rpm)
26
assert not os.system("cp $HOME/rpm/SRPMS/%s ." % source_rpm)
28
# Old root RPM instructions
29
#assert not os.system("install -o root -g root -m 644 %s "
30
# "/usr/src/redhat/SOURCES" % (tarfile,))
31
#assert not os.system("install -o ben -g ben -m 644 "
32
# "/usr/src/redhat/RPMS/i386/%s ." % i386rpm)
33
#assert not os.system("install -o ben -g ben -m 644 "
34
# "/usr/src/redhat/SRPMS/%s ." % source_rpm)