2014-03-21 23:54:22 +08:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 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
|
2014-10-30 05:01:26 +08:00
|
|
|
PKG_VERSION:=20141019
|
2014-03-21 23:54:22 +08:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
2014-10-30 05:01:26 +08:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2014-03-21 23:54:22 +08:00
|
|
|
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
|
2014-10-30 05:01:26 +08:00
|
|
|
PKG_MD5SUM:=f619282081c8bfc65ea64c37fa5285ed
|
2014-03-21 23:54:22 +08:00
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/ca-certificates
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=System CA certificates
|
|
|
|
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
|
2014-03-23 19:59:37 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/ssl/certs
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt $(1)/etc/ssl/certs/
|
2014-09-25 15:38:02 +08: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 ; \
|
|
|
|
ln -s "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
|
|
|
|
done
|
2014-03-21 23:54:22 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,ca-certificates))
|