]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal-remote/meson.build
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / src / journal-remote / meson.build
index cbe2be19c78f1f422a303972bb3500831ca41ef8..66cbcc69df8f44fd97c890bb0c8171d8c57e1a77 100644 (file)
@@ -1,19 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
-#
-# Copyright 2017 Zbigniew JÄ™drzejewski-Szmek
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# systemd is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_journal_upload_sources = files('''
         journal-upload.h
@@ -21,15 +6,35 @@ systemd_journal_upload_sources = files('''
         journal-upload-journal.c
 '''.split())
 
-systemd_journal_remote_sources = files('''
+libsystemd_journal_remote_sources = files('''
         journal-remote-parse.h
         journal-remote-parse.c
         journal-remote-write.h
         journal-remote-write.c
         journal-remote.h
         journal-remote.c
-        microhttpd-util.h
-        microhttpd-util.c
+'''.split())
+
+if conf.get('HAVE_MICROHTTPD') == 1
+        libsystemd_journal_remote_sources += files('''
+                microhttpd-util.h
+                microhttpd-util.c
+'''.split())
+endif
+
+libsystemd_journal_remote = static_library(
+        'systemd-journal-remote',
+        libsystemd_journal_remote_sources,
+        include_directories : includes,
+        dependencies : [threads,
+                        libmicrohttpd,
+                        libgnutls,
+                        libxz,
+                        liblz4],
+        install : false)
+
+systemd_journal_remote_sources = files('''
+        journal-remote-main.c
 '''.split())
 
 systemd_journal_gatewayd_sources = files('''
@@ -58,9 +63,11 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
         install_data('browse.html',
                      install_dir : join_paths(pkgdatadir, 'gatewayd'))
 
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format('/var/log/journal/remote'))
-        meson.add_install_script('sh', '-c',
-                                 '''chown 0:0 $DESTDIR/var/log/journal/remote &&
-                                    chmod 755 $DESTDIR/var/log/journal/remote || :''')
+        if get_option('create-log-dirs')
+                meson.add_install_script('sh', '-c',
+                                         mkdir_p.format('/var/log/journal/remote'))
+                meson.add_install_script('sh', '-c',
+                                         '''chown 0:0 $DESTDIR/var/log/journal/remote &&
+                                            chmod 755 $DESTDIR/var/log/journal/remote || :''')
+        endif
 endif