Merge remote-tracking branch 'origin/master' into erp5testnode
[slapos.git] / component / duplicity / buildout.cfg
1 [buildout]
2 extends =
3   ../librsync/buildout.cfg
4   ../patch/buildout.cfg
5 parts =
6   duplicity
7
8 [duplicity]
9 recipe = slapos.recipe.build
10 url = http://code.launchpad.net/duplicity/0.6-series/0.6.15/+download/duplicity-0.6.15.tar.gz
11 md5sum = 88f3c990f41fde86cd7d5af5a1bc7b81
12 patch = ${:_profile_base_location_}/duplicity-ipv6.patch 32c44816a9a59401e233ef622bf50223
13 script =
14   import os
15   import tempfile
16   import sys
17   workingdir = guessworkdir(self.extract(self.download(%(url)r, %(md5sum)r)))
18   os.chdir(workingdir)
19   self.applyPatchList('${:patch}', patch_binary='${patch:location}/bin/patch', patch_options='-p0', cwd=workingdir)
20   call([sys.executable, os.path.join(workingdir, 'setup.py'),
21        'build_ext',
22        '--include-dirs', os.path.join('${librsync:location}', 'include'),
23        '--library-dirs', os.path.join('${librsync:location}', 'lib'),
24        '--rpath', os.path.join('${librsync:location}', 'lib')])
25   call([sys.executable, os.path.join(workingdir, 'setup.py'),
26         'install',
27         '--prefix', %(location)r])
28   os.chdir(os.path.join(%(location)r, 'bin'))
29   paths = [os.path.join(%(location)r, 'lib', 'python%%s.%%s' %% sys.version_info[:2], 'site-packages')]
30   from zc.buildout.easy_install import scripts
31   scripts([('duplicity', '__builtin__', 'execfile')], [], sys.executable, '${buildout:bin-directory}', arguments='%%r' %% os.path.abspath('duplicity'), extra_paths=paths)
32   scripts([('rdiffdir', '__builtin__', 'execfile')], [], sys.executable, '${buildout:bin-directory}', arguments='%%r' %% os.path.abspath('rdiffdir'), extra_paths=paths)