2 # Copyright (C) 2006-2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
9 PKG_NAME
:=ca-certificates
14 PKG_LICENSE
:=GPL-2.0
-or-later MPL-2.0
15 PKG_LICENSE_FILES
:=debian
/copyright
17 PKG_SOURCE
:=$(PKG_NAME
)_
$(PKG_VERSION
).
tar.xz
18 PKG_SOURCE_URL
:=@DEBIAN
/pool
/main
/c
/ca-certificates
19 PKG_HASH
:=33b44ef78653ecd3f0f2f13e5bba6be466be2e7da72182f737912b81798ba5d2
22 include $(INCLUDE_DIR
)/package.mk
24 TAR_OPTIONS
+= --strip-components
1
25 TAR_CMD
=$(HOST_TAR
) -C
$(1) $(TAR_OPTIONS
)
27 # ca-certs is deprecated and new packages should use ca-certificates-any if
28 # they don't need a specific package
29 define Package
/ca-certificates
32 TITLE
:=System CA certificates
37 define Package
/ca-bundle
40 TITLE
:=System CA certificates
as a bundle
42 PROVIDES
:=@ca-certs @ca-certificates-any
47 $(PKG_INSTALL_DIR
)/usr
/sbin \
48 $(PKG_INSTALL_DIR
)/usr
/share
/ca-certificates
49 $(call Build
/Install
/Default
,)
52 define Package
/ca-certificates
/install
53 $(INSTALL_DIR
) $(1)/etc
/ssl
/certs
54 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/ca-certificates
/*/*.crt
$(1)/etc
/ssl
/certs
/
56 for CERTFILE in
`ls -1 $(1)/etc/ssl/certs`; do \
57 HASH
=`openssl x509 -hash -noout -in $(1)/etc/ssl/certs/$$$$CERTFILE` ; \
59 while
[ -h
"$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
62 $(LN
) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
66 define Package
/ca-bundle
/install
67 $(INSTALL_DIR
) $(1)/etc
/ssl
/certs
68 cat
$(PKG_INSTALL_DIR
)/usr
/share
/ca-certificates
/*/*.crt
>$(1)/etc
/ssl
/certs
/ca-certificates.crt
69 $(LN
) /etc
/ssl
/certs
/ca-certificates.crt
$(1)/etc
/ssl
/cert.pem
71 $(eval
$(call BuildPackage
,ca-bundle
))
72 $(eval
$(call BuildPackage
,ca-certificates
))