Makefile revision 152
163N/A#
163N/A# CDDL HEADER START
163N/A#
163N/A# The contents of this file are subject to the terms of the
163N/A# Common Development and Distribution License (the "License").
163N/A# You may not use this file except in compliance with the License.
163N/A#
163N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
163N/A# or http://www.opensolaris.org/os/licensing.
163N/A# See the License for the specific language governing permissions
163N/A# and limitations under the License.
163N/A#
163N/A# When distributing Covered Code, include this CDDL HEADER in each
163N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
163N/A# If applicable, add the following below this CDDL HEADER, with the
163N/A# fields enclosed by brackets "[]" replaced with your own identifying
163N/A# information: Portions Copyright [yyyy] [name of copyright owner]
163N/A#
163N/A# CDDL HEADER END
163N/A#
163N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
163N/A#
3996N/Ainclude ../../make-rules/shared-macros.mk
163N/A
163N/ACOMPONENT_NAME= git
4601N/ACOMPONENT_VERSION= 1.7.3.2
3996N/APERL_VERSION= 5.10.0
163N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
163N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
163N/ACOMPONENT_ARCHIVE_HASH= sha1:cd8d806752aa6f5716cf193585024a002e098bf4
163N/ACOMPONENT_ARCHIVE_URL= http://kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE)
211N/A#
4601N/A# man pages are a separate archive
636N/A#
211N/ACOMPONENT_ARCHIVE_1 = $(COMPONENT_NAME)-manpages-$(COMPONENT_VERSION).tar.bz2
1703N/ACOMPONENT_ARCHIVE_HASH_1 = sha1:0be6fabbca523085e185711f2b80c99330f1e4ac
844N/ACOMPONENT_ARCHIVE_URL_1 = http://kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE_1)
4601N/A
4601N/Ainclude ../../make-rules/prep.mk
1273N/Ainclude ../../make-rules/configure.mk
163N/Ainclude ../../make-rules/ips.mk
4601N/A
3661N/ACONFIGURE_PREFIX = /usr
3996N/ACONFIGURE_OPTIONS += --without-openssl
3996N/ACONFIGURE_OPTIONS += --libexecdir=/usr/lib
3996N/ACONFIGURE_OPTIONS += --with-perl=/usr/perl5/$(PERL_VERSION)/bin/perl
163N/ACONFIGURE_OPTIONS += --with-python=$(PYTHON.32)
4601N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
4601N/A
4601N/ACOMPONENT_BUILD_ENV+= NO_PERL_MAKEMAKER=1
163N/ACOMPONENT_INSTALL_ENV+= PERL_LIB=$(shell /usr/perl5/$(PERL_VERSION)/bin/perl -MConfig -e 'print "$$Config{installvendorarch}"')
163N/A
163N/A#
163N/A# This runs configure but configure doesn't generate a Makefile.
163N/A# Instead a Makefile comes with git ...
163N/A# Anyways viewpathing doesn't work.
163N/A# Therefore we need cloney to copy a set of files to build.
163N/A#
163N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
163N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
163N/A
163N/A#
4601N/A# Processed man pages go here.
163N/A#
4934N/ADOC=$(BUILD_DIR)/Documentation
163N/A
163N/APKG_MACROS += PERL_ARCH=$(shell arch)
163N/APKG_MACROS += PERL_VERSION=$(PERL_VERSION)
163N/A
4934N/Abuild: $(BUILD_32) $(DOC)/.manpages
4601N/A
163N/Ainstall: $(INSTALL_32) $(BUILD_DIR_32)/.manpages
163N/A
163N/A#
163N/A# I know. It's ugly.
163N/A# But these man pages come in a separate archive with no Makefile
163N/A# and Solaris likes some of them moved around hence we'll just
163N/A# do it manually here.
4601N/A#
4601N/A$(DOC)/.manpages:
163N/A cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1)
163N/A $(MKDIR) $(DOC)
163N/A cd $(BUILD_DIR)/man1 ; for manfile in *.1; \
163N/A do \
211N/A sed -f ../../solarisman-stability $$manfile > \
163N/A $(DOC)/$$manfile; \
163N/A done
163N/A cd $(BUILD_DIR)/man5 ; for manfile in *.5; \
163N/A do \
163N/A name=`basename $$manfile .5`; \
163N/A sed 's/"5"/"4"/' $$manfile | \
163N/A sed -f ../../solarisman-stability > $(DOC)/$$name.4; \
4601N/A done
4601N/A cd $(BUILD_DIR)/man7 ; for manfile in *.7; \
4601N/A do \
4601N/A name=`basename $$manfile .7`; \
4601N/A sed 's/"7"/"5"/' $$manfile | \
4601N/A sed -f ../../solarisman-stability > $(DOC)/$$name.5; \
4601N/A done
4601N/A @ touch $(DOC)/.manpages
4601N/A
4601N/A#
163N/A# install manpages per architecture
163N/A#
163N/A$(BUILD_DIR_32)/.manpages:
163N/A $(MKDIR) $(PROTOUSRSHAREMAN1DIR)
163N/A $(MKDIR) $(PROTOUSRSHAREMAN4DIR)
1703N/A $(MKDIR) $(PROTOUSRSHAREMAN5DIR)
1703N/A cd $(DOC) ; for manfile in *.1; \
1703N/A do \
1703N/A $(RM) $(PROTOUSRSHAREMAN1DIR)/$$manfile; \
1703N/A $(INSTALL) -m 0444 $$manfile $(PROTOUSRSHAREMAN1DIR); \
1703N/A done
1703N/A cd $(DOC) ; for manfile in *.4; \
1703N/A do \
1703N/A $(RM) $(PROTOUSRSHAREMAN4DIR)/$$manfile; \
1703N/A $(INSTALL) -m 0444 $$manfile $(PROTOUSRSHAREMAN4DIR); \
1703N/A done
1703N/A cd $(DOC) ; for manfile in *.5; \
1703N/A do \
1703N/A $(RM) $(PROTOUSRSHAREMAN5DIR)/$$manfile; \
4601N/A $(INSTALL) -m 0444 $$manfile $(PROTOUSRSHAREMAN5DIR); \
4601N/A done
4601N/A @ touch $(BUILD_DIR_32)/.manpages
4601N/A
1703N/A
1703N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
1703N/A
1703N/A#
1703N/A# tests fully pass when done in the archive directory.
1703N/A# fail here; probably due to the use of cloney.
1703N/A#
1703N/Atest: build
1703N/A @cd $(BUILD_DIR_32); $(MAKE) test
1703N/A
1703N/Ainclude ../../make-rules/depend.mk
1703N/A