aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/opkg/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-04-06 19:39:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-04-06 19:39:51 +0000
commitbeca028bd6bb71898052faadff680d8e76f61eb3 (patch)
tree14a05ceeedb3c6c18f4ff09eb0659b16ebb8e386 /package/system/opkg/Makefile
parentdde8214d167415015d42cc826ebb535f726dd90d (diff)
downloadupstream-beca028bd6bb71898052faadff680d8e76f61eb3.tar.gz
upstream-beca028bd6bb71898052faadff680d8e76f61eb3.tar.bz2
upstream-beca028bd6bb71898052faadff680d8e76f61eb3.zip
build: add integration for managing opkg package feed keys
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45286
Diffstat (limited to 'package/system/opkg/Makefile')
-rw-r--r--package/system/opkg/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
index 391adfa0d9..4f30ec2114 100644
--- a/package/system/opkg/Makefile
+++ b/package/system/opkg/Makefile
@@ -26,6 +26,8 @@ PKG_REMOVE_FILES = autogen.sh aclocal.m4
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES
+
PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
PKG_INSTALL:=1
@@ -91,7 +93,11 @@ CONFIGURE_ARGS += \
--with-opkglockfile=/var/lock/opkg.lock
ifeq ($(BUILD_VARIANT),smime)
- CONFIGURE_ARGS += --enable-openssl --enable-sha256
+ CONFIGURE_ARGS += --enable-openssl --enable-sha256 --disable-usign
+else
+ ifndef CONFIG_SIGNED_PACKAGES
+ CONFIGURE_ARGS += --disable-usign
+ endif
endif
MAKE_FLAGS = \
@@ -105,6 +111,9 @@ define Package/opkg/Default/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/opkg$(2).conf $(1)/etc/opkg.conf
+ ifneq ($(CONFIG_SIGNED_PACKAGES),)
+ echo "option check_signature 1" >> $(1)/etc/opkg.conf
+ endif
ifeq ($(CONFIG_PER_FEED_REPO),)
echo "src/gz %n %U" >> $(1)/etc/opkg.conf
else
@@ -121,7 +130,11 @@ define Package/opkg/Default/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
endef
-Package/opkg/install = $(call Package/opkg/Default/install,$(1),)
+define Package/opkg/install
+ $(call Package/opkg/Default/install,$(1),)
+ mkdir $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/opkg-key $(1)/usr/sbin/
+endef
define Package/opkg-smime/install
$(call Package/opkg/Default/install,$(1),-smime)