Browse Source

- use SED variable

master
vanhofen 4 years ago
parent
commit
8d75957905
  1. 2
      make/bootstrap.mk
  2. 2
      make/crosstool.mk
  3. 20
      make/helpers.mk
  4. 8
      make/image-updates.mk
  5. 2
      make/neutrino-plugins.mk
  6. 14
      make/target-libs.mk
  7. 8
      make/target-lua.mk
  8. 4
      make/target-tools-unused.mk
  9. 18
      make/target-tools.mk
  10. 2
      make/update.mk

2
make/bootstrap.mk

@ -34,7 +34,7 @@ bootstrap: $(BOOTSTRAP)
skeleton: | $(TARGET_DIR)
$(INSTALL_COPY) --remove-destination $(SKEL-ROOT)/. $(TARGET_DIR)/
sed -i 's|%(BOOT_PARTITION)|$(BOOT_PARTITION)|' $(TARGET_sysconfdir)/mdev.conf
$(SED) 's|%(BOOT_PARTITION)|$(BOOT_PARTITION)|' $(TARGET_sysconfdir)/mdev.conf
$(INSTALL_COPY) $(STATIC_DIR)/. $(TARGET_DIR)/
# -----------------------------------------------------------------------------

2
make/crosstool.mk

@ -99,7 +99,7 @@ endif
$(CHDIR)/$(CROSSTOOL-NG_DIR); \
unset CONFIG_SITE LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE; \
$(INSTALL_DATA) $(CROSSTOOL-NG_CONFIG) .config; \
sed -i "s|^CT_PARALLEL_JOBS=.*|CT_PARALLEL_JOBS=$(PARALLEL_JOBS)|" .config; \
$(SED) "s|^CT_PARALLEL_JOBS=.*|CT_PARALLEL_JOBS=$(PARALLEL_JOBS)|" .config; \
export NI_LOCAL_TARBALLS_DIR=$(DL_DIR); \
export NI_PREFIX_DIR=$(@); \
export NI_KERNEL_VERSION=$(KERNEL_VER); \

20
make/helpers.mk

@ -47,9 +47,8 @@ github = https://github.com/$(1)/$(2)/archive/$(3)
# -----------------------------------------------------------------------------
# rewrite libtool libraries
REWRITE_LIBTOOL_RULES = sed -i \
-e "s,^libdir=.*,libdir='$(TARGET_libdir)'," \
-e "s,\(^dependency_libs='\| \|-L\|^dependency_libs='\)/lib,\ $(TARGET_libdir),g"
REWRITE_LIBTOOL_RULES = $(SED) "s,^libdir=.*,libdir='$(TARGET_libdir)',; \
s,\(^dependency_libs='\| \|-L\|^dependency_libs='\)/lib,\ $(TARGET_libdir),g"
REWRITE_LIBTOOL = $(REWRITE_LIBTOOL_RULES) $(TARGET_libdir)
REWRITE_LIBTOOL_STATIC = $(REWRITE_LIBTOOL_RULES) $(STATIC_libdir)
@ -74,11 +73,10 @@ REWRITE_LIBTOOL_LA = $(call rewrite_libtool)
# -----------------------------------------------------------------------------
# rewrite pkg-config files
REWRITE_CONFIG_RULES = sed -i \
-e "s,^prefix=.*,prefix='$(TARGET_prefix)'," \
-e "s,^exec_prefix=.*,exec_prefix='$(TARGET_exec_prefix)'," \
-e "s,^libdir=.*,libdir='$(TARGET_libdir)'," \
-e "s,^includedir=.*,includedir='$(TARGET_includedir)',"
REWRITE_CONFIG_RULES = $(SED) "s,^prefix=.*,prefix='$(TARGET_prefix)',; \
s,^exec_prefix=.*,exec_prefix='$(TARGET_exec_prefix)',; \
s,^libdir=.*,libdir='$(TARGET_libdir)',; \
s,^includedir=.*,includedir='$(TARGET_includedir)',"
REWRITE_CONFIG = $(REWRITE_CONFIG_RULES)
REWRITE_PKGCONF = $(REWRITE_CONFIG_RULES) $(PKG_CONFIG_PATH)
@ -108,17 +106,17 @@ REWRITE_PKGCONF_PC = $(call rewrite_pkgconf)
#
define KCONFIG_ENABLE_OPT # (option, file)
sed -i -e "/\\<$(1)\\>/d" $(2)
$(SED) "/\\<$(1)\\>/d" $(2)
echo '$(1)=y' >> $(2)
endef
define KCONFIG_SET_OPT # (option, value, file)
sed -i -e "/\\<$(1)\\>/d" $(3)
$(SED) "/\\<$(1)\\>/d" $(3)
echo '$(1)=$(2)' >> $(3)
endef
define KCONFIG_DISABLE_OPT # (option, file)
sed -i -e "/\\<$(1)\\>/d" $(2)
$(SED) "/\\<$(1)\\>/d" $(2)
echo '# $(1) is not set' >> $(2)
endef

8
make/image-updates.mk

@ -118,7 +118,7 @@ matze-192-130:
# remove non-printable chars and re-format xml-files
$(CD) $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/; \
for file in *.xml; do \
sed -i 's/[^[:print:]]//g' $$file; \
$(SED) 's/[^[:print:]]//g' $$file; \
XMLLINT_INDENT=" " \
xmllint --format $$file > _$$file; \
mv _$$file $$file; \
@ -127,11 +127,11 @@ matze-192-130:
# Astra 19.2
P192=`grep -m 1 'position=\"192\"' $(SOURCE_DIR)/$(NI-NEUTRINO)/data/config/satellites.xml`; \
P192=`echo $$P192`; \
sed -i "/position=\"192\"/c\ $$P192" $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/services.xml
$(SED) "/position=\"192\"/c\ $$P192" $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/services.xml
# Hotbird 13.0
P130=`grep -m 1 'position=\"130\"' $(SOURCE_DIR)/$(NI-NEUTRINO)/data/config/satellites.xml`; \
P130=`echo $$P130`; \
sed -i "/position=\"130\"/c\ $$P130" $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/services.xml
$(SED) "/position=\"130\"/c\ $$P130" $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/services.xml
#
# we should try to keep this array table up-to-date ;-)
#
@ -168,7 +168,7 @@ initial-settings: matze-192
cp temp_inst/inst/var/tuxbox/config/zapit/* $(SOURCE_DIR)/$(NI-NEUTRINO)/data/initial/
P192=`grep -m 1 'position=\"192\"' $(SOURCE_DIR)/$(NI-NEUTRINO)/data/config/satellites.xml`; \
P192=`echo $$P192`; \
sed -i "/position=\"192\"/c\ $$P192" $(SOURCE_DIR)/$(NI-NEUTRINO)/data/initial/services.xml
$(SED) "/position=\"192\"/c\ $$P192" $(SOURCE_DIR)/$(NI-NEUTRINO)/data/initial/services.xml
@echo -e "$(TERM_YELLOW)Commit your changes in $(SOURCE_DIR)/$(NI-NEUTRINO)/data/initial$(TERM_NORMAL)"
# -----------------------------------------------------------------------------

2
make/neutrino-plugins.mk

@ -225,7 +225,7 @@ links: $(LINKS_DEPS) $(DL_DIR)/$(LINKS_SOURCE) $(SHARE_PLUGINS) | $(TARGET_DIR)
$(REMOVE)/$(LINKS_DIR)
$(UNTAR)/$(LINKS_SOURCE)
$(CHDIR)/$(LINKS_DIR)/intl; \
sed -i -e 's|^T_SAVE_HTML_OPTIONS,.*|T_SAVE_HTML_OPTIONS, "HTML-Optionen speichern",|' german.lng; \
$(SED) 's|^T_SAVE_HTML_OPTIONS,.*|T_SAVE_HTML_OPTIONS, "HTML-Optionen speichern",|' german.lng; \
echo "english" > index.txt; \
echo "german" >> index.txt; \
./gen-intl

14
make/target-libs.mk

@ -252,7 +252,7 @@ freetype: $(FREETYPE_DEPS) $(DL_DIR)/$(FREETYPE_SOURCE) | $(TARGET_DIR)
$(UNTAR)/$(FREETYPE_SOURCE)
$(CHDIR)/$(FREETYPE_DIR); \
$(call apply_patches, $(FREETYPE_PATCH)); \
sed -i '/^FONT_MODULES += \(type1\|cid\|pfr\|type42\|pcf\|bdf\|winfonts\|cff\)/d' modules.cfg
$(SED) '|^FONT_MODULES += \(type1\|cid\|pfr\|type42\|pcf\|bdf\|winfonts\|cff\)|d' modules.cfg
$(CHDIR)/$(FREETYPE_DIR)/builds/unix; \
libtoolize --force --copy; \
aclocal -I .; \
@ -352,9 +352,9 @@ openssl: $(DL_DIR)/$(OPENSSL_SOURCE) | $(TARGET_DIR)
--prefix=$(prefix)/ \
--openssldir=/etc/ssl \
; \
sed -i "s| build_tests||" Makefile; \
sed -i 's|^MANDIR=.*|MANDIR=$(REMOVE_mandir)|' Makefile; \
sed -i 's|^HTMLDIR=.*|HTMLDIR=$(REMOVE_htmldir)|' Makefile; \
$(SED) 's| build_tests||' Makefile; \
$(SED) 's|^MANDIR=.*|MANDIR=$(REMOVE_mandir)|' Makefile; \
$(SED) 's|^HTMLDIR=.*|HTMLDIR=$(REMOVE_htmldir)|' Makefile; \
$(MAKE) depend; \
$(MAKE); \
$(MAKE) install_sw INSTALL_PREFIX=$(TARGET_DIR)
@ -1002,7 +1002,7 @@ libtirpc: $(DL_DIR)/$(LIBTIRPC_SOURCE) | $(TARGET_DIR)
$(REWRITE_LIBTOOL_LA)
$(REWRITE_PKGCONF_PC)
ifeq ($(BOXSERIES), hd1)
sed -i -e '/^\(udp\|tcp\)6/ d' $(TARGET_sysconfdir)/netconfig
$(SED) '/^\(udp\|tcp\)6/ d' $(TARGET_sysconfdir)/netconfig
endif
$(REMOVE)/$(LIBTIRPC_DIR)
$(TOUCH)
@ -1116,7 +1116,7 @@ libvorbisidec: $(LIBVORBISIDEC_DEPS) $(DL_DIR)/$(LIBVORBISIDEC_SOURCE) | $(TARGE
$(REMOVE)/$(LIBVORBISIDEC_DIR)
$(UNTAR)/$(LIBVORBISIDEC_SOURCE)
$(CHDIR)/$(LIBVORBISIDEC_DIR); \
sed -i '122 s/^/#/' configure.in; \
$(SED) '122 s/^/#/' configure.in; \
autoreconf -fi; \
$(CONFIGURE) \
--prefix=$(prefix) \
@ -1352,7 +1352,7 @@ libiconv: $(DL_DIR)/$(LIBICONV_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(LIBICONV_DIR)
$(UNTAR)/$(LIBICONV_SOURCE)
$(CHDIR)/$(LIBICONV_DIR); \
sed -i -e '/preload/d' Makefile.in; \
$(SED) '/preload/d' Makefile.in; \
$(CONFIGURE) CPPFLAGS="$(TARGET_CPPFLAGS) -fPIC" \
--target=$(TARGET) \
--prefix=$(prefix) \

8
make/target-lua.mk

@ -54,9 +54,9 @@ luaexpat: $(LUAEXPAT_DEPS) $(DL_DIR)/$(LUAEXPAT_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(LUAEXPAT_DIR)
$(UNTAR)/$(LUAEXPAT_SOURCE)
$(CHDIR)/$(LUAEXPAT_DIR); \
sed -i 's|^EXPAT_INC=.*|EXPAT_INC= $(TARGET_includedir)|' makefile; \
sed -i 's|^CFLAGS =.*|& -L$(TARGET_libdir)|' makefile; \
sed -i 's|^CC =.*|CC = $(TARGET_CC)|' makefile; \
$(SED) 's|^EXPAT_INC=.*|EXPAT_INC= $(TARGET_includedir)|' makefile; \
$(SED) 's|^CFLAGS =.*|& -L$(TARGET_libdir)|' makefile; \
$(SED) 's|^CC =.*|CC = $(TARGET_CC)|' makefile; \
$(MAKE_ENV) \
$(MAKE) \
PREFIX=$(TARGET_prefix) \
@ -85,7 +85,7 @@ lua-feedparser: $(LUA-DEEDPARSER_DEPS) $(DL_DIR)/$(LUA-FEEDPARSER_SOURCE) | $(TA
$(REMOVE)/$(LUA-FEEDPARSER_DIR)
$(UNTAR)/$(LUA-FEEDPARSER_SOURCE)
$(CHDIR)/$(LUA-FEEDPARSER_DIR); \
sed -i 's|^PREFIX =|PREFIX ?=|' Makefile; \
$(SED) 's|^PREFIX =|PREFIX ?=|' Makefile; \
$(call apply_patches, $(LUA-FEEDPARSER_PATCH)); \
$(MAKE) install PREFIX=$(TARGET_prefix)
$(REMOVE)/$(LUA-FEEDPARSER_DIR)

4
make/target-tools-unused.mk

@ -159,8 +159,8 @@ iozone: $(DL_DIR)/$(IOZONE_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(IOZONE_DIR)
$(UNTAR)/$(IOZONE_SOURCE)
$(CHDIR)/$(IOZONE_DIR)/src/current; \
sed -i -e "s/= gcc/= $(TARGET_CC)/" makefile; \
sed -i -e "s/= cc/= $(TARGET_CC)/" makefile; \
$(SED) "s/= gcc/= $(TARGET_CC)/" makefile; \
$(SED) "s/= cc/= $(TARGET_CC)/" makefile; \
$(MAKE_ENV) \
$(MAKE) linux-arm; \
$(INSTALL_EXEC) iozone $(TARGET_bindir)/

18
make/target-tools.mk

@ -567,7 +567,7 @@ ushare: $(USHARE_DEPS) $(DL_DIR)/$(USHARE_SOURCE)| $(TARGET_DIR)
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(INSTALL_DATA) -D $(TARGET_FILES)/configs/ushare.conf $(TARGET_sysconfdir)/ushare.conf
sed -i 's|%(BOXTYPE)|$(BOXTYPE)|; s|%(BOXMODEL)|$(BOXMODEL)|' $(TARGET_sysconfdir)/ushare.conf
$(SED) 's|%(BOXTYPE)|$(BOXTYPE)|; s|%(BOXMODEL)|$(BOXMODEL)|' $(TARGET_sysconfdir)/ushare.conf
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/ushare.init $(TARGET_sysconfdir)/init.d/ushare
$(UPDATE-RC.D) ushare defaults 75 25
$(REMOVE)/$(USHARE_DIR)
@ -652,8 +652,8 @@ vsftpd: $(VSFTPD_DEPS) $(DL_DIR)/$(VSFTPD_SOURCE) | $(TARGET_DIR)
$(UNTAR)/$(VSFTPD_SOURCE)
$(CHDIR)/$(VSFTPD_DIR); \
$(call apply_patches, $(VSFTPD_PATCH)); \
sed -i -e 's/.*VSF_BUILD_PAM/#undef VSF_BUILD_PAM/' builddefs.h; \
sed -i -e 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' builddefs.h; \
$(SED) 's/.*VSF_BUILD_PAM/#undef VSF_BUILD_PAM/' builddefs.h; \
$(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' builddefs.h; \
$(MAKE) clean; \
$(MAKE) $(MAKE_ENV) LIBS="-lcrypt -lcrypto -lssl"; \
$(INSTALL_EXEC) -D vsftpd $(TARGET_sbindir)/vsftpd
@ -912,7 +912,7 @@ autofs: $(AUTOFS_DEPS) $(DL_DIR)/$(AUTOFS_SOURCE) | $(TARGET_DIR)
$(UNTAR)/$(AUTOFS_SOURCE)
$(CHDIR)/$(AUTOFS_DIR); \
$(call apply_patches, $(addprefix $(@F)/,$(AUTOFS_PATCH))); \
sed -i "s|nfs/nfs.h|linux/nfs.h|" include/rpc_subs.h; \
$(SED) "s|nfs/nfs.h|linux/nfs.h|" include/rpc_subs.h; \
export ac_cv_linux_procfs=yes; \
export ac_cv_path_KRB5_CONFIG=no; \
export ac_cv_path_MODPROBE=/sbin/modprobe; \
@ -1199,8 +1199,8 @@ fbshot: $(FBSHOT_DEPS) $(DL_DIR)/$(FBSHOT_SOURCE) | $(TARGET_DIR)
$(UNTAR)/$(FBSHOT_SOURCE)
$(CHDIR)/$(FBSHOT_DIR); \
$(call apply_patches, $(FBSHOT_PATCH)); \
sed -i 's| gcc | $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) |' Makefile; \
sed -i '/strip fbshot/d' Makefile; \
$(SED) 's| gcc | $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) |' Makefile; \
$(SED) '/strip fbshot/d' Makefile; \
$(MAKE) all; \
$(INSTALL_EXEC) -D fbshot $(TARGET_bindir)/fbshot
$(REMOVE)/$(FBSHOT_DIR)
@ -1642,7 +1642,7 @@ ofgwrite: $(SOURCE_DIR)/$(NI-OFGWRITE) | $(TARGET_DIR)
$(INSTALL_EXEC) $(BUILD_DIR)/$(NI-OFGWRITE)/ofgwrite_bin $(TARGET_bindir)
$(INSTALL_EXEC) $(BUILD_DIR)/$(NI-OFGWRITE)/ofgwrite_caller $(TARGET_bindir)
$(INSTALL_EXEC) $(BUILD_DIR)/$(NI-OFGWRITE)/ofgwrite $(TARGET_bindir)
sed -i 's|prefix=.*|prefix=$(prefix)|' $(TARGET_bindir)/ofgwrite
$(SED) 's|prefix=.*|prefix=$(prefix)|' $(TARGET_bindir)/ofgwrite
$(REMOVE)/$(NI-OFGWRITE)
$(TOUCH)
@ -1740,8 +1740,8 @@ gptfdisk: $(GPTFDISK_DEPS) $(DL_DIR)/$(GPTFDISK_SOURCE) | $(TARGET_DIR)
$(UNTAR)/$(GPTFDISK_SOURCE)
$(CHDIR)/$(GPTFDISK_DIR); \
$(call apply_patches, $(GPTFDISK_PATCH)); \
sed -i 's|^CC=.*|CC=$(TARGET_CC)|' Makefile; \
sed -i 's|^CXX=.*|CXX=$(TARGET_CXX)|' Makefile; \
$(SED) 's|^CC=.*|CC=$(TARGET_CC)|' Makefile; \
$(SED) 's|^CXX=.*|CXX=$(TARGET_CXX)|' Makefile; \
$(MAKE_ENV) \
$(MAKE) sgdisk; \
$(INSTALL_EXEC) -D sgdisk $(TARGET_sbindir)/sgdisk

2
make/update.mk

@ -131,7 +131,7 @@ URL_NEW = $(if $(filter $(USE_SSH),y),$(GITHUB_SSH):neutrino-images,$(GITHUB)/ne
switch-url:
for repo in $(REPOSITORIES); do \
sed -i -e 's|url = $(URL_OLD)|url = $(URL_NEW)|' $$repo/.git/config; \
$(SED) 's|url = $(URL_OLD)|url = $(URL_NEW)|' $$repo/.git/config; \
done
# -----------------------------------------------------------------------------

Loading…
Cancel
Save