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
:=3286d3fc42c4d11b7086711a85f865b44065ce05cf1fb5376b2abed07622a9c6
22 include $(INCLUDE_DIR
)/package.mk
24 TAR_OPTIONS
+= --strip-components
1
25 TAR_CMD
=$(HOST_TAR
) -C
$(1) $(TAR_OPTIONS
)
27 define Package
/ca-certificates
30 TITLE
:=System CA certificates
35 define Package
/ca-bundle
38 TITLE
:=System CA certificates
as a bundle
45 $(PKG_INSTALL_DIR
)/usr
/sbin \
46 $(PKG_INSTALL_DIR
)/usr
/share
/ca-certificates
47 $(call Build
/Install
/Default
,)
50 define Package
/ca-certificates
/install
51 $(INSTALL_DIR
) $(1)/etc
/ssl
/certs
52 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/ca-certificates
/*/*.crt
$(1)/etc
/ssl
/certs
/
54 for CERTFILE in
`ls -1 $(1)/etc/ssl/certs`; do \
55 HASH
=`openssl x509 -hash -noout -in $(1)/etc/ssl/certs/$$$$CERTFILE` ; \
57 while
[ -h
"$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
60 $(LN
) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
64 define Package
/ca-bundle
/install
65 $(INSTALL_DIR
) $(1)/etc
/ssl
/certs
66 cat
$(PKG_INSTALL_DIR
)/usr
/share
/ca-certificates
/*/*.crt
>$(1)/etc
/ssl
/certs
/ca-certificates.crt
67 $(LN
) /etc
/ssl
/certs
/ca-certificates.crt
$(1)/etc
/ssl
/cert.pem
69 $(eval
$(call BuildPackage
,ca-bundle
))
70 $(eval
$(call BuildPackage
,ca-certificates
))