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