summaryrefslogtreecommitdiffstats
path: root/src/import/meson.build
blob: 184dd7bbf2dcbd9e03a3886e2ba8f1eaadef61a5 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SPDX-License-Identifier: LGPL-2.1-or-later

if conf.get('ENABLE_IMPORTD') != 1
        subdir_done()
endif

systemd_importd_sources = files(
        'importd.c',
)

systemd_pull_sources = files(
        'pull.c',
        'pull-raw.c',
        'pull-tar.c',
        'pull-job.c',
        'pull-common.c',
        'curl-util.c',
)

systemd_import_sources = files(
        'import.c',
        'import-raw.c',
        'import-tar.c',
)

systemd_import_fs_sources = files(
        'import-fs.c',
)

systemd_export_sources = files(
        'export.c',
        'export-tar.c',
        'export-raw.c',
)

importd_common_sources = files(
        'import-common.c',
        'import-compress.c',
        'qcow2-util.c',
)

lib_import_common = static_library(
        'import-common',
        sources : importd_common_sources,
        include_directories : includes,
        dependencies : [
                libbzip2,
                libxz,
                libz,
                userspace,
        ],
        build_by_default : false)

common_libs = [
        lib_import_common,
        libshared,
]

common_deps = [
        libbzip2,
        libcurl,
        libxz,
        libz,
]

executables += [
        libexec_template + {
                'name' : 'systemd-importd',
                'dbus' : true,
                'conditions' : ['ENABLE_IMPORTD'],
                'sources' : systemd_importd_sources,
                'dependencies' : threads,
        },
        libexec_template + {
                'name' : 'systemd-pull',
                'public' : true,
                'conditions' : ['ENABLE_IMPORTD'],
                'sources' : systemd_pull_sources,
                'link_with' : common_libs,
                'dependencies' : common_deps + [
                        lib_openssl_or_gcrypt,
                ],
        },
        libexec_template + {
                'name' : 'systemd-import',
                'public' : true,
                'conditions' : ['ENABLE_IMPORTD'],
                'sources' : systemd_import_sources,
                'link_with' : common_libs,
                'dependencies' : common_deps,
        },
        libexec_template + {
                'name' : 'systemd-import-fs',
                'public' : true,
                'conditions' : ['ENABLE_IMPORTD'],
                'sources' : systemd_import_fs_sources,
                'link_with' : common_libs,
        },
        libexec_template + {
                'name' : 'systemd-export',
                'public' : true,
                'conditions' : ['ENABLE_IMPORTD'],
                'sources' : systemd_export_sources,
                'link_with' : common_libs,
                'dependencies' : common_deps,
        },
        executable_template + {
                'name' : 'importctl',
                'public' : true,
                'conditions' : ['ENABLE_IMPORTD'],
                'sources' : files('importctl.c'),
        },
        test_template + {
                'sources' : files(
                        'test-qcow2.c',
                        'qcow2-util.c',
                ),
                'dependencies' : libz,
                'conditions' : ['HAVE_ZLIB'],
                'type' : 'manual',
        },
]

install_data('org.freedesktop.import1.conf',
             install_dir : dbuspolicydir)
install_data('org.freedesktop.import1.service',
             install_dir : dbussystemservicedir)
install_data('org.freedesktop.import1.policy',
             install_dir : polkitpolicydir)

install_data('import-pubring.gpg',
             install_dir : libexecdir)
# TODO: shouldn't this be in pkgdatadir?