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