5 build_depends = {'debhelper': '8.0.0',
10 'libboost-filesystem-dev': '1.46.0',
11 'libboost-thread-dev': '1.46.0',
12 'libsndfile1-dev': '1.0.25',
13 'libmagick++-dev': '8:6.6.9.7',
14 'libgtk2.0-dev': '2.24.10'}
18 depends['12.04'] = {'libc6': '2.15',
20 'libboost-filesystem1.46.1': '1.46.1',
21 'libboost-thread1.46.1': '1.46.1',
22 'libsndfile1': '1.0.25',
23 'libmagick++4': '8:6.6.9.7',
24 'libxml++2.6-2': '2.34.1',
25 'libgtk2.0-0': '2.24.10',
26 'libxmlsec1': '1.2.14-1.2build1',
27 'libxmlsec1-openssl': '1.2.14-1.2build1',
28 'libboost-date-time1.46.1': '1.46.1',
29 'libcurl3': '7.22.0-3ubuntu4',
30 'libzip2': '0.10-1ubuntu1'}
32 depends['12.10'] = {'libc6': '2.15',
34 'libboost-filesystem1.49.0': '1.49.0',
35 'libboost-thread1.49.0': '1.49.0',
36 'libsndfile1': '1.0.25',
37 'libmagick++5': '8:6.7.7.10',
38 'libxml++2.6-2': '2.34.2',
39 'libgtk2.0-0': '2.24.13',
40 'libxmlsec1': '1.2.18-2',
41 'libxmlsec1-openssl': '1.2.18-2',
42 'libboost-date-time1.49.0': '1.49.0',
43 'libcurl3': '7.27.0-1ubuntu1',
44 'libzip2': '0.10.1-1.1'}
46 depends['13.04'] = {'libc6': '2.15',
48 'libboost-filesystem1.49.0': '1.49.0',
49 'libboost-thread1.49.0': '1.49.0',
50 'libsndfile1': '1.0.25',
51 'libmagick++5': '8:6.7.7.10',
52 'libxml++2.6-2': '2.34.2',
53 'libgtk2.0-0': '2.24.13',
54 'libxmlsec1': '1.2.18-2',
55 'libxmlsec1-openssl': '1.2.18-2',
56 'libboost-date-time1.49.0': '1.49.0',
57 'libcurl3': '7.29.0-1ubuntu3',
58 'libzip2': '0.10.1-1.1'}
60 depends['13.10'] = {'libc6': '2.17-93',
62 'libboost-filesystem1.53.0': '1.53.0',
63 'libboost-thread1.53.0': '1.53.0',
64 'libsndfile1': '1.0.25',
65 'libmagick++5': '8:6.7.7.10',
66 'libxml++2.6-2': '2.36.0',
67 'libgtk2.0-0': '2.24.20',
68 'libxmlsec1': '1.2.18-2',
69 'libxmlsec1-openssl': '1.2.18-2',
70 'libboost-date-time1.49.0': '1.49.0',
71 'libcurl3': '7.29.0-1ubuntu3',
72 'libzip2': '0.10.1-1.1'}
74 depends['7'] = {'libc6': '2.13',
76 'libboost-filesystem1.49.0': '1.49.0',
77 'libboost-thread1.49.0': '1.49.0',
78 'libsndfile1': '1.0.25',
79 'libmagick++5': '8:6.7.7.10',
80 'libxml++2.6-2': '2.34.2',
81 'libgtk2.0-0': '2.24.10',
82 'libxmlsec1': '1.2.18',
83 'libboost-date-time1.49.0': '1.49.0',
84 'libxmlsec1-openssl': '1.2.18',
88 def packages(name, packages, f):
94 def make_control(version, bits, filename):
95 f = open(filename, 'w')
96 print >>f,'Source: dcpomatic'
97 print >>f,'Section: video'
98 print >>f,'Priority: extra'
99 print >>f,'Maintainer: Carl Hetherington <carl@dcpomatic.com>'
100 packages('Build-Depends', build_depends, f)
101 print >>f,'Standards-Version: 3.9.3'
102 print >>f,'Homepage: http://dcpomatic.com/'
104 print >>f,'Package: dcpomatic'
106 print >>f,'Architecture: i386'
108 print >>f,'Architecture: amd64'
110 packages('Depends', depends[version], f)
111 print >>f,'Description: Generator of Digital Cinema Packages (DCPs)'
112 print >>f,' DCP-o-matic generates Digital Cinema Packages (DCPs) from video and audio'
113 print >>f,' files (such as those from DVDs or Blu-Rays) for presentation on DCI-compliant'
114 print >>f,' digital projectors.'
116 def dependencies(target):
117 return (('ffmpeg-cdist', '5ac3a6af077c10f07c31954c372a8f29e4e18e2a'),
118 ('libdcp', '3a148fab61d2b23379589a4f0f256c21950742b8'))
121 cmd = './waf configure --prefix=%s' % target.work_dir_cscript()
122 if target.platform == 'windows':
123 cmd += ' --target-windows'
124 elif target.platform == 'linux':
128 target.command('./waf')
130 if target.platform == 'linux' or target.platform == 'osx':
131 target.command('./waf install')
133 def package(target, version):
134 if target.platform == 'windows':
135 shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits)
136 target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
137 target.command('sed -i "s~%%static_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, target.bits))
138 target.command('sed -i "s~%%cdist_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.work_dir_cscript(), target.bits))
139 target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
140 target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits)
141 target.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits)
142 return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0])
143 elif target.platform == 'linux':
144 if target.bits == 32:
149 make_control(target.version, target.bits, 'debian/control')
150 target.command('./waf dist')
151 f = open('debian/files', 'w')
152 print >>f,'dcpomatic_%s-1_%s.deb video extra' % (version, cpu)
153 shutil.rmtree('build/deb', ignore_errors=True)
155 os.makedirs('build/deb')
156 os.chdir('build/deb')
157 shutil.move('../../dcpomatic-%s.tar.bz2' % version, 'dcpomatic_%s.orig.tar.bz2' % version)
158 target.command('tar xjf dcpomatic_%s.orig.tar.bz2' % version)
159 os.chdir('dcpomatic-%s' % version)
160 target.command('dch -b -v %s-1 "New upstream release."' % version)
161 target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS'))
162 target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS'))
163 target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH'))
164 target.command('dpkg-buildpackage')
167 for p in glob.glob('../*.deb'):
168 debs.append(os.path.abspath(p))
171 elif target.platform == 'osx':
172 target.command('bash platform/osx/make_dmg.sh %s' % target.work_dir_cscript())
173 return os.path.abspath(glob.glob('build/platform/osx/DCP-o-matic*.dmg')[0])
175 def make_pot(target):
176 target.command('./waf pot')
177 return [os.path.abspath('build/src/lib/libdcpomatic.pot'),
178 os.path.abspath('build/src/wx/libdcpomatic-wx.pot'),
179 os.path.abspath('build/src/tools/dcpomatic.pot')]
181 def make_manual(target):
182 os.chdir('doc/manual')
183 target.command('make')
184 target.command('pdflatex colour.tex')
185 return [os.path.abspath('pdf'), os.path.abspath('html'), os.path.abspath('colour.pdf')]
188 if target.platform != 'windows':
189 target.set('LC_ALL', 'C')
190 target.command('run/tests')