]> git.saurik.com Git - apple/security.git/blob - keychains/Makefile
Security-176.tar.gz
[apple/security.git] / keychains / Makefile
1 #
2 # Makefile to install built-in roots and certificates
3 #
4 KEYCHAINS_SRC=$(SRCROOT)/keychains
5
6 SYSTEM_LIBRARY_DIR=$(DSTROOT)/System/Library
7 KEYCHAINS_DIR=$(SYSTEM_LIBRARY_DIR)/Keychains
8 ANCHORS_DIR=$(KEYCHAINS_DIR)/Anchors
9 CERTIFICATES_DIR=$(KEYCHAINS_DIR)/Certificates
10
11 #
12 # world-writable directory we need to create for CRL cache
13 #
14 CRL_CACHE_DIR=$(DSTROOT)/private/var/db/crls
15
16 #
17 # The other phases do nothing
18 #
19 build:
20 @echo null build.
21
22 debug:
23 @echo null debug.
24
25 profile:
26 @echo null profile.
27
28 installhdrs:
29 @echo null installhdrs.
30
31 installsrc:
32 @echo null installsrc.
33
34 clean:
35 @echo null clean.
36
37
38 #
39 # Install
40 #
41 install:
42 for d in "$(KEYCHAINS_DIR)" "$(ANCHORS_DIR)" "$(CERTIFICATES_DIR)"; do \
43 if [ ! -d "$${d}" ]; then \
44 mkdir -p "$${d}"; \
45 chown root:admin "$${d}"; \
46 chmod 755 "$${d}"; \
47 fi; \
48 done; \
49 find "$(KEYCHAINS_SRC)/roots" -maxdepth 1 -a -type f -exec cp {} "$(ANCHORS_DIR)" \; ; \
50 find "$(KEYCHAINS_SRC)/certs" -maxdepth 1 -a -type f -exec cp {} "$(CERTIFICATES_DIR)" \; ; \
51 chown root:admin "$(ANCHORS_DIR)/"*; \
52 chmod 664 "$(ANCHORS_DIR)/"*; \
53 chown root:admin "$(CERTIFICATES_DIR)/"*; \
54 chmod 664 "$(CERTIFICATES_DIR)/"*; \
55 if [ ! -d $(CRL_CACHE_DIR) ]; then \
56 mkdir -p $(CRL_CACHE_DIR); \
57 chown root:wheel $(CRL_CACHE_DIR); \
58 chmod 777 $(CRL_CACHE_DIR); \
59 fi