2015-05-31 17:45:54 +00:00
|
|
|
#
|
2017-08-15 18:44:17 +00:00
|
|
|
# Copyright (C) 2006-2017 OpenWrt.org
|
2014-03-21 15:54:22 +00:00
|
|
|
#
|
|
|
|
# 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
|
2019-03-13 23:53:41 +00:00
|
|
|
PKG_VERSION:=20190110
|
|
|
|
PKG_RELEASE:=1
|
2018-07-30 19:28:00 +00:00
|
|
|
PKG_MAINTAINER:=
|
2014-03-21 15:54:22 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
|
|
|
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
|
2019-03-13 23:53:41 +00:00
|
|
|
PKG_HASH:=ee4bf0f4c6398005f5b5ca4e0b87b82837ac5c3b0280a1cb3a63c47555c3a675
|
2014-03-21 15:54:22 +00:00
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/ca-certificates
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=System CA certificates
|
2016-01-17 11:03:36 +00:00
|
|
|
PKGARCH:=all
|
2014-03-21 15:54:22 +00:00
|
|
|
endef
|
|
|
|
|
2016-05-13 10:30:25 +00:00
|
|
|
define Package/ca-bundle
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=System CA certificates as a bundle
|
|
|
|
PKGARCH:=all
|
|
|
|
endef
|
|
|
|
|
2014-03-21 15:54:22 +00:00
|
|
|
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
|
2014-03-23 11:59:37 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/ssl/certs
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt $(1)/etc/ssl/certs/
|
2014-09-25 07:38:02 +00:00
|
|
|
|
|
|
|
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 ; \
|
2015-04-03 00:07:43 +00:00
|
|
|
$(LN) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
|
2014-09-25 07:38:02 +00:00
|
|
|
done
|
2014-03-21 15:54:22 +00:00
|
|
|
endef
|
|
|
|
|
2016-05-13 10:30:25 +00:00
|
|
|
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
|
2018-07-05 10:51:54 +00:00
|
|
|
$(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
|
2016-05-13 10:30:25 +00:00
|
|
|
endef
|
2014-03-21 15:54:22 +00:00
|
|
|
$(eval $(call BuildPackage,ca-certificates))
|
2016-05-13 10:30:25 +00:00
|
|
|
$(eval $(call BuildPackage,ca-bundle))
|