author | Jon Tibble <meths@btinternet.com> |
Fri, 10 Feb 2012 16:19:42 +0000 | |
branch | oi_151a |
changeset 114 | b6d40d0a7b17 |
parent 14 | ebdd963f7d5e |
child 74 | fd34810c2c84 |
permissions | -rw-r--r-- |
0 | 1 |
#!/bin/sh -e |
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 |
# |
|
22 |
# |
|
14
ebdd963f7d5e
Import sfw build 140
Cyril Plisko <cyril.plisko@grigale.com>
parents:
10
diff
changeset
|
23 |
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 24 |
# |
14
ebdd963f7d5e
Import sfw build 140
Cyril Plisko <cyril.plisko@grigale.com>
parents:
10
diff
changeset
|
25 |
#ident "@(#)install-sfw 1.11 10/04/22 SMI" |
0 | 26 |
|
27 |
TOP=`pwd` |
|
28 |
BINDIR=${ROOT}/usr/sfw/bin |
|
29 |
MANDIR=${ROOT}/usr/sfw/share/man/man1m |
|
30 |
CONFDIR=${ROOT}/etc/webmin |
|
31 |
WEBMINVERS=`cat Version` |
|
32 |
WEBMINPKGVERS=${TOP}/webmin-${WEBMINVERS} |
|
33 |
||
34 |
# Perl Modules |
|
35 |
SSLEAYVER=Net_SSLeay.pm-1.30 |
|
10 | 36 |
AUTHENVER=Authen-PAM-0.16 |
0 | 37 |
RBACVER=Authen-SolarisRBAC-0.1 |
38 |
IOTTYVER=IO-Tty-1.02 |
|
39 |
SSLEAYPKGVERS=${TOP}/${SSLEAYVER} |
|
40 |
AUTHENPKGVERS=${TOP}/${AUTHENVER} |
|
41 |
RBACPKGVERS=${TOP}/${RBACVER} |
|
42 |
IOTTYPKGVERS=${TOP}/${IOTTYVER} |
|
43 |
PERL_MODS="${SSLEAYPKGVERS} ${AUTHENPKGVERS} ${RBACPKGVERS} ${IOTTYPKGVERS}" |
|
44 |
WEBMINCONFDIR=${TOP}/etc |
|
45 |
PREFIX=${ROOT}/usr/sfw/lib/webmin |
|
14
ebdd963f7d5e
Import sfw build 140
Cyril Plisko <cyril.plisko@grigale.com>
parents:
10
diff
changeset
|
46 |
SMFPREFIX=${ROOT}/lib/svc/manifest/application/management |
0 | 47 |
|
48 |
. ${SRC}/tools/install.subr |
|
49 |
||
50 |
cd $TOP |
|
51 |
# install webminsetup wrapper script file in /usr/sfw/bin |
|
52 |
for i in webminsetup |
|
53 |
do |
|
54 |
_install S ${i} ${BINDIR}/${i} 555 |
|
55 |
done |
|
56 |
||
57 |
# install man pages into SFW man dir. This assumes all files |
|
58 |
# are for section 1m |
|
59 |
for i in webmin webminsetup |
|
60 |
do |
|
61 |
_install N misc/${i}.1m ${MANDIR}/${i}.1m 444 |
|
62 |
done |
|
63 |
||
64 |
rm -rf ${PREFIX} ${CONFDIR} |
|
65 |
mkdir -p -m 755 ${PREFIX} |
|
66 |
mkdir -p -m 700 ${CONFDIR} |
|
67 |
mkdir -p -m 755 ${MANDIR} |
|
68 |
mkdir -p -m 755 ${BINDIR} |
|
69 |
mkdir -p -m 755 ${SMFPREFIX} |
|
70 |
||
71 |
# |
|
72 |
# Now copy the stuff in the webmin base directory to the proto area |
|
73 |
# |
|
74 |
cd ${WEBMINPKGVERS} |
|
75 |
||
76 |
# The source directory ($WEBMINPKGVERS) should already have the correct |
|
77 |
# permissions, just cpio the distibution, and change the owner:group |
|
78 |
# attributes |
|
79 |
/bin/find . -name '.svn' -prune -o -print | cpio -pdmv ${PREFIX} |
|
80 |
||
81 |
# |
|
82 |
# We now need to copy the private modules. This is a litte trickier, |
|
83 |
# as most perl modules want to install on the machine being built. |
|
84 |
# However, the modules here have a 'pure_perl_install' target that |
|
85 |
# allows them to be installed into the destination target that was |
|
86 |
# defined in the makefile when it was built. It is possible, though, |
|
87 |
# that some perl modules do not properly handle this case, so these |
|
88 |
# shouldn't be done in this loop, but in a separate install. |
|
89 |
# |
|
90 |
for mod in ${PERL_MODS} |
|
91 |
do |
|
92 |
cd ${mod} |
|
93 |
echo ${mod} |
|
94 |
/usr/ccs/bin/make pure_perl_install |
|
95 |
done |
|
96 |
||
97 |
# |
|
98 |
# And the configuration files |
|
99 |
# |
|
100 |
cd ${WEBMINCONFDIR} |
|
101 |
find . -print | cpio -pdmv ${CONFDIR} |
|
102 |
chmod -R go-rwx ${CONFDIR} |
|
103 |
||
104 |
cd $TOP |
|
105 |
||
106 |
# |
|
107 |
# And lastly the manifest |
|
108 |
# |
|
109 |
_install N misc/webmin.xml ${SMFPREFIX}/webmin.xml 444 |
|
110 |
||
111 |
# |
|
112 |
# Make sure that the $PREFIX permissions are all correct |
|
113 |
# |
|
114 |
find ${PREFIX} -type f -exec chmod 0644 {} \; |
|
115 |
find ${PREFIX} \( -type d -o -name "*.pl" -o -name "*.cgi" -o -name "*.so" \) -exec chmod 0755 {} \; |
|
116 |
||
117 |
# |
|
118 |
# We treat setup*.sh and start as a special cases |
|
119 |
# |
|
120 |
chmod 0755 ${PREFIX}/setup*.sh ${PREFIX}/start |
|
121 |
||
122 |
# Don't want the config.status file in the package |
|
123 |
/bin/rm ${PREFIX}/config.status |