X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=cscript;h=86dab4306d15d233fa01c8b934f397c657573add;hp=b8b0580063ee0490652cd2c8e0b0132360bcf349;hb=04eebe07e2f64bd15f6887a10ab51fb92c52901a;hpb=cc3900735839ff4b0da0c046b5c606c440ba917a diff --git a/cscript b/cscript index b8b058006..86dab4306 100644 --- a/cscript +++ b/cscript @@ -7,8 +7,6 @@ deb_build_depends = {'debhelper': '8.0.0', 'g++': '4:4.6.3', 'pkg-config': '0.26', 'libssh-dev': '0.5.2', - 'libboost-filesystem-dev': '1.46.0', - 'libboost-thread-dev': '1.46.0', 'libsndfile1-dev': '1.0.25', 'libmagick++-dev': '8:6.6.9.7', 'libgtk2.0-dev': '2.24.10'} @@ -17,15 +15,15 @@ deb_depends = dict() deb_depends['12.04'] = {'libc6': '2.15', 'libssh-4': '0.5.2', - 'libboost-filesystem1.46.1': '1.46.1', - 'libboost-thread1.46.1': '1.46.1', + 'libboost-filesystem1.48.0': '1.48.0-3', + 'libboost-thread1.48.0': '1.48.0-3', 'libsndfile1': '1.0.25', 'libmagick++4': '8:6.6.9.7', 'libxml++2.6-2': '2.34.1', 'libgtk2.0-0': '2.24.10', 'libxmlsec1': '1.2.14-1.2build1', 'libxmlsec1-openssl': '1.2.14-1.2build1', - 'libboost-date-time1.46.1': '1.46.1', + 'libboost-date-time1.48.0': '1.48.0-3', 'libcurl3': '7.22.0-3ubuntu4', 'libzip2': '0.10-1ubuntu1'} @@ -71,6 +69,20 @@ deb_depends['13.10'] = {'libc6': '2.17-93', 'libcurl3': '7.29.0-1ubuntu3', 'libzip2': '0.10.1-1.1'} +deb_depends['14.04'] = {'libc6': '2.19-0ubuntu6', + 'libssh-4': '0.6.1-0ubuntu3', + 'libboost-filesystem1.54.0': '1.54.0-4ubuntu3', + 'libboost-thread1.54.0': '1.54.0-4ubuntu3', + 'libsndfile1': '1.0.25-7ubuntu2', + 'libmagick++5': '8:6.7.7.10-6ubuntu3', + 'libxml++2.6-2': '2.36.0-2ubuntu1', + 'libgtk2.0-0': '2.24.23-0ubuntu1', + 'libxmlsec1': '1.2.18-2ubuntu1', + 'libxmlsec1-openssl': '1.2.18-2ubuntu1', + 'libboost-date-time1.54.0': '1.54.0-4ubuntu3', + 'libcurl3': '7.35.0-1ubuntu2', + 'libzip2': '0.10.1-1.2'} + deb_depends['7'] = {'libc6': '2.13', 'libssh-4': '0.5.4', 'libboost-filesystem1.49.0': '1.49.0', @@ -85,6 +97,21 @@ deb_depends['7'] = {'libc6': '2.13', 'libcurl3': '7.26.0', 'libzip2': '0.10.1'} +deb_depends['unstable'] = {'libc6': '2.13', + 'libssh-4': '0.5.4', + 'libboost-filesystem1.55.0': '1.55.0', + 'libboost-thread1.55.0': '1.55.0', + 'libsndfile1': '1.0.25', + 'libmagick++5': '8:6.7.7.10', + 'libxml++2.6-2': '2.34.2', + 'libgtk2.0-0': '2.24.10', + 'libxmlsec1': '1.2.18', + 'libboost-date-time1.55.0': '1.55.0', + 'libxmlsec1-openssl': '1.2.18', + 'libcurl3': '7.26.0', + 'libzip2': '0.10.1'} + + def packages(name, packages, f): s = '%s: ' % name for p in packages: @@ -129,18 +156,23 @@ def make_control(debian_version, bits, filename, debug): print >>f,'' def dependencies(target): - return (('ffmpeg-cdist', '08827fa4e1d483511e6135c424d2ca9c56a9ed50'), + return (('ffmpeg-cdist', '7e95caa'), ('libdcp', '1.0')) def build(target, options): - cmd = './waf configure --prefix=%s' % target.work_dir_cscript() + cmd = './waf configure --prefix=%s' % target.directory if target.platform == 'windows': cmd += ' --target-windows' elif target.platform == 'linux': if target.distro == 'debian' or target.distro == 'ubuntu': cmd += ' --target-debian' + if target.version == 'unstable': + cmd += ' --debian-unstable' elif target.distro == 'centos': - cmd += ' --target-centos' + if target.version == '6.5': + cmd += ' --target-centos-6 --disable-tests' + elif target.version == '7': + cmd += ' --target-centos-7' target.command(cmd) target.command('./waf') @@ -152,7 +184,7 @@ def package_windows(target): shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits) target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) target.command('sed -i "s~%%static_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, target.bits)) - target.command('sed -i "s~%%cdist_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.work_dir_cscript(), target.bits)) + target.command('sed -i "s~%%cdist_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.directory, target.bits)) target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits) target.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits) @@ -174,6 +206,8 @@ def package_debian(target, cpu, version): target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS')) target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS')) target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH')) + if target.version == 'unstable': + target.set('CDIST_EXTRA_CONFIGURE', '--debian-unstable') target.command('dpkg-buildpackage') debs = [] @@ -183,29 +217,26 @@ def package_debian(target, cpu, version): return debs def package_centos(target, cpu, version): - os.makedirs('%s/rpmbuild/BUILD' % target.work_dir_cdist()) - os.makedirs('%s/rpmbuild/RPMS' % target.work_dir_cdist()) - os.makedirs('%s/rpmbuild/SOURCES' % target.work_dir_cdist()) - os.makedirs('%s/rpmbuild/SPECS' % target.work_dir_cdist()) - os.makedirs('%s/rpmbuild/SRPMS' % target.work_dir_cdist()) - - f = open('%s/.rpmmacros' % target.dir_in_chroot, 'w') - print >>f,"%%_topdir %srpmbuild" % target.dir_in_chroot - f.close() + topdir = os.path.realpath('build/rpmbuild') + os.makedirs('%s/BUILD' % topdir) + os.makedirs('%s/RPMS' % topdir) + os.makedirs('%s/SOURCES' % topdir) + os.makedirs('%s/SPECS' % topdir) + os.makedirs('%s/SRPMS' % topdir) target.command('./waf dist') shutil.copyfile( - "%s/src/dcpomatic/dcpomatic-%s.tar.bz2" % (target.work_dir_cdist(), version), - "%s/rpmbuild/SOURCES/dcpomatic-%s.tar.bz2" % (target.work_dir_cdist(), version) + "%s/src/dcpomatic/dcpomatic-%s.tar.bz2" % (target.directory, version), + "%s/SOURCES/dcpomatic-%s.tar.bz2" % (topdir, version) ) - target.command('rpmbuild -bb build/platform/linux/dcpomatic.spec') + target.command('rpmbuild --define \'_topdir %s\' -bb build/platform/linux/dcpomatic.spec' % topdir) rpms = [] if cpu == "amd64": cpu = "x86_64" - for p in glob.glob('%s/rpmbuild/RPMS/%s/*.rpm' % (target.work_dir_cdist(), cpu)): + for p in glob.glob('%s/RPMS/%s/*.rpm' % (topdir, cpu)): rpms.append(os.path.abspath(p)) return rpms @@ -224,7 +255,7 @@ def package(target, version): elif target.distro == 'centos': return package_centos(target, cpu, version) elif target.platform == 'osx': - target.command('bash platform/osx/make_dmg.sh %s' % target.work_dir_cscript()) + target.command('bash platform/osx/make_dmg.sh %s' % target.directory) return os.path.abspath(glob.glob('build/platform/osx/DCP-o-matic*.dmg')[0]) def make_pot(target):