]> git.saurik.com Git - apple/security.git/blame - keychains/Makefile
Security-176.tar.gz
[apple/security.git] / keychains / Makefile
CommitLineData
29654253 1#
df0e469f 2# Makefile to install built-in roots and certificates
29654253
A
3#
4KEYCHAINS_SRC=$(SRCROOT)/keychains
5
6SYSTEM_LIBRARY_DIR=$(DSTROOT)/System/Library
7KEYCHAINS_DIR=$(SYSTEM_LIBRARY_DIR)/Keychains
2b1671fa
A
8ANCHORS_DIR=$(KEYCHAINS_DIR)/Anchors
9CERTIFICATES_DIR=$(KEYCHAINS_DIR)/Certificates
29654253 10
df0e469f
A
11#
12# world-writable directory we need to create for CRL cache
13#
14CRL_CACHE_DIR=$(DSTROOT)/private/var/db/crls
29654253
A
15
16#
17# The other phases do nothing
18#
19build:
20 @echo null build.
21
22debug:
23 @echo null debug.
24
25profile:
26 @echo null profile.
27
28installhdrs:
29 @echo null installhdrs.
30
31installsrc:
32 @echo null installsrc.
33
34clean:
35 @echo null clean.
36
37
38#
39# Install
40#
41install:
2b1671fa
A
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)/"*; \
df0e469f
A
55 if [ ! -d $(CRL_CACHE_DIR) ]; then \
56 mkdir -p $(CRL_CACHE_DIR); \
2b1671fa 57 chown root:wheel $(CRL_CACHE_DIR); \
df0e469f
A
58 chmod 777 $(CRL_CACHE_DIR); \
59 fi