ca-caertificates: remove myself as PKG_MAINTAINER
[openwrt/staging/mkresin.git] / package / system / ca-certificates / Makefile
1 #
2 # Copyright (C) 2006-2017 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=ca-certificates
10 PKG_VERSION:=20180409
11 PKG_RELEASE:=3
12 PKG_MAINTAINER:=
13
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
16 PKG_HASH:=7af6f5bfc619fd29cbf0258c1d95107c38ce840ad6274e343e1e0d971fc72b51
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
18
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ca-certificates
24 SECTION:=base
25 CATEGORY:=Base system
26 TITLE:=System CA certificates
27 PKGARCH:=all
28 endef
29
30 define Package/ca-bundle
31 SECTION:=base
32 CATEGORY:=Base system
33 TITLE:=System CA certificates as a bundle
34 PKGARCH:=all
35 endef
36
37 define Build/Install
38 mkdir -p \
39 $(PKG_INSTALL_DIR)/usr/sbin \
40 $(PKG_INSTALL_DIR)/usr/share/ca-certificates
41 $(call Build/Install/Default,)
42 endef
43
44 define Package/ca-certificates/install
45 $(INSTALL_DIR) $(1)/etc/ssl/certs
46 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt $(1)/etc/ssl/certs/
47
48 for CERTFILE in `ls -1 $(1)/etc/ssl/certs`; do \
49 HASH=`openssl x509 -hash -noout -in $(1)/etc/ssl/certs/$$$$CERTFILE` ; \
50 SUFFIX=0 ; \
51 while [ -h "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
52 let "SUFFIX += 1" ; \
53 done ; \
54 $(LN) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
55 done
56 endef
57
58 define Package/ca-bundle/install
59 $(INSTALL_DIR) $(1)/etc/ssl/certs
60 cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
61 $(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
62 endef
63 $(eval $(call BuildPackage,ca-certificates))
64 $(eval $(call BuildPackage,ca-bundle))