Makefile revision 554
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder#
c1dc4b8dc95cd9e0b032c8cf80bcee01c027e1d2Christian Maeder# CDDL HEADER START
c1dc4b8dc95cd9e0b032c8cf80bcee01c027e1d2Christian Maeder#
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian Maeder# The contents of this file are subject to the terms of the
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu# Common Development and Distribution License (the "License").
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# You may not use this file except in compliance with the License.
3f69b6948966979163bdfe8331c38833d5d90ecdChristian Maeder#
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian Maeder# or http://www.opensolaris.org/os/licensing.
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder# See the License for the specific language governing permissions
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# and limitations under the License.
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder#
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# When distributing Covered Code, include this CDDL HEADER in each
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# If applicable, add the following below this CDDL HEADER, with the
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# fields enclosed by brackets "[]" replaced with your own identifying
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# information: Portions Copyright [yyyy] [name of copyright owner]
10b02b2343246df6773585636fe3ddbefa3b6a1bChristian Maeder#
35db0960aa2e2a13652381c756fae5fb2b27213bChristian Maeder# CDDL HEADER END
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder#
898c318756092d7e875df0239ba783f3dfe3c6b7Christian Maeder# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian Maeder#
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian Maederinclude ../../make-rules/shared-macros.mk
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian Maeder
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian MaederCOMPONENT_NAME= git
c07ec82bbefe80f8a17e9e03b78f4d9140103dc5Christian MaederCOMPONENT_VERSION= 1.7.3.2
148c037c109a1d409b8afb011c6b82f8d9ee4b62Christian MaederCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
148c037c109a1d409b8afb011c6b82f8d9ee4b62Christian MaederCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
fc9b69f521204a16ea815bac8ca7e12100d3f699Christian MaederCOMPONENT_ARCHIVE_HASH= sha1:cd8d806752aa6f5716cf193585024a002e098bf4
COMPONENT_ARCHIVE_URL= http://kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE)
#
# man pages are a separate archive
#
COMPONENT_ARCHIVE_1 = $(COMPONENT_NAME)-manpages-$(COMPONENT_VERSION).tar.bz2
COMPONENT_ARCHIVE_HASH_1 = sha1:0be6fabbca523085e185711f2b80c99330f1e4ac
COMPONENT_ARCHIVE_URL_1 = http://kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE_1)
include ../../make-rules/prep.mk
include ../../make-rules/configure.mk
include ../../make-rules/ips.mk
CONFIGURE_PREFIX = /usr
CONFIGURE_OPTIONS += --without-openssl
CONFIGURE_OPTIONS += --libexecdir=/usr/lib
CONFIGURE_OPTIONS += --with-perl=$(PERL)
CONFIGURE_OPTIONS += --with-python=$(PYTHON.32)
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
COMPONENT_BUILD_ENV+= NO_PERL_MAKEMAKER=1
COMPONENT_INSTALL_ENV+= PERL_LIB=$(shell $(PERL) -MConfig -e 'print "$$Config{installvendorarch}"')
COMPONENT_TEST_TARGETS = test
#
# This runs configure but configure doesn't generate a Makefile.
# Instead a Makefile comes with git ...
# Anyways viewpathing doesn't work.
# Therefore we need cloney to copy a set of files to build.
#
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CLONEY) $(SOURCE_DIR) $(@D))
#
# Processed man pages go here.
#
DOC=$(BUILD_DIR)/Documentation
build: $(BUILD_32) $(DOC)/.manpages
install: $(INSTALL_32)
#
# tests fully pass when done in the archive directory.
# fail here; probably due to the use of cloney.
#
test: $(TEST_32)
#
# I know. It's ugly.
# But these man pages come in a separate archive with no Makefile
# and Solaris likes some of them moved around hence we'll just
# do it manually here.
#
$(DOC)/.manpages:
cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1)
$(MKDIR) $(@D)
cd $(BUILD_DIR)/man1 ; for manfile in *.1; \
do \
name=`basename $$manfile .1`; \
sed -e 's/\\m\[blue\]//g' -e 's/\\m\[\]//g' $$manfile > $(DOC)/$$name.1; \
done
cd $(BUILD_DIR)/man5 ; for manfile in *.5; \
do \
name=`basename $$manfile .5`; \
sed -e 's/\\m\[blue\]//g' -e 's/\\m\[\]//g' -e 's/"5"/"4"/' $$manfile > $(DOC)/$$name.4; \
done
cd $(BUILD_DIR)/man7 ; for manfile in *.7; \
do \
name=`basename $$manfile .7`; \
sed -e 's/\\m\[blue\]//g' -e 's/\\m\[\]//g' -e 's/"7"/"5"/' $$manfile > $(DOC)/$$name.5; \
done
$(TOUCH) $@
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk