components/gzip/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 2435 33cb297fa37c
child 3661 47545fb8aed4
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     1
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     3
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     7
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    12
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    18
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    20
#
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    21
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    22
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    24
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		gzip
2402
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    26
COMPONENT_VERSION=	1.5
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 181
diff changeset
    27
COMPONENT_PROJECT_URL=	http://www.gnu.org/software/gzip/
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 755
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
2402
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    31
    sha256:b5d56e8ffc9918e8c941fab56e04121194f9870adeeb859e09c09eac264035a3
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    32
COMPONENT_ARCHIVE_URL=	ftp://ftp.gnu.org/gnu/gzip/$(COMPONENT_ARCHIVE)
2434
6c9bb5cf5610 15930486 - Auto-generation of Userland gate list for the Solaris 11 Update Release
Rich Burridge <rich.burridge@oracle.com>
parents: 2402
diff changeset
    33
COMPONENT_BUGDB=	utility/gzip
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    34
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    35
include ../../make-rules/prep.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    36
include ../../make-rules/configure.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    37
include ../../make-rules/ips.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    38
755
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    39
# To get correct @[email protected] substitution in the various gz<whatever> scripts.
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    40
CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    41
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    42
CONFIGURE_OPTIONS +=	--infodir=$(CONFIGURE_INFODIR)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    43
CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)" 
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    44
2402
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    45
# Needed for "gmake test" to work successfully.
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    46
# If SHELLOPTS is exported (as it is by the userland makefiles),
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    47
# then all shell options get exported to child invocations of bash,
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    48
# which results in test failures due to nounset and xtrace being
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    49
# set unexpectedly, and errors such as "$1: unbound variable" and
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    50
# diffs failing due to script tracing in output files.
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    51
unexport SHELLOPTS
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    52
2435
33cb297fa37c 15785482 SUNBT7161330 gzgrep -e option no longer works
Petr Sumbera <petr.sumbera@oracle.com>
parents: 2434
diff changeset
    53
COMPONENT_PREP_ACTION = (cd $(SOURCE_DIR); $(AUTORECONF) -if)
33cb297fa37c 15785482 SUNBT7161330 gzgrep -e option no longer works
Petr Sumbera <petr.sumbera@oracle.com>
parents: 2434
diff changeset
    54
2402
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    55
# Get the binaries to test from the component build area.
21ebf6c9a4fa 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    56
COMPONENT_TEST_ENV +=	PATH=$(BUILD_DIR_$(BITS)):/usr/xpg4/bin:/usr/bin
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    57
COMPONENT_TEST_TARGETS = check
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    58
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    59
# Fix references to Solaris renamed programs (z*->gz*) in man pages, info
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    60
# pages and in wrapper scripts.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    61
COMPONENT_PRE_INSTALL_ACTION = \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    62
	(cd $(COMPONENT_SRC) ; \
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    63
	 for file in `ls *.1 doc/*.info z*.in` ; do \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    64
		mv $$file $$file.tmp ; \
750
9da3e3e3c604 7157415 gzip 1.4 integration is broken
Rich Burridge <rich.burridge@oracle.com>
parents: 748
diff changeset
    65
		$(GSED) -f $(COMPONENT_DIR)/renaming.sed $$file.tmp > $$file ; \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    66
		$(RM) $$file.tmp ; \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    67
	 done)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    68
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    69
# Rename installed programs and man pages in proto dir (z*->gz*).
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    70
COMPONENT_POST_INSTALL_ACTION = \
755
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    71
	(for dir in $(PROTOUSRBINDIR) $(PROTOUSRSHAREMAN1DIR) ; do \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    72
		cd $$dir; \
177
fd9cb2273c9d 7015392 the build should really fail if the pkg tools fail
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 96
diff changeset
    73
	 	for zfile in `ls z*`; do \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    74
			mv $$zfile g$$zfile ; \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    75
		done ; \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    76
	 done)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    77
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    78
# Provide missing man pages.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    79
GZGREP_MAN_VARIANTS+=$(PROTOUSRSHAREMAN1DIR)/gzegrep.1
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    80
GZGREP_MAN_VARIANTS+=$(PROTOUSRSHAREMAN1DIR)/gzfgrep.1
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    81
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    82
$(GZGREP_MAN_VARIANTS):
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    83
	$(RM) [email protected]; echo ".so man1/gzgrep.1" > [email protected]
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    84
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    85
build:		$(BUILD_64)
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    86
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    87
install:	$(INSTALL_64) $(GZGREP_MAN_VARIANTS)
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    88
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    89
test:		$(TEST_64)
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    90
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    91
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    92
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    93
include ../../make-rules/depend.mk