imagebuilder: add package signature verification
[openwrt/staging/chunkeey.git] / target / imagebuilder / Makefile
index 8b2f4e5af6b09665500bca7b2cf8f72dc2ea878a..a96f8618e839681774ea3a394bb3437084e5870f 100644 (file)
@@ -61,6 +61,14 @@ else
                -exec $(CP) -t $(IB_LDIR)/ {} +
 endif
 
+ifneq ($(CONFIG_SIGNATURE_CHECK),)
+       echo ''                                                        >> $(PKG_BUILD_DIR)/repositories.conf
+       echo 'option check_signature'                                  >> $(PKG_BUILD_DIR)/repositories.conf
+       $(INSTALL_DIR) $(PKG_BUILD_DIR)/keys
+       $(CP) -L $(STAGING_DIR_ROOT)/etc/opkg/keys/ $(PKG_BUILD_DIR)/
+       $(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
+endif
+
        $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
        if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
                $(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \