0
|
1 |
#
|
|
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 |
#
|
10
|
22 |
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
|
0
|
23 |
# Use is subject to license terms.
|
|
24 |
#
|
10
|
25 |
#ident "@(#)Makefile.sfw 1.13 10/03/11 SMI"
|
0
|
26 |
#
|
|
27 |
# Webmin is a CGI Web-based administrration tool for Unix. All files
|
|
28 |
# in this distribution are Perl files, and are both source and executable.
|
|
29 |
# As the distribution is already ready to execute, all that is necessary
|
|
30 |
# is to unzip the distribution and copy it to the proto area.
|
|
31 |
#
|
|
32 |
# And as it is written in Perl, it is a source distribution by default.
|
|
33 |
|
|
34 |
|
|
35 |
README = README.SUNWwebmin
|
|
36 |
REL :sh= cat Version
|
|
37 |
VER = webmin-$(REL)
|
|
38 |
PATCH = webmin-patch-$(REL).tar.gz
|
|
39 |
ETC = etc
|
|
40 |
SSLEAYVER = Net_SSLeay.pm-1.30
|
10
|
41 |
AUTHENVER = Authen-PAM-0.16
|
0
|
42 |
RBACVER = Authen-SolarisRBAC-0.1
|
|
43 |
IOTTYVER = IO-Tty-1.02
|
|
44 |
PERL_MODS = $(SSLEAYVER) $(AUTHENVER) $(RBACVER) $(IOTTYVER)
|
|
45 |
PERLMOD_CS = $(SSLEAYVER)/config.status $(AUTHENVER)/config.status $(RBACVER)/config.status $(IOTTYVER)/config.status
|
|
46 |
SSLDIR = /usr/sfw
|
|
47 |
PERLMOD = usr/sfw/lib/webmin/perlmod
|
|
48 |
PERL = /usr/perl5/bin/perl
|
|
49 |
|
|
50 |
all: $(VER)/config.status $(PERLMOD_CS)
|
|
51 |
|
|
52 |
include ../Makefile.cmd
|
|
53 |
|
|
54 |
install: all
|
|
55 |
$(SH) ./install-sfw
|
|
56 |
|
|
57 |
#
|
|
58 |
# After extracting the archive, set reasonable permissions. These
|
|
59 |
# should proper in the archive, but best to be sure.
|
|
60 |
$(VER)/config.status: $(VER).tar.gz
|
|
61 |
gzip -dc $(VER).tar.gz | $(GTAR) xpf - --no-same-owner
|
|
62 |
cp misc/*.sh misc/start ${VER}
|
|
63 |
chmod ug+x ${VER}/start ${VER}/*.sh
|
|
64 |
if [ -f $(PATCH) ]; then \
|
|
65 |
gzip -dc $(PATCH) | $(GTAR) xf - --no-same-owner \
|
|
66 |
--directory=$(VER) ;\
|
|
67 |
fi
|
|
68 |
chmod -R u+w $(VER)
|
|
69 |
$(SH) ./stub_config
|
|
70 |
# Last thing to do is replace the perl paths.
|
|
71 |
# This _MUST_ be done after any patching that might put bad
|
|
72 |
# paths into the patched files
|
|
73 |
find $(VER) -name "*.cgi" -o -name "*.pl" | \
|
|
74 |
$(PERL) $(VER)/perlpath.pl $(PERL) -
|
|
75 |
touch $(VER)/config.status
|
|
76 |
|
|
77 |
$(SSLEAYVER)/config.status: $(SSLEAYVER).tar.gz
|
|
78 |
gzip -dc $(SSLEAYVER).tar.gz | $(GTAR) -xf - --no-same-owner
|
|
79 |
find $(SSLEAYVER) -type d -exec chmod 755 {} \;
|
|
80 |
cd $(SSLEAYVER); \
|
|
81 |
env \
|
|
82 |
PATH=$(SFW_PATH) \
|
|
83 |
$(PERL) Makefile.PL $(SSLDIR) -- PREFIX=$(ROOT)/$(PERLMOD) \
|
|
84 |
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
|
|
85 |
env \
|
|
86 |
PATH=$(SFW_PATH) \
|
|
87 |
$(MAKE); \
|
|
88 |
touch config.status
|
|
89 |
|
|
90 |
$(AUTHENVER)/config.status: $(AUTHENVER).tar.gz
|
|
91 |
gzip -dc $(AUTHENVER).tar.gz | $(GTAR) -xf - --no-same-owner
|
|
92 |
cd $(AUTHENVER); \
|
|
93 |
env \
|
|
94 |
PATH=$(SFW_PATH) \
|
|
95 |
$(PERL) Makefile.PL -- PREFIX=$(ROOT)/$(PERLMOD) \
|
|
96 |
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
|
|
97 |
env \
|
|
98 |
PATH=$(SFW_PATH) \
|
|
99 |
$(MAKE); \
|
|
100 |
touch config.status
|
|
101 |
|
|
102 |
$(RBACVER)/config.status: $(RBACVER).tar.gz
|
|
103 |
gzip -dc $(RBACVER).tar.gz | $(GTAR) -xf - --no-same-owner
|
|
104 |
cd $(RBACVER); \
|
|
105 |
env \
|
|
106 |
PATH=$(SFW_PATH) \
|
|
107 |
$(PERL) Makefile.PL -- PREFIX=$(ROOT)/$(PERLMOD) \
|
|
108 |
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
|
|
109 |
env \
|
|
110 |
PATH=$(SFW_PATH) \
|
|
111 |
$(MAKE); \
|
|
112 |
touch config.status
|
|
113 |
|
|
114 |
$(IOTTYVER)/config.status: $(IOTTYVER).tar.gz
|
|
115 |
gzip -dc $(IOTTYVER).tar.gz | $(GTAR) -xf - --no-same-owner
|
|
116 |
cd $(IOTTYVER); \
|
|
117 |
env \
|
|
118 |
PATH=$(SFW_PATH) \
|
|
119 |
$(PERL) Makefile.PL -- PREFIX=$(ROOT)/$(PERLMOD) \
|
|
120 |
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
|
|
121 |
env \
|
|
122 |
PATH=$(SFW_PATH) \
|
|
123 |
$(MAKE); \
|
|
124 |
touch config.status
|
|
125 |
|
|
126 |
clean: clean-status clean-perlmods clean-etc
|
|
127 |
-rm -rf $(VER)
|
|
128 |
|
|
129 |
clean-status:
|
|
130 |
rm -f $(VER)/config.status $(PERLMOD_CS)
|
|
131 |
|
|
132 |
clean-etc:
|
|
133 |
rm -rf $(ETC)
|
|
134 |
|
|
135 |
clean-perlmods:
|
|
136 |
rm -rf $(PERL_MODS)
|
|
137 |
|
|
138 |
# Make a prototype file out of the distribution.
|
|
139 |
# The resultants (proto_usr, proto_root) are intended to be
|
|
140 |
# put in SUNWwebminr/SUNWwebminu prototype_com files.
|
|
141 |
# This is intended to be run after a make install.
|
|
142 |
prototype:
|
|
143 |
(cd $(ROOT); pkgproto usr/sfw/lib/webmin | \
|
|
144 |
nawk '{printf("%s %s %s %s root bin\n", $$1, $$2, $$3, $$4);}' | \
|
10
|
145 |
sort +2 -3 | grep -v config.status ) > proto_usr
|
0
|
146 |
(cd $(ROOT); pkgproto etc/webmin | \
|
|
147 |
nawk '{printf("%s %s %s %s root bin\n", $$1, $$2, $$3, $$4);}' | \
|
|
148 |
sed 's@f none @v preserve @' | \
|
10
|
149 |
sort +2 -3 ) > proto_root
|
0
|
150 |
|
|
151 |
# The 'fixperl' target is used to insert the proper perl path into the
|
|
152 |
# target. This is here as a secondary/development tool, as it's
|
|
153 |
# intended use is when unarchiving the Webmin tarball.
|
|
154 |
fixperl:
|
|
155 |
find $(VER) -name "*.cgi" -o -name "*.pl" | \
|
|
156 |
$(PERL) $(VER)/perlpath.pl $(PERL) -
|
|
157 |
|
|
158 |
|
|
159 |
include ../Makefile.targ
|
|
160 |
|
|
161 |
FRC:
|