File: meson.build

package info (click to toggle)
game-data-packager 73
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 23,420 kB
  • sloc: python: 11,086; sh: 609; makefile: 59
file content (122 lines) | stat: -rw-r--r-- 2,533 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Copyright 2022 Simon McVittie
# SPDX-License-Identifier: FSFAP

subdir('data')
subdir('vfs')

make_vfs_zip = [
  python,
  files(meson.project_source_root() / 'tools' / 'make-vfs-zip.py'),
  '@OUTPUT@',
] + test_vfs_files

custom_target(
  'vfs.zip',
  build_by_default : true,
  command : make_vfs_zip,
  input : test_vfs_files,
  output : 'vfs.zip',
)

custom_target(
  'changelog.gz',
  build_by_default : true,
  capture : true,
  command : ['gzip', '-nc9', '@INPUT@'],
  input : meson.project_source_root() / 'debian' / 'changelog',
  output : 'changelog.gz',
  install_dir : pkgdatadir,
)

configure_file(
  copy : true,
  input : meson.project_source_root() / 'data' / 'copyright',
  output : 'copyright',
)

foreach t : [
  'pyflakes',
  'reuse',
]
  test(
    t,
    files(t + '.sh'),
    env : [
      'GDP_BUILDDIR=' + meson.project_build_root(),
      'GDP_PKGDATADIR=' + meson.project_build_root(),
      'GDP_SRCDIR=' + meson.project_source_root(),
      'GDP_UNINSTALLED=1',
      'LC_ALL=C.UTF-8',
      'PYTHONPATH=' + meson.project_source_root(),
    ],
    protocol : 'tap',
    suite : 'lint',
    timeout : 60,
  )
endforeach

foreach t : [
  'deb',
  'hashed_file',
  'integration',
  'rpm',
  'umod',
]
  test(
    t,
    python,
    args : [files(t + '.py')],
    env : [
      'GDP_BUILDDIR=' + meson.project_build_root(),
      'GDP_PKGDATADIR=' + meson.project_build_root(),
      'GDP_SRCDIR=' + meson.project_source_root(),
      'GDP_UNINSTALLED=1',
      'LC_ALL=C.UTF-8',
      'PYTHONPATH=' + meson.project_source_root(),
    ],
    protocol : 'tap',
  )
endforeach

foreach t : [
  'check_syntax',
  'check_equivalence',
]
  test(
    t,
    python,
    args : [files(meson.project_source_root() / 'tools' / t + '.py')],
    env : [
      'GDP_BUILDDIR=' + meson.project_build_root(),
      'GDP_PKGDATADIR=' + meson.project_build_root(),
      'GDP_SRCDIR=' + meson.project_source_root(),
      'GDP_UNINSTALLED=1',
      'LC_ALL=C.UTF-8',
      'PYTHONPATH=' + meson.project_source_root(),
    ],
    suite : 'slow',
    timeout : 150,
  )
endforeach

foreach t : [
  'download_shareware',
]
  test(
    t,
    python,
    args : [files(t + '.py')],
    env : [
      'GDP_BUILDDIR=' + meson.project_build_root(),
      'GDP_PKGDATADIR=' + meson.project_build_root(),
      'GDP_SRCDIR=' + meson.project_source_root(),
      'GDP_UNINSTALLED=1',
      'LC_ALL=C.UTF-8',
      'PYTHONPATH=' + meson.project_source_root(),
    ],
    suite : [
      'network',
      'slow',
    ],
  )
endforeach