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
|
2018-04-20 17:53:09 +00:00
|
|
|
PKG_VERSION:=20180409
|
2016-01-17 11:03:36 +00:00
|
|
|
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
|
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
|
2018-04-20 17:53:09 +00:00
|
|
|
PKG_HASH:=7af6f5bfc619fd29cbf0258c1d95107c38ce840ad6274e343e1e0d971fc72b51
|
2017-08-15 18:44:17 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
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
|
|
|
|
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))
|