From ddd81fa3c6d6da130f149ba6373018696e7793a9 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 29 Aug 2021 13:59:55 +0200 Subject: [PATCH] - introduce package/pkg-configuration.mk --- make/environment-build.mk | 1 + make/target-ffmpeg.mk | 3 +-- make/target-neutrino.mk | 23 ++++++----------------- package/pkg-configuration.mk | 35 +++++++++++++++++++++++++++++++++++ support/config.example | 10 +++++----- 5 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 package/pkg-configuration.mk diff --git a/make/environment-build.mk b/make/environment-build.mk index bfff118f..4b4067d6 100644 --- a/make/environment-build.mk +++ b/make/environment-build.mk @@ -187,6 +187,7 @@ PKG_CONFIG_SYSROOT_DIR=$(TARGET_DIR) # ----------------------------------------------------------------------------- include package/pkg-utils.mk +include package/pkg-configuration.mk # ----------------------------------------------------------------------------- diff --git a/make/target-ffmpeg.mk b/make/target-ffmpeg.mk index 9442623a..253b13f1 100644 --- a/make/target-ffmpeg.mk +++ b/make/target-ffmpeg.mk @@ -307,8 +307,7 @@ FFMPEG_CONF_OPTS = \ --enable-swresample \ --enable-hardcoded-tables -BS_PACKAGE_FFMPEG_FFPLAY = no -ifeq ($(BS_PACKAGE_FFMPEG_FFPLAY),yes) +ifeq ($(BS_PACKAGE_FFMPEG_FFPLAY),y) FFMPEG_DEPENDENCIES += sdl2 FFMPEG_CONF_OPTS += --enable-ffplay FFMPEG_CONF_ENV += SDL_CONFIG=$(HOST_DIR)/bin/sdl2-config diff --git a/make/target-neutrino.mk b/make/target-neutrino.mk index 5252ad33..0eabdf5d 100644 --- a/make/target-neutrino.mk +++ b/make/target-neutrino.mk @@ -67,14 +67,6 @@ NEUTRINO_LDFLAGS += -lcrypto -ldl -lz # ----------------------------------------------------------------------------- -NEUTRINO_OMDB_API_KEY ?= 20711f9e -NEUTRINO_SHOUTCAST_DEV_KEY ?= fa1669MuiRPorUBw -NEUTRINO_TMDB_DEV_KEY ?= 7270f1b571c4ecbb5b204ddb7f8939b1 -NEUTRINO_YOUTUBE_DEV_KEY ?= AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM -NEUTRINO_WEATHER_DEV_KEY ?= - -# ----------------------------------------------------------------------------- - NEUTRINO_CONF_ENV = \ $(TARGET_MAKE_OPTS) \ \ @@ -105,11 +97,11 @@ NEUTRINO_CONF_OPTS = \ --enable-mdev \ --enable-pugixml \ \ - --with-omdb-api-key="$(NEUTRINO_OMDB_API_KEY)" \ - --with-shoutcast-dev-key="$(NEUTRINO_SHOUTCAST_DEV_KEY)" \ - --with-tmdb-dev-key="$(NEUTRINO_TMDB_DEV_KEY)" \ - --with-youtube-dev-key="$(NEUTRINO_YOUTUBE_DEV_KEY)" \ - --with-weather-dev-key="$(NEUTRINO_WEATHER_DEV_KEY)" \ + --with-omdb-api-key="$(BS_PACKAGE_NEUTRINO_OMDB_API_KEY)" \ + --with-shoutcast-dev-key="$(BS_PACKAGE_NEUTRINO_SHOUTCAST_DEV_KEY)" \ + --with-tmdb-dev-key="$(BS_PACKAGE_NEUTRINO_TMDB_DEV_KEY)" \ + --with-youtube-dev-key="$(BS_PACKAGE_NEUTRINO_YOUTUBE_DEV_KEY)" \ + --with-weather-dev-key="$(BS_PACKAGE_NEUTRINO_WEATHER_DEV_KEY)" \ \ --with-target=cdk \ --with-targetprefix=$(prefix) \ @@ -156,10 +148,7 @@ endif NEUTRINO_DEPENDENCIES += lcd4linux NEUTRINO_CONF_OPTS += --enable-lcd4linux -# enable ffmpeg audio decoder in neutrino -NEUTRINO_AUDIODEC = ffmpeg - -ifeq ($(NEUTRINO_AUDIODEC),ffmpeg) +ifeq ($(BS_PACKAGE_NEUTRINO_AUDIODEC_FFMPEG),y) NEUTRINO_CONF_OPTS += --enable-ffmpegdec else NEUTRINO_DEPENDENCIES += libid3tag diff --git a/package/pkg-configuration.mk b/package/pkg-configuration.mk new file mode 100644 index 00000000..97882e1c --- /dev/null +++ b/package/pkg-configuration.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# This file contains various configurations used by the packages. +# Configuration keys may be overridden in config.local +# +################################################################################ + +# ffmpeg: build ffplay +BS_PACKAGE_FFMPEG_FFPLAY ?= n + +# ncurses: build wide-character libraries +BS_PACKAGE_NCURSES_WCHAR ?= y + +# neutrino: use ffmpeg audio decoder +BS_PACKAGE_NEUTRINO_AUDIODEC_FFMPEG ?= y + +# neutrino: omdb api key +BS_PACKAGE_NEUTRINO_OMDB_API_KEY ?= $(NEUTRINO_OMDB_API_KEY) +BS_PACKAGE_NEUTRINO_OMDB_API_KEY ?= 20711f9e + +# neutrino: shoutcast api key +BS_PACKAGE_NEUTRINO_SHOUTCAST_DEV_KEY ?= $(NEUTRINO_SHOUTCAST_DEV_KEY) +BS_PACKAGE_NEUTRINO_SHOUTCAST_DEV_KEY ?= fa1669MuiRPorUBw + +# neutrino: tmdb api key +BS_PACKAGE_NEUTRINO_TMDB_DEV_KEY ?= $(NEUTRINO_TMDB_DEV_KEY) +BS_PACKAGE_NEUTRINO_TMDB_DEV_KEY ?= 7270f1b571c4ecbb5b204ddb7f8939b1 + +# neutrino: youtube api key +BS_PACKAGE_NEUTRINO_YOUTUBE_DEV_KEY ?= $(NEUTRINO_YOUTUBE_DEV_KEY) +BS_PACKAGE_NEUTRINO_YOUTUBE_DEV_KEY ?= AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM + +# neutrino: weather api key +BS_PACKAGE_NEUTRINO_WEATHER_DEV_KEY ?= $(NEUTRINO_WEATHER_DEV_KEY) +BS_PACKAGE_NEUTRINO_WEATHER_DEV_KEY ?= diff --git a/support/config.example b/support/config.example index fd027c32..53746b51 100644 --- a/support/config.example +++ b/support/config.example @@ -59,11 +59,11 @@ MAINTAINER = $(shell whoami) # ----------------------------------------------------------------------------- # Neutrino API keys -#NEUTRINO_OMDB_API_KEY = -#NEUTRINO_SHOUTCAST_DEV_KEY = -#NEUTRINO_TMDB_DEV_KEY = -#NEUTRINO_YOUTUBE_DEV_KEY = -#NEUTRINO_WEATHER_DEV_KEY = +#BS_PACKAGE_NEUTRINO_OMDB_API_KEY = +#BS_PACKAGE_NEUTRINO_SHOUTCAST_DEV_KEY = +#BS_PACKAGE_NEUTRINO_TMDB_DEV_KEY = +#BS_PACKAGE_NEUTRINO_YOUTUBE_DEV_KEY = +#BS_PACKAGE_NEUTRINO_WEATHER_DEV_KEY = # -----------------------------------------------------------------------------