5 def dependencies(target):
6 if target.platform == 'windows':
9 return (('openjpeg-cdist', None),
10 ('ffmpeg-cdist', '488d5d4496af5e3a3b9d31d6b221e8eeada6b77e'),
13 def build(env, target):
14 cmd = './waf configure --prefix=%s' % env.work_dir_cscript()
15 if target.platform == 'windows':
16 cmd += ' --target-windows'
23 if target.platform == 'linux':
24 env.command('./waf install')
27 def package(env, target, version):
28 if target.platform == 'windows':
29 shutil.copyfile('build/windows/installer.%s.nsi' % target.bits, 'build/windows/installer2.%s.nsi' % target.bits)
30 env.command('sed -i "s~%%resources%%~%s/windows~g" build/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
31 env.command('sed -i "s~%%deps%%~%s~g" build/windows/installer2.%s.nsi' % (env.windows_prefix(), target.bits))
32 env.command('sed -i "s~%%binaries%%~%s/build~g" build/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
33 env.command('sed -i "s~%%bits%%~32~g" build/windows/installer2.%s.nsi' % target.bits)
34 env.command('makensis build/windows/installer2.%s.nsi' % target.bits)
35 return os.path.abspath(glob.glob('build/windows/*%s*.exe' % target.bits)[0])
36 elif target.platform == 'linux':
42 shutil.copyfile('builds/control-%s-%d' % (target.version, target.bits), 'debian/control')
43 env.command('./waf dist')
44 f = open('debian/files', 'w')
45 print >>f,'dvdomatic_%s-1_%s.deb video extra' % (version, cpu)
46 shutil.rmtree('build/deb', ignore_errors=True)
48 os.makedirs('build/deb')
50 shutil.move('../../dvdomatic-%s.tar.bz2' % version, 'dvdomatic_%s.orig.tar.bz2' % version)
51 env.command('tar xjf dvdomatic_%s.orig.tar.bz2' % version)
52 os.chdir('dvdomatic-%s' % version)
53 env.command('dch -b -v %s-1 "New upstream release."' % version)
54 env.set('CDIST_LINKFLAGS', env.get('LINKFLAGS'))
55 env.set('CDIST_CXXFLAGS', env.get('CXXFLAGS'))
56 env.set('CDIST_PKG_CONFIG_PATH', env.get('PKG_CONFIG_PATH'))
57 env.command('dpkg-buildpackage')
58 return os.path.abspath(glob.glob('../*.deb')[0])
61 env.command('./waf pot')
62 return [os.path.abspath('build/src/lib/libdvdomatic.pot'),
63 os.path.abspath('build/src/wx/libdvdomatic-wx.pot'),
64 os.path.abspath('build/src/tools/dvdomatic.pot')]
67 os.chdir('doc/manual')
69 return [os.path.abspath('pdf'), os.path.abspath('html')]