5 def dependencies(target):
6 if target.platform == 'windows':
9 return (('openjpeg-cdist', None),
10 ('ffmpeg-cdist', '7a23ec9c771184ab563cfe24ad9b427f38368961'),
13 def build(env, target):
14 cmd = './waf configure --prefix=%s' % env.work_dir_cscript()
15 if target.platform == 'windows':
16 cmd += ' --target-windows'
17 else if target.platform == 'osx':
19 else if target.platform == 'linux':
25 if target.platform == 'linux' or target.platform == 'osx':
26 env.command('./waf install')
29 def package(env, target, version):
30 if target.platform == 'windows':
31 shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits)
32 env.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
33 env.command('sed -i "s~%%deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (env.windows_prefix, target.bits))
34 env.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
35 env.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits)
36 env.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits)
37 return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0])
38 elif target.platform == 'linux':
44 shutil.copyfile('platform/linux/control-%s-%d' % (target.version, target.bits), 'debian/control')
45 env.command('./waf dist')
46 f = open('debian/files', 'w')
47 print >>f,'dvdomatic_%s-1_%s.deb video extra' % (version, cpu)
48 shutil.rmtree('build/deb', ignore_errors=True)
50 os.makedirs('build/deb')
52 shutil.move('../../dvdomatic-%s.tar.bz2' % version, 'dvdomatic_%s.orig.tar.bz2' % version)
53 env.command('tar xjf dvdomatic_%s.orig.tar.bz2' % version)
54 os.chdir('dvdomatic-%s' % version)
55 env.command('dch -b -v %s-1 "New upstream release."' % version)
56 env.set('CDIST_LINKFLAGS', env.get('LINKFLAGS'))
57 env.set('CDIST_CXXFLAGS', env.get('CXXFLAGS'))
58 env.set('CDIST_PKG_CONFIG_PATH', env.get('PKG_CONFIG_PATH'))
59 env.command('dpkg-buildpackage')
62 for p in glob.glob('../*.deb'):
63 debs.append(os.path.abspath(p))
66 elif target.platform == 'osx':
67 env.command('bash platform/osx/make_dmg.sh')
68 return os.path.abspath(glob.glob('build/platform/osx/DVD-o-matic*.dmg')[0])
71 env.command('./waf pot')
72 return [os.path.abspath('build/src/lib/libdvdomatic.pot'),
73 os.path.abspath('build/src/wx/libdvdomatic-wx.pot'),
74 os.path.abspath('build/src/tools/dvdomatic.pot')]
77 os.chdir('doc/manual')
79 return [os.path.abspath('pdf'), os.path.abspath('html')]