5 def dependencies(target):
6 return (('ffmpeg-cdist', '61d7015f7c79f97e9af00bacedc856e195538a44'),
7 ('libdcp', '08f4fe13bbff1a674930d55ab95fd181ebd0c265'))
10 cmd = './waf configure --prefix=%s' % target.work_dir_cscript()
11 if target.platform == 'windows':
12 cmd += ' --target-windows'
13 elif target.platform == 'linux':
17 target.command('./waf')
19 if target.platform == 'linux' or target.platform == 'osx':
20 target.command('./waf install')
23 def package(target, version):
24 if target.platform == 'windows':
25 shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits)
26 target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
27 target.command('sed -i "s~%%deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, target.bits))
28 target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
29 target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits)
30 target.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits)
31 return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0])
32 elif target.platform == 'linux':
38 shutil.copyfile('platform/linux/control-%s-%d' % (target.version, target.bits), 'debian/control')
39 target.command('./waf dist')
40 f = open('debian/files', 'w')
41 print >>f,'dcpomatic_%s-1_%s.deb video extra' % (version, cpu)
42 shutil.rmtree('build/deb', ignore_errors=True)
44 os.makedirs('build/deb')
46 shutil.move('../../dcpomatic-%s.tar.bz2' % version, 'dcpomatic_%s.orig.tar.bz2' % version)
47 target.command('tar xjf dcpomatic_%s.orig.tar.bz2' % version)
48 os.chdir('dcpomatic-%s' % version)
49 target.command('dch -b -v %s-1 "New upstream release."' % version)
50 target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS'))
51 target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS'))
52 target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH'))
53 target.command('dpkg-buildpackage')
56 for p in glob.glob('../*.deb'):
57 debs.append(os.path.abspath(p))
60 elif target.platform == 'osx':
61 target.command('bash platform/osx/make_dmg.sh')
62 return os.path.abspath(glob.glob('build/platform/osx/DCP-o-matic*.dmg')[0])
65 target.command('./waf pot')
66 return [os.path.abspath('build/src/lib/libdcpomatic.pot'),
67 os.path.abspath('build/src/wx/libdcpomatic-wx.pot'),
68 os.path.abspath('build/src/tools/dcpomatic.pot')]
70 def make_manual(target):
71 os.chdir('doc/manual')
72 target.command('make')
73 return [os.path.abspath('pdf'), os.path.abspath('html')]