diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2020-04-16 23:32:02 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-10-02 12:07:05 +0300 |
commit | deeca54f644aba1d73b785b6eb36cd1d23e404cc (patch) | |
tree | 6ae858ddd806c94b98f197758a424038ed232117 /libfetch/meson.build | |
parent | 7ccda091c2c7cf18225b861962f952dc04a5295f (diff) | |
download | apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.tar.gz apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.tar.bz2 apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.tar.xz apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.zip |
build: add support for building with meson
Diffstat (limited to 'libfetch/meson.build')
-rw-r--r-- | libfetch/meson.build | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libfetch/meson.build b/libfetch/meson.build new file mode 100644 index 0000000..1438cac --- /dev/null +++ b/libfetch/meson.build @@ -0,0 +1,46 @@ +libfetch_src = [ + 'common.c', + 'fetch.c', + 'file.c', + 'ftp.c', + 'http.c', + 'openssl-compat.c' +] + +errlist_generator = find_program('errlist.sh') + +ftperr_h = custom_target( + 'ftperr.h', + capture: true, + command: [errlist_generator, 'ftp_errlist', 'FTP', '@INPUT@'], + output: 'ftperr.h', + input: 'ftp.errors', +) + +httperr_h = custom_target( + 'httpderr.h', + capture: true, + command: [errlist_generator, 'http_errlist', 'HTTP', '@INPUT@'], + output: 'httperr.h', + input: 'http.errors', +) + +libfetch_src += [ftperr_h, httperr_h] + +libfetch_cargs = [ + '-DCA_CERT_FILE="/' + apk_confdir / 'ca.pem"', + '-DCA_CRL_FILE="/' + apk_confdir / 'crl.pem"', + '-DCLIENT_CERT_FILE="/' + apk_confdir / 'cert.pem"', + '-DCLIENT_KEY_FILE="/' + apk_confdir / 'cert.key"', +] + +libfetch = static_library( + 'fetch', + libfetch_src, + c_args: libfetch_cargs, +) + +libfetch_dep = declare_dependency( + link_whole: libfetch, + include_directories: include_directories('.'), +) |