mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
a2a226e6e8
Update to 20170717 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
63 lines
1.7 KiB
Makefile
63 lines
1.7 KiB
Makefile
#
|
|
# Copyright (C) 2006-2017 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=ca-certificates
|
|
PKG_VERSION:=20170717
|
|
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
|
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
|
|
PKG_HASH:=e487639b641fa75445174734dd6e9d600373e3248b3d86a7e3c6d0f6977decd2
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/ca-certificates
|
|
SECTION:=base
|
|
CATEGORY:=Base system
|
|
TITLE:=System CA certificates
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Package/ca-bundle
|
|
SECTION:=base
|
|
CATEGORY:=Base system
|
|
TITLE:=System CA certificates as a bundle
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Build/Install
|
|
mkdir -p \
|
|
$(PKG_INSTALL_DIR)/usr/sbin \
|
|
$(PKG_INSTALL_DIR)/usr/share/ca-certificates
|
|
$(call Build/Install/Default,)
|
|
endef
|
|
|
|
define Package/ca-certificates/install
|
|
$(INSTALL_DIR) $(1)/etc/ssl/certs
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt $(1)/etc/ssl/certs/
|
|
|
|
for CERTFILE in `ls -1 $(1)/etc/ssl/certs`; do \
|
|
HASH=`openssl x509 -hash -noout -in $(1)/etc/ssl/certs/$$$$CERTFILE` ; \
|
|
SUFFIX=0 ; \
|
|
while [ -h "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
|
|
let "SUFFIX += 1" ; \
|
|
done ; \
|
|
$(LN) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
|
|
done
|
|
endef
|
|
|
|
define Package/ca-bundle/install
|
|
$(INSTALL_DIR) $(1)/etc/ssl/certs
|
|
cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
|
|
endef
|
|
$(eval $(call BuildPackage,ca-certificates))
|
|
$(eval $(call BuildPackage,ca-bundle))
|