#
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "@(#)Makefile.sfw 1.13 10/03/11 SMI"
#
# Webmin is a CGI Web-based administrration tool for Unix. All files
# in this distribution are Perl files, and are both source and executable.
# As the distribution is already ready to execute, all that is necessary
# is to unzip the distribution and copy it to the proto area.
#
# And as it is written in Perl, it is a source distribution by default.
README = README.SUNWwebmin
REL :sh= cat Version
VER = webmin-$(REL)
PATCH = webmin-patch-$(REL).tar.gz
ETC = etc
SSLEAYVER = Net_SSLeay.pm-1.30
AUTHENVER = Authen-PAM-0.16
RBACVER = Authen-SolarisRBAC-0.1
IOTTYVER = IO-Tty-1.02
PERL_MODS = $(SSLEAYVER) $(AUTHENVER) $(RBACVER) $(IOTTYVER)
PERLMOD_CS = $(SSLEAYVER)/config.status $(AUTHENVER)/config.status $(RBACVER)/config.status $(IOTTYVER)/config.status
SSLDIR = /usr/sfw
PERLMOD = usr/sfw/lib/webmin/perlmod
PERL = /usr/perl5/bin/perl
all: $(VER)/config.status $(PERLMOD_CS)
include ../Makefile.cmd
install: all
$(SH) ./install-sfw
#
# After extracting the archive, set reasonable permissions. These
# should proper in the archive, but best to be sure.
$(VER)/config.status: $(VER).tar.gz
gzip -dc $(VER).tar.gz | $(GTAR) xpf - --no-same-owner
cp misc/*.sh misc/start ${VER}
chmod ug+x ${VER}/start ${VER}/*.sh
if [ -f $(PATCH) ]; then \
gzip -dc $(PATCH) | $(GTAR) xf - --no-same-owner \
--directory=$(VER) ;\
fi
chmod -R u+w $(VER)
$(SH) ./stub_config
# Last thing to do is replace the perl paths.
# This _MUST_ be done after any patching that might put bad
# paths into the patched files
find $(VER) -name "*.cgi" -o -name "*.pl" | \
$(PERL) $(VER)/perlpath.pl $(PERL) -
touch $(VER)/config.status
$(SSLEAYVER)/config.status: $(SSLEAYVER).tar.gz
gzip -dc $(SSLEAYVER).tar.gz | $(GTAR) -xf - --no-same-owner
find $(SSLEAYVER) -type d -exec chmod 755 {} \;
cd $(SSLEAYVER); \
env \
PATH=$(SFW_PATH) \
$(PERL) Makefile.PL $(SSLDIR) -- PREFIX=$(ROOT)/$(PERLMOD) \
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
env \
PATH=$(SFW_PATH) \
$(MAKE); \
touch config.status
$(AUTHENVER)/config.status: $(AUTHENVER).tar.gz
gzip -dc $(AUTHENVER).tar.gz | $(GTAR) -xf - --no-same-owner
cd $(AUTHENVER); \
env \
PATH=$(SFW_PATH) \
$(PERL) Makefile.PL -- PREFIX=$(ROOT)/$(PERLMOD) \
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
env \
PATH=$(SFW_PATH) \
$(MAKE); \
touch config.status
$(RBACVER)/config.status: $(RBACVER).tar.gz
gzip -dc $(RBACVER).tar.gz | $(GTAR) -xf - --no-same-owner
cd $(RBACVER); \
env \
PATH=$(SFW_PATH) \
$(PERL) Makefile.PL -- PREFIX=$(ROOT)/$(PERLMOD) \
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
env \
PATH=$(SFW_PATH) \
$(MAKE); \
touch config.status
$(IOTTYVER)/config.status: $(IOTTYVER).tar.gz
gzip -dc $(IOTTYVER).tar.gz | $(GTAR) -xf - --no-same-owner
cd $(IOTTYVER); \
env \
PATH=$(SFW_PATH) \
$(PERL) Makefile.PL -- PREFIX=$(ROOT)/$(PERLMOD) \
INSTALLARCHLIB=$(ROOT)/$(PERLMOD); \
env \
PATH=$(SFW_PATH) \
$(MAKE); \
touch config.status
clean: clean-status clean-perlmods clean-etc
-rm -rf $(VER)
clean-status:
rm -f $(VER)/config.status $(PERLMOD_CS)
clean-etc:
rm -rf $(ETC)
clean-perlmods:
rm -rf $(PERL_MODS)
# Make a prototype file out of the distribution.
# The resultants (proto_usr, proto_root) are intended to be
# put in SUNWwebminr/SUNWwebminu prototype_com files.
# This is intended to be run after a make install.
prototype:
(cd $(ROOT); pkgproto usr/sfw/lib/webmin | \
nawk '{printf("%s %s %s %s root bin\n", $$1, $$2, $$3, $$4);}' | \
sort +2 -3 | grep -v config.status ) > proto_usr
(cd $(ROOT); pkgproto etc/webmin | \
nawk '{printf("%s %s %s %s root bin\n", $$1, $$2, $$3, $$4);}' | \
sed 's@f none @v preserve @' | \
sort +2 -3 ) > proto_root
# The 'fixperl' target is used to insert the proper perl path into the
# target. This is here as a secondary/development tool, as it's
# intended use is when unarchiving the Webmin tarball.
fixperl:
find $(VER) -name "*.cgi" -o -name "*.pl" | \
$(PERL) $(VER)/perlpath.pl $(PERL) -
include ../Makefile.targ
FRC: