components/sg3_utils/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 956 8dfd8bd38819
child 967 92027d7f7d91
permissions -rw-r--r--
Close of build 04.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
956
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		sg3_utils
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION=	1.28
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://sg.danny.cz/sg/sg3_utils.html
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tgz
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH= \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
    sha256:da8bd627a6246b709e2a0321fa9d5ca09a33354a1ae40c74cd37efb69b9f8118
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	http://sg.danny.cz/sg/p/$(COMPONENT_ARCHIVE)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
COMPONENT_ARCHIVE_1 =	rescan-scsi-bus.sh-1.35
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
COMPONENT_ARCHIVE_HASH_1 = \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
    sha256:324630d65ef85480f3fc57e8c1648dba2c79fa1927e26e6dfd1b64c7b8aba0b1
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
COMPONENT_ARCHIVE_URL_1 = http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh-1.35
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
COMPONENT_POST_UNPACK_ACTION = \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
	$(CP) $(COMPONENT_DIR)/rescan-scsi-bus.sh-1.35 \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
		$(COMPONENT_SRC)/rescan-scsi-bus.sh
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
include ../../make-rules/prep.mk
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
include ../../make-rules/configure.mk
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
include ../../make-rules/ips.mk
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
CPPFLAGS += -I$(COMPONENT_DIR)/$(COMPONENT_SRC)/include
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
CONFIGURE_OPTIONS +=	--disable-static
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
# Don't use rpath!
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
COMPONENT_POST_CONFIGURE_ACTION = \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
	(cd $(BUILD_DIR_32) ; \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
	$(GSED) -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ; \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
	$(GSED) -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
# Move the section 8 man pages into section 1m.
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
COMPONENT_POST_INSTALL_ACTION = \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
	for f in $(PROTOUSRSHAREMANDIR)/man8/*; do \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
		mv $$f $${f%.8}.1m; \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
	done ; \
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
	$(MV) $(PROTOUSRSHAREMANDIR)/man8 $(PROTOUSRSHAREMANDIR)/man1m
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
PKG_PROTO_DIRS +=	$(COMPONENT_DIR)/files
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
# common targets
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
build:          $(BUILD_32)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
install:        $(INSTALL_32)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
test:           $(TEST_32)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    78
8dfd8bd38819 7193528 Move sg3_utils to the Userland consolidation
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
include ../../make-rules/depend.mk