0
|
1 |
#!/bin/sh
|
|
2 |
|
|
3 |
# CDDL HEADER START
|
|
4 |
#
|
|
5 |
# The contents of this file are subject to the terms of the
|
|
6 |
# Common Development and Distribution License (the "License").
|
|
7 |
# You may not use this file except in compliance with the License.
|
|
8 |
#
|
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
10 |
# or http://www.opensolaris.org/os/licensing.
|
|
11 |
# See the License for the specific language governing permissions
|
|
12 |
# and limitations under the License.
|
|
13 |
#
|
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
16 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
19 |
#
|
|
20 |
# CDDL HEADER END
|
|
21 |
#
|
228
|
22 |
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
|
0
|
23 |
#
|
228
|
24 |
# ident "@(#)post-install.sh 1.9 11/03/10 SMI"
|
0
|
25 |
#
|
|
26 |
# Handle various things where the files installed by Quagga's 'make install'
|
|
27 |
# differ from what we need for the SFW packages. E.g.:
|
|
28 |
#
|
|
29 |
# - manual pages are delivered mode 0444, but make install'd 0644. Perms must
|
|
30 |
# be fixed. Similar with various other files.
|
|
31 |
# - it'd be nice to just specify the desired permissions level in /only/
|
|
32 |
# the prototype files, but can't cause checkproto complains
|
|
33 |
# - make install delivers static libs, headers and libtool files, must
|
|
34 |
# be removed from proto area.
|
|
35 |
# - or else checkproto complains
|
|
36 |
# - there are files in Solaris/ which we deliver but which the source
|
|
37 |
# 'make install' obviously doesnt install, we must copy those
|
|
38 |
# to the proto area.
|
|
39 |
# - we could use pkgmk's "f wherever/file=../../cmd/quagga/Solaris/file"
|
|
40 |
# feature, unfortunately protocmp doesnt grok this, so checkproto complains
|
|
41 |
#
|
|
42 |
# This script contains information which is replicated in ../../pkgdefs/...
|
|
43 |
# changes here must be synced to relevant prototype files, and similarly
|
|
44 |
# vice versa. Slightly tedious.
|
|
45 |
|
|
46 |
if [ $# -ne 2 ]; then
|
|
47 |
exit 1;
|
|
48 |
fi
|
|
49 |
|
|
50 |
ROOT="$1"
|
|
51 |
SRCDIR="../${2}"
|
|
52 |
|
|
53 |
if [ ! -d "$ROOT" ]; then
|
|
54 |
exit 1;
|
|
55 |
fi
|
|
56 |
|
|
57 |
if [ ! -d "$SRCDIR" ]; then
|
|
58 |
exit 1;
|
|
59 |
fi
|
|
60 |
|
|
61 |
. ${SRC}/tools/install.subr
|
|
62 |
|
|
63 |
# Remove unused installed files. E.g. libzebra/libospf development related
|
|
64 |
# files, such as headers, static libs libtool files, unused man pages, etc.
|
|
65 |
for H in "usr/sbin/ospfclient" \
|
|
66 |
"usr/sfw/lib/libospf.a*" \
|
|
67 |
"usr/sfw/lib/libospf.la*" \
|
|
68 |
"usr/sfw/lib/libzebra.a*" \
|
|
69 |
"usr/sfw/lib/libzebra.la*" \
|
|
70 |
"usr/sfw/lib/libospfapiclient.a*" \
|
|
71 |
"usr/sfw/lib/libospfapiclient.la*" \
|
|
72 |
"usr/sfw/share/man/man1/vtysh.1" \
|
|
73 |
"usr/sfw/include/quagga/*.h" \
|
|
74 |
"usr/sfw/include/quagga/ospfd/*.h" \
|
|
75 |
"usr/sfw/include/quagga/ospfapi/*.h" ; do
|
228
|
76 |
rm -f -- ${ROOT}/${H}
|
0
|
77 |
done
|
|
78 |
|
|
79 |
for H in quagga/ospfd quagga/ospfapi quagga ; do
|
|
80 |
rmdir ${ROOT}/usr/sfw/include/${H}
|
|
81 |
done
|
|
82 |
|
|
83 |
# various docs
|
|
84 |
for H in zebra ospfd ospf6d bgpd ripd ripngd isisd ; do
|
|
85 |
chmod 0444 "$ROOT"/usr/sfw/share/man/man8/${H}.8
|
|
86 |
done
|
|
87 |
chmod 0444 "$ROOT"/usr/sfw/share/info/quagga.info
|
|
88 |
|
|
89 |
# Don't leave /etc/quagga in the root be dependent on vagaries of
|
|
90 |
# umask, etc..
|
|
91 |
chmod 0755 "$ROOT"/etc/quagga
|
|
92 |
|
|
93 |
# files which must be copied.
|
|
94 |
_install N ../Solaris/quagga.8 ${ROOT}/usr/sfw/share/man/man8/quagga.8 444
|
|
95 |
_install N ../Solaris/quaggaadm.1m ${ROOT}/usr/sfw/share/man/man1m/quaggaadm.1m 444
|
|
96 |
_install N ../Solaris/README.Solaris ${ROOT}/etc/quagga/README.Solaris 644
|
|
97 |
_install N ../Solaris/ospfd.HA.conf.sample ${ROOT}/etc/quagga/ospfd.HA.conf.sample 644
|
|
98 |
_install S ../Solaris/quaggaadm ${ROOT}/usr/sbin/quaggaadm 555
|
|
99 |
_install L quaggaadm ${ROOT}/usr/sbin/zebraadm
|
14
|
100 |
_install N solaris/quagga.xml ${ROOT}/lib/svc/manifest/network/routing/quagga.xml 444
|
|
101 |
_install N solaris/trill.xml ${ROOT}/lib/svc/manifest/network/routing/trill.xml 444
|
0
|
102 |
_install S solaris/quagga.init ${ROOT}/lib/svc/method/quagga 0555
|
|
103 |
_install N ${SRCDIR}/doc/quagga.info-1 ${ROOT}/usr/sfw/share/info/quagga.info 444
|
|
104 |
|
|
105 |
# rm the make-install'd quagga.info-1
|
228
|
106 |
rm -f ${ROOT}/usr/sfw/share/info/quagga.info-1
|