5 def dependencies(target):
6 if target.platform == 'windows':
9 # XXX: should be some versions in here
10 return (('ffmpeg-cdist', 'e797834288eaf05a2f406524ae04aaa0f114cb08'),
14 cmd = './waf configure --prefix=%s' % target.work_dir_cscript()
15 if target.platform == 'windows':
16 cmd += ' --target-windows'
17 elif target.platform == 'linux':
21 target.command('./waf')
23 if target.platform == 'linux' or target.platform == 'osx':
24 target.command('./waf install')
27 def package(target, version):
28 if target.platform == 'windows':
29 shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits)
30 target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
31 target.command('sed -i "s~%%deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, target.bits))
32 target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
33 target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits)
34 target.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits)
35 return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0])
36 elif target.platform == 'linux':
42 shutil.copyfile('platform/linux/control-%s-%d' % (target.version, target.bits), 'debian/control')
43 target.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 target.command('tar xjf dvdomatic_%s.orig.tar.bz2' % version)
52 os.chdir('dvdomatic-%s' % version)
53 target.command('dch -b -v %s-1 "New upstream release."' % version)
54 target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS'))
55 target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS'))
56 target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH'))
57 target.command('dpkg-buildpackage')
60 for p in glob.glob('../*.deb'):
61 debs.append(os.path.abspath(p))
64 elif target.platform == 'osx':
65 target.command('bash platform/osx/make_dmg.sh')
66 return os.path.abspath(glob.glob('build/platform/osx/DVD-o-matic*.dmg')[0])
69 target.command('./waf pot')
70 return [os.path.abspath('build/src/lib/libdvdomatic.pot'),
71 os.path.abspath('build/src/wx/libdvdomatic-wx.pot'),
72 os.path.abspath('build/src/tools/dvdomatic.pot')]
74 def make_manual(target):
75 os.chdir('doc/manual')
76 target.command('make')
77 return [os.path.abspath('pdf'), os.path.abspath('html')]