]> git.saurik.com Git - apple/libresolv.git/blob - xcodescripts/manpages.sh
libresolv-65.200.2.tar.gz
[apple/libresolv.git] / xcodescripts / manpages.sh
1 #!/bin/bash
2 set -e -x
3
4 # don't install man pages for installhdrs, installapi, or iOS builds
5 if [ "$ACTION" = installapi ]; then exit 0; fi
6 if [ "$ACTION" = installhdrs ]; then exit 0; fi
7 if [ "${PLATFORM_NAME}" != "macosx" ]; then exit 0; fi
8
9 MANDIR="$DSTROOT"/usr/share/man
10
11 install -d -m 0755 -o "$INSTALL_OWNER" -g "$INSTALL_GROUP" \
12 "$MANDIR"/man3 \
13 "$MANDIR"/man5
14
15 install -c -m 0644 -o "$INSTALL_OWNER" -g "$INSTALL_GROUP" \
16 "$SRCROOT"/resolver.3 \
17 "$MANDIR"/man3
18
19 install -c -m 0644 -o "$INSTALL_OWNER" -g "$INSTALL_GROUP" \
20 "$SRCROOT"/resolver.5 \
21 "$MANDIR"/man5
22
23 set +x
24 echo "Install man pages..."
25
26 for M in dn_comp.3 \
27 dn_expand.3 \
28 dn_skipname.3 \
29 ns_get16.3 \
30 ns_get32.3 \
31 ns_put16.3 \
32 ns_put32.3 \
33 res_init.3 \
34 res_mkquery.3 \
35 res_query.3 \
36 res_search.3 \
37 res_send.3 ; do
38 echo "... $M"
39 echo ".so man3/resolver.3" > "$MANDIR"/man3/"$M"
40 chown "$INSTALL_OWNER:$INSTALL_GROUP" "$MANDIR"/man3/"$M"
41 chmod 0644 "$MANDIR"/man3/"$M"
42 done