components/git/Makefile
author Craig Mohrman <craig.mohrman@oracle.com>
Tue, 13 Mar 2012 10:07:00 -0700
changeset 731 2a19ec4c0d8f
parent 706 6e61f0012046
child 800 2ad056ed89ec
permissions -rw-r--r--
7152417 upgrade git to version 1.7.9.2 7008422 Problem with utility/git
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     1
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     3
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     7
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    12
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    18
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    20
#
706
6e61f0012046 7108059 Userland should have python2.7 version of its python modules
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 667
diff changeset
    21
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    22
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    24
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		git
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    26
COMPONENT_VERSION=	1.7.9.2
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 552
diff changeset
    27
COMPONENT_PROJECT_URL=	http://git-scm.com/
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	sha1:7aff1048480a8637de94e8d82744d312c0b5e060
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    31
COMPONENT_ARCHIVE_URL=	http://git-core.googlecode.com/files/$(COMPONENT_ARCHIVE)
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    32
#
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    33
# man pages are a separate archive
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    34
#
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    35
COMPONENT_ARCHIVE_1 =	$(COMPONENT_NAME)-manpages-$(COMPONENT_VERSION).tar.gz
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    36
COMPONENT_ARCHIVE_HASH_1 = sha1:d6992d899fb70e40983f94a2f96ad24b8ee93557
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    37
COMPONENT_ARCHIVE_URL_1 = http://git-core.googlecode.com/files/$(COMPONENT_ARCHIVE_1)
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    38
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    39
include ../../make-rules/prep.mk
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    40
include ../../make-rules/configure.mk
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    41
include ../../make-rules/ips.mk
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    42
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    43
CONFIGURE_PREFIX    =	/usr
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    44
CONFIGURE_OPTIONS  +=	--without-openssl
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    45
CONFIGURE_OPTIONS  +=	--libexecdir=/usr/lib
277
12ebd29ad46c 7050602 userland consolidation should build with perl 5.12 by default
craig mohrman <craig.mohrman@oracle.com>
parents: 181
diff changeset
    46
CONFIGURE_OPTIONS  +=	--with-perl=$(PERL)
706
6e61f0012046 7108059 Userland should have python2.7 version of its python modules
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 667
diff changeset
    47
CONFIGURE_OPTIONS  +=	--with-python=$(PYTHON)
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    48
CONFIGURE_OPTIONS  +=	CFLAGS="$(CFLAGS)"
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    49
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    50
COMPONENT_BUILD_ENV+=	NO_PERL_MAKEMAKER=1
277
12ebd29ad46c 7050602 userland consolidation should build with perl 5.12 by default
craig mohrman <craig.mohrman@oracle.com>
parents: 181
diff changeset
    51
COMPONENT_INSTALL_ENV+=	PERL_LIB=$(shell $(PERL) -MConfig -e 'print "$$Config{installvendorarch}"')
667
bf7a382b5272 7131234 userland should remove references to /usr/ucb
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    52
COMPONENT_INSTALL_ARGS+=	INSTALL="$(INSTALL)"
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    53
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 152
diff changeset
    54
COMPONENT_TEST_TARGETS = test
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 152
diff changeset
    55
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    56
# This runs configure but configure doesn't generate a Makefile.
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    57
# Instead a Makefile comes with git.
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    58
# Anyways viewpathing doesn't work.
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    59
# Therefore we need cloney to copy a set of files to build.
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    60
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    61
COMPONENT_PRE_CONFIGURE_ACTION = \
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    62
	($(CLONEY) $(SOURCE_DIR) $(@D))
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    63
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    64
build:		$(BUILD_32)
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    65
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    66
install:	$(INSTALL_32) $(BUILD_DIR)/.manpages
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 152
diff changeset
    67
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    68
# There are some known issues around I18N.
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 152
diff changeset
    69
test:	$(TEST_32)
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    70
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    71
# These man pages come in a separate archive with no Makefile
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    72
# and Solaris likes some of them moved around hence we'll just
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    73
# do it manually here.
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    74
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    75
$(BUILD_DIR)/.manpages:
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    76
	cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1)
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    77
	$(MKDIR) $(PROTOUSRSHAREMAN1DIR)
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    78
	$(MKDIR) $(PROTOUSRSHAREMAN4DIR)
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    79
	$(MKDIR) $(PROTOUSRSHAREMAN5DIR)
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    80
	cd $(BUILD_DIR) ; for manfile in man*/* ; \
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    81
	do \
731
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    82
		filename=`basename $$manfile`; \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    83
		fname=$${filename%.*}; \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    84
		ext=$${filename##*.}; \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    85
		newext=1; \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    86
		if [ $$ext = 5 ]; then newext=4; fi; \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    87
		if [ $$ext = 7 ]; then newext=5; fi; \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    88
		$(GSED) -e 's/\\m\[blue\]//g' -e 's/\\m\[\]//g' \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    89
		        -e 's/"5"/"4"/' -e 's/(5)/(4)/g' \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    90
			-e 's/"7"/"5"/' -e 's/(7)/(5)/g' $$manfile > \
2a19ec4c0d8f 7152417 upgrade git to version 1.7.9.2
Craig Mohrman <craig.mohrman@oracle.com>
parents: 706
diff changeset
    91
		   $(PROTOUSRSHAREMANDIR)/man$$newext/$$fname.$$newext; \
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    92
	done
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 152
diff changeset
    93
	$(TOUCH) [email protected]
152
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    94
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    95
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    96
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    97
f0ba422362c2 7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    98
include ../../make-rules/depend.mk