summaryrefslogtreecommitdiffstats
path: root/o3d/installer/linux/debian.in/debian.gyp
blob: 51abeca55511d806f7d5439bde126b977ba39bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'includes': [
    '../../../build/common.gypi',
    '../../../plugin/version.gypi',
  ],
  'variables': {
    'INSTALLER_DIR': '<(PRODUCT_DIR)/installer',
    'DEBIAN_DIR': '<(INSTALLER_DIR)/debian',
  },
  'conditions': [
    [ 'target_arch=="x64"',
      {
        'variables': { 'ARCH': 'amd64' }
      },
      {
        'variables': { 'ARCH': 'i386' }
      },
    ],
  ],
  'targets': [
    {
      'target_name': 'debian',
      'dependencies': [
        '../../../build/libs.gyp:cg_libs',
        '../../../plugin/plugin.gyp:npo3dautoplugin',
      ],
      'type': 'none',
      'copies': [
        {
          'destination': '<(DEBIAN_DIR)',
          'files': [
            'compat',
            'control',
            'copyright',
            'google-o3d.install',
            'google-o3d.links',
            'google-o3d.lintian-overrides',
            'rules',
          ],
        },
      ],
      'actions': [
        {
          'action_name': 'deb_mk_changelog',
          'inputs': [
            'changelog.in',
            'mk_changelog.py',
          ],
          'outputs': [
            '<(DEBIAN_DIR)/changelog',
          ],
          'action': [
            'python',
            'mk_changelog.py',
            '--version=<(plugin_version)',
            '--out=<(DEBIAN_DIR)/changelog',
            '--in=changelog.in',
          ],
        },
        {
          'action_name': 'make_deb',
          'inputs': [
            '<(PRODUCT_DIR)/libnpo3dautoplugin.so',
            '<(PRODUCT_DIR)/libCg.so',
            '<(PRODUCT_DIR)/libCgGL.so',
            '<(DEBIAN_DIR)/changelog',
            '<(DEBIAN_DIR)/compat',
            '<(DEBIAN_DIR)/control',
            '<(DEBIAN_DIR)/copyright',
            '<(DEBIAN_DIR)/google-o3d.install',
            '<(DEBIAN_DIR)/google-o3d.links',
            '<(DEBIAN_DIR)/google-o3d.lintian-overrides',
            '<(DEBIAN_DIR)/rules',
          ],
          'action': [
            'cd',
            '<(INSTALLER_DIR)',
            '&&',
            'dpkg-buildpackage',
            '-uc', # Don't sign the changes file
            '-tc', # Clean the tree
            '-b', # Don't produce a source build
            '-a<(ARCH)',
            '-D', # -a suppresses build-dep checking, so turn it back on
            '-rfakeroot',
          ],
          'outputs': [
            '<(PRODUCT_DIR)/google-o3d_<(plugin_version)_<(ARCH).changes',
            '<(PRODUCT_DIR)/google-o3d_<(plugin_version)_<(ARCH).deb',
            '<(PRODUCT_DIR)/' +
                'google-o3d-dbgsym_<(plugin_version)_<(ARCH).deb',
          ],
        },
      ],
    },
  ],
}