X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=package%2FMakefile;h=1930d27cf8b31640ddf6aca8d6816312f81373d0;hb=77dee19ab42af55252a2e84aff406f8a754e744d;hp=df7cf79f2ec736e9315d13b08496adc5e35d7469;hpb=64f0b22052dbbbfa7a66cd3a13f17fccf155795d;p=oweals%2Fopenwrt.git diff --git a/package/Makefile b/package/Makefile index df7cf79f2e..1930d27cf8 100644 --- a/package/Makefile +++ b/package/Makefile @@ -10,39 +10,40 @@ curdir:=package -include $(TMP_DIR)/.packagedeps $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m)) $(curdir)/builddirs-install:=. -ifeq ($(SDK),1) -else - $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m)) - $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m)) -endif +$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m)) +$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m)) ifneq ($(IGNORE_ERRORS),) - $(curdir)/builddirs-ignore-compile:= $(if $(filter n m y, $(IGNORE_ERRORS)),$(foreach m,$(IGNORE_ERRORS),$(package-$(subst n,,$(m)))),$(package-m) $(package-)) + package-y-filter := $(package-y) + package-m-filter := $(filter-out $(package-y),$(package-m)) + package-n-filter := $(filter-out $(package-y) $(package-m),$(package-)) + package-ignore-errors := $(filter n m y,$(IGNORE_ERRORS)) + package-ignore-errors := $(if $(package-ignore-errors),$(package-ignore-errors),n m) + $(curdir)/builddirs-ignore-download := $(foreach m,$(package-ignore-errors),$(package-$(m)-filter)) + $(curdir)/builddirs-ignore-compile := $(foreach m,$(package-ignore-errors),$(package-$(m)-filter)) endif ifdef CONFIG_USE_MKLIBS define mklibs rm -rf $(TMP_DIR)/mklibs-progs $(TMP_DIR)/mklibs-out # first find all programs and add them to the mklibs list - find $(STAGING_DIR_ROOT) -type f -perm +100 -exec \ + find $(STAGING_DIR_ROOT) -type f -perm /100 -exec \ file -r -N -F '' {} + | \ awk ' /executable.*dynamically/ { print $$1 }' > $(TMP_DIR)/mklibs-progs # find all loadable objects that are not regular libraries and add them to the list as well find $(STAGING_DIR_ROOT) -type f -name \*.so\* -exec \ file -r -N -F '' {} + | \ - awk ' /shared object/ { print $$1 }' >> $(TMP_DIR)/mklibs-progs + awk ' /shared object/ { print $$1 }' > $(TMP_DIR)/mklibs-libs mkdir -p $(TMP_DIR)/mklibs-out $(STAGING_DIR_HOST)/bin/mklibs -D \ -d $(TMP_DIR)/mklibs-out \ --sysroot $(STAGING_DIR_ROOT) \ - -L /lib \ - -L /usr/lib \ - -L /usr/lib/ebtables \ + `cat $(TMP_DIR)/mklibs-libs | sed 's:/*[^/]\+/*$$::' | uniq | sed 's:^$(STAGING_DIR_ROOT):-L :'` \ --ldlib $(patsubst $(STAGING_DIR_ROOT)/%,/%,$(firstword $(wildcard \ $(foreach name,ld-uClibc.so.* ld-linux.so.* ld-*.so, \ $(STAGING_DIR_ROOT)/lib/$(name) \ )))) \ --target $(REAL_GNU_TARGET_NAME) \ - `cat $(TMP_DIR)/mklibs-progs` 2>&1 + `cat $(TMP_DIR)/mklibs-progs $(TMP_DIR)/mklibs-libs` 2>&1 $(RSTRIP) $(TMP_DIR)/mklibs-out for lib in `ls $(TMP_DIR)/mklibs-out/*.so.* 2>/dev/null`; do \ LIB="$${lib##*/}"; \ @@ -73,7 +74,7 @@ OPKG:= \ PACKAGE_INSTALL_FILES:= \ $(foreach pkg,$(sort $(package-y)), \ $(foreach variant, \ - $(if $(package/$(pkg)/variants), \ + $(if $(strip $(package/$(pkg)/variants)), \ $(package/$(pkg)/variants), \ $(if $(package/$(pkg)/default-variant), \ $(package/$(pkg)/default-variant), \ @@ -117,10 +118,35 @@ $(curdir)/install: $(TMP_DIR)/.build $(if $(CONFIG_CLEAN_IPKG),rm -rf $(TARGET_DIR)/usr/lib/opkg) $(call mklibs) +PASSOPT="" +PASSARG="" +ifndef CONFIG_OPKGSMIME_PASSPHRASE + ifneq ($(call qstrip,$(CONFIG_OPKGSMIME_PASSFILE)),) + PASSOPT="-passin" + PASSARG="file:$(call qstrip,$(CONFIG_OPKGSMIME_PASSFILE))" + endif +endif + $(curdir)/index: FORCE - @(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ - gzip -9c Packages > Packages.gz \ - ) + @echo Generating package index... + @(cd $(PACKAGE_DIR); \ + $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ + gzip -9c Packages > Packages.gz ) +ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_KEY)),) + @echo Signing key has not been configured +else +ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_CERT)),) + @echo Certificate has not been configured +else + @echo Signing package index... + @(cd $(PACKAGE_DIR); \ + openssl smime -binary -in Packages.gz \ + -out Packages.sig -outform PEM -sign \ + -signer $(CONFIG_OPKGSMIME_CERT) \ + -inkey $(CONFIG_OPKGSMIME_KEY) \ + $(PASSOPT) $(PASSARG) ) +endif +endif $(curdir)/preconfig: