Tweak submodule URL again.
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index 5a74e8038f4f71f1358a82dfa579de1a8e8b46e3..49f8f62a90c1d9cd59df29b6fb79d3e5f2e875fc 100644 (file)
--- a/cscript
+++ b/cscript
@@ -144,33 +144,11 @@ def make_control(debian_version, bits, filename, debug):
         print >>f,'  This package contains the debugging symbols for dcpomatic.'
         print >>f,''
 
-def dependencies(target):
-    return (('ffmpeg-cdist', 'f69bb08'),
-            ('libdcp', '8e7f9e4'),
-            ('libsub', 'f66b11f'))
-
-def configure_options(target):
-    opt = ''
-    if target.debug:
-        opt += ' --enable-debug'
-    if target.platform == 'windows':
-        opt += ' --target-windows'
-    elif target.platform == 'linux':
-        opt += ' --static-dcpomatic --static-openjpeg --static-wxwidgets --static-ffmpeg --static-dcp --static-sub --static-cxml'
-        if target.distro == 'centos':
-            opt += ' --static-xmlsec --static-ssh --disable-tests'
-            if target.version == '6.5':
-                opt += ' --static-boost --static-xmlpp'
-            elif target.version == '7':
-                opt += ' --workaround-gssapi'
-
-    return opt
-
 def make_spec(filename, version, target):
     """Make a .spec file for a RPM build"""
     f = open(filename, 'w')
     print >>f,'Summary:A program that generates Digital Cinema Packages (DCPs) from video and audio files'
-    print >>f,'Name:dcpomatic'
+    print >>f,'Name:dcpomatic2'
     print >>f,'Version:%s' % version
     print >>f,'Release:1%{?dist}'
     print >>f,'License:GPL'
@@ -194,10 +172,10 @@ def make_spec(filename, version, target):
     print >>f,'%{_datadir}/applications/dcpomatic2.desktop'
     print >>f,'%{_datadir}/applications/dcpomatic2_batch.desktop'
     print >>f,'%{_datadir}/applications/dcpomatic2_server.desktop'
-    print >>f,'%{_datadir}/dcpomatic2/taskbar_icon.png'
+    print >>f,'%{_datadir}/dcpomatic/taskbar_icon.png'
     for r in ['128x128', '22x22', '32x32', '48x48', '64x64']:
         print >>f,'%%{_datadir}/icons/hicolor/%s/apps/dcpomatic2.png' % r
-    for l in ['de_DE', 'es_ES', 'fr_FR', 'it_IT', 'sv_SE', 'nl_NL', 'ru_RU']:
+    for l in ['de_DE', 'es_ES', 'fr_FR', 'it_IT', 'sv_SE', 'nl_NL']:
         print >>f,'%%{_datadir}/locale/%s/LC_MESSAGES/dcpomatic2.mo' % l
         print >>f,'%%{_datadir}/locale/%s/LC_MESSAGES/libdcpomatic2-wx.mo' % l
         print >>f,'%%{_datadir}/locale/%s/LC_MESSAGES/libdcpomatic2.mo' % l
@@ -226,6 +204,28 @@ def make_spec(filename, version, target):
     print >>f,'%posttrans'
     print >>f,'/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :'
 
+def dependencies(target):
+    return (('ffmpeg-cdist', '0492ad2'),
+            ('libdcp', '484a900'),
+            ('libsub', 'f66b11f'))
+
+def configure_options(target):
+    opt = ''
+    if target.debug:
+        opt += ' --enable-debug'
+    if target.platform == 'windows':
+        opt += ' --target-windows'
+    elif target.platform == 'linux':
+        opt += ' --static-dcpomatic --static-openjpeg --static-wxwidgets --static-ffmpeg --static-dcp --static-sub --static-cxml'
+        if target.distro == 'centos':
+            opt += ' --static-xmlsec --static-ssh --disable-tests'
+            if target.version == '6.5':
+                opt += ' --static-boost --static-xmlpp'
+            elif target.version == '7':
+                opt += ' --workaround-gssapi'
+
+    return opt
+
 def build(target, options):
     target.command('./waf configure --prefix=%s %s' % (target.directory, configure_options(target)))
     target.command('./waf')
@@ -260,8 +260,15 @@ 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.set('CDIST_CONFIGURE', '"' + configure_options(target) + '"')
+    if target.debug:
+        target.set('CDIST_DEBUG_PACKAGE', '--dbg-package=dcpomatic-dbg')
+    if target.version == '15.04':
+        target.set('CDIST_LOCALE_PREFIX', '/usr/share/locale')
+    else:
+        target.set('CDIST_LOCALE_PREFIX', '/usr/local/share/locale')
+
     target.command('dpkg-buildpackage -uc -us')
     
     debs = []
@@ -284,6 +291,7 @@ def package_centos(target, cpu, version):
         "%s/SOURCES/dcpomatic-%s.tar.bz2" % (topdir, version)
         )
 
+    make_spec('build/platform/linux/dcpomatic2.spec', version, target)
     target.command('rpmbuild --define \'_topdir %s\' -bb build/platform/linux/dcpomatic2.spec' % topdir)
     rpms = []