summaryrefslogtreecommitdiff
path: root/rdiff-backup
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-06-27 20:19:55 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-06-27 20:19:55 +0000
commit3f44ce4239acd911683f05266934aa136538a3d9 (patch)
tree6b901aa34431f57e6fbbb55dc3fd6bce23b1548d /rdiff-backup
parentde108cffeb5fdaef8b1c0e93886a526fc76cc6ee (diff)
downloadrdiff-backup-3f44ce4239acd911683f05266934aa136538a3d9.tar.gz
Modified distribution scripts to automatically add version number to
packages. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@148 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup')
-rwxr-xr-xrdiff-backup/dist/makedist15
-rwxr-xr-xrdiff-backup/dist/makerpm18
-rw-r--r--rdiff-backup/dist/rdiff-backup.spec2
-rwxr-xr-xrdiff-backup/dist/setup.py5
4 files changed, 17 insertions, 23 deletions
diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist
index 3f57762..5719ebe 100755
--- a/rdiff-backup/dist/makedist
+++ b/rdiff-backup/dist/makedist
@@ -83,18 +83,20 @@ def MakeTar():
except OSError: pass
os.mkdir(tardir)
for filename in ["CHANGELOG", "COPYING", "README", "FAQ.html",
- SourceDir + "/cmodule.c", DistDir + "/setup.py"]:
+ SourceDir + "/cmodule.c",
+ SourceDir + "/_librsyncmodule.c",
+ DistDir + "/setup.py"]:
assert not os.system("cp %s %s" % (filename, tardir)), filename
os.mkdir(tardir+"/rdiff_backup")
for filename in ["connection.py", "destructive_stepping.py",
"FilenameMapping.py", "Hardlink.py",
"highlevel.py", "increment.py", "__init__.py",
- "iterfile.py", "lazy.py", "log.py", "Main.py",
- "manage.py", "MiscStats.py", "Rdiff.py",
- "restore.py", "rlist.py", "robust.py",
- "rorpiter.py", "rpath.py", "selection.py",
- "SetConnections.py", "static.py",
+ "iterfile.py", "lazy.py", "librsync.py",
+ "log.py", "Main.py", "manage.py", "MiscStats.py",
+ "Rdiff.py", "restore.py", "rlist.py",
+ "robust.py", "rorpiter.py", "rpath.py",
+ "selection.py", "SetConnections.py", "static.py",
"statistics.py", "Time.py"]:
assert not os.system("cp %s/%s %s/rdiff_backup" %
(SourceDir, filename, tardir)), filename
@@ -102,6 +104,7 @@ def MakeTar():
VersionedCopy("%s/Globals.py" % (SourceDir,),
"%s/rdiff_backup/Globals.py" % (tardir,))
VersionedCopy("rdiff-backup", "%s/rdiff-backup" % (tardir,))
+ VersionedCopy(DistDir + "/setup.py", "%s/setup.py" % (tardir,))
os.chmod(os.path.join(tardir, "setup.py"), 0755)
os.chmod(os.path.join(tardir, "rdiff-backup"), 0755)
diff --git a/rdiff-backup/dist/makerpm b/rdiff-backup/dist/makerpm
index a5e87e3..1fa2c32 100755
--- a/rdiff-backup/dist/makerpm
+++ b/rdiff-backup/dist/makerpm
@@ -4,24 +4,12 @@ import os, sys, re
SourceDir = "src"
-def GetVersion():
- """Return version string by reading in ./rdiff-backup"""
- fp = open("rdiff-backup", "r")
- match = re.search("Version (.*?) ", fp.read())
- fp.close()
- return match.group(1)
-
-
-if len(sys.argv) == 1:
- version = GetVersion()
+if len(sys.argv) == 2:
+ version = sys.argv[1]
specfile = "rdiff-backup-%s-1.spec" % version
print "Using specfile %s" % specfile
-elif len(sys.argv) == 2:
- specfile = sys.argv[1]
- print "Using specfile %s" % specfile
else:
- print ("%s takes zero or one argument, the name of the rpm spec "
- "file" % sys.argv[0])
+ print "Syntax: %s version_number" % sys.argv[0]
sys.exit(1)
base = ".".join(specfile.split(".")[:-1])
diff --git a/rdiff-backup/dist/rdiff-backup.spec b/rdiff-backup/dist/rdiff-backup.spec
index 5c73166..586fdd5 100644
--- a/rdiff-backup/dist/rdiff-backup.spec
+++ b/rdiff-backup/dist/rdiff-backup.spec
@@ -7,7 +7,7 @@ Source: %{name}-%{version}.tar.gz
Copyright: GPL
Group: Applications/Archiving
BuildRoot: %{_tmppath}/%{name}-root
-requires: librsync, python2 >= 2.2
+requires: librsync >= 0.9.5.1, python2 >= 2.2
BuildPrereq: python2-devel >= 2.2
%description
diff --git a/rdiff-backup/dist/setup.py b/rdiff-backup/dist/setup.py
index 7c9892d..cb571cd 100755
--- a/rdiff-backup/dist/setup.py
+++ b/rdiff-backup/dist/setup.py
@@ -16,7 +16,10 @@ setup(name="rdiff-backup",
author_email="bescoto@stanford.edu",
url="http://rdiff-backup.stanford.edu",
packages = ['rdiff_backup'],
- ext_modules = [Extension("rdiff_backup.C", ["cmodule.c"])],
+ ext_modules = [Extension("rdiff_backup.C", ["cmodule.c"]),
+ Extension("rdiff_backup._librsync",
+ ["_librsyncmodule.c"],
+ libraries=["rsync"])],
scripts = ['rdiff-backup'],
data_files = [('share/man/man1', ['rdiff-backup.1']),
('share/doc/rdiff-backup-%s' % version_string,