From patchwork Wed Mar 3 22:32:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_=C3=96lmann?= X-Patchwork-Id: 12115173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AD67C433E6 for ; Thu, 4 Mar 2021 00:33:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF08A64EBA for ; Thu, 4 Mar 2021 00:33:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352026AbhCDAdK (ORCPT ); Wed, 3 Mar 2021 19:33:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391340AbhCCWfk (ORCPT ); Wed, 3 Mar 2021 17:35:40 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88897C0613DC for ; Wed, 3 Mar 2021 14:32:44 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHa2t-000466-7u; Wed, 03 Mar 2021 23:32:43 +0100 Received: from uol by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lHa2s-0006vH-Vn; Wed, 03 Mar 2021 23:32:42 +0100 From: =?utf-8?q?Ulrich_=C3=96lmann?= To: linux-media@vger.kernel.org Cc: =?utf-8?q?Ulrich_=C3=96lmann?= Subject: [PATCH v4l-utils 1/2] configure.ac: autodetect availability of systemd Date: Wed, 3 Mar 2021 23:32:33 +0100 Message-Id: <20210303223234.26567-1-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: uol@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Import systemd's official suggestion [1] how this should be handled in packages using autoconf. [1] https://www.freedesktop.org/software/systemd/man/daemon.html#Installing%20systemd%20Service%20Files Signed-off-by: Ulrich Ölmann --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 727730c5ccf4..f62ad7cb25ae 100644 --- a/configure.ac +++ b/configure.ac @@ -388,7 +388,15 @@ AC_ARG_WITH(udevdir, AC_ARG_WITH(systemdsystemunitdir, AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [set systemd system unit directory]), [], - [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd || echo /lib/systemd/system`]) + [with_systemdsystemunitdir=auto]) +AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], + [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) + AS_IF([test "x$def_systemdsystemunitdir" = "x"], + [AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], + [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) + with_systemdsystemunitdir=no], + [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) +AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) # Generic check: works with most distributions def_gconv_dir=`for i in /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib; do if @<:@ -d \$i/gconv @:>@; then echo \$i/gconv; break; fi; done` From patchwork Wed Mar 3 22:32:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_=C3=96lmann?= X-Patchwork-Id: 12115175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53EFBC433DB for ; Thu, 4 Mar 2021 00:33:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28F4F64EBA for ; Thu, 4 Mar 2021 00:33:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377117AbhCDAdL (ORCPT ); Wed, 3 Mar 2021 19:33:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391490AbhCCWhi (ORCPT ); Wed, 3 Mar 2021 17:37:38 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 927A4C0613DD for ; Wed, 3 Mar 2021 14:32:44 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHa2t-000467-8w; Wed, 03 Mar 2021 23:32:43 +0100 Received: from uol by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lHa2t-0006vJ-0D; Wed, 03 Mar 2021 23:32:43 +0100 From: =?utf-8?q?Ulrich_=C3=96lmann?= To: linux-media@vger.kernel.org Cc: =?utf-8?q?Ulrich_=C3=96lmann?= Subject: [PATCH v4l-utils 2/2] keytable: restrict installation of 50-rc_keymap.conf Date: Wed, 3 Mar 2021 23:32:34 +0100 Message-Id: <20210303223234.26567-2-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210303223234.26567-1-u.oelmann@pengutronix.de> References: <20210303223234.26567-1-u.oelmann@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: uol@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org It is only needed if BPF is effectively used and the package is compiled for a systemd based target. Signed-off-by: Ulrich Ölmann --- utils/keytable/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am index c5eb414acf2f..eee61f0e0551 100644 --- a/utils/keytable/Makefile.am +++ b/utils/keytable/Makefile.am @@ -3,9 +3,13 @@ man_MANS = ir-keytable.1 rc_keymap.5 sysconf_DATA = rc_maps.cfg keytablesystem_DATA = $(srcdir)/rc_keymaps/* udevrules_DATA = 70-infrared.rules +if WITH_BPF +if HAVE_SYSTEMD if HAVE_UDEVDSYSCALLFILTER systemdsystemunit_DATA = 50-rc_keymap.conf endif +endif +endif ir_keytable_SOURCES = keytable.c parse.h ir-encode.c ir-encode.h toml.c toml.h keymap.c keymap.h