Makefile revision 3996
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude ../../../make-rules/shared-macros.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_NAME= cssutils
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_VERSION= 0.9.6
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PROJECT_URL= https://pypi.python.org/pypi/cssutils/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE= $(COMPONENT_SRC).zip
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE_HASH= \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sha256:18f3cffb2ff413e0796d0c9192db3a56f18fe57524cc54edc57d20239614eb87
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE_URL= https://pypi.python.org/packages/source/c/cssutils/$(COMPONENT_ARCHIVE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_BUGDB= python-mod/cssutils
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTPNO= 7908
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This module is not Python 3 ready: syntax issues.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinPYTHON_VERSIONS = 2.7 2.6
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_MAKE_RULES)/prep.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_MAKE_RULES)/setup.py.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_MAKE_RULES)/ips.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_TEST_DIR= $(COMPONENT_SRC)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_TEST_ARGS= ./setup.py test
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Remove the trailing Control-M's from the Python source files.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PRE_BUILD_ACTION = \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /usr/bin/find $(SOURCE_DIR)/src \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin -name *.py -exec $(GSED) -i -e 's/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin//g' "{}" \; ;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# After we have done each Python build, copy it to its own version specific
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# source hierarchy and then adjust the shebang lines as needed, before we
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# build for Python 2.6. Note that this assumes we are only doing Python 2.7
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and Python 2.6, and we are doing them in that order.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_POST_BUILD_ACTION = \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (cd $(SOURCE_DIR); cp -rp src src-$(PYTHON_VERSION) ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin cd $(SOURCE_DIR)/src ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/__init__.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/codec.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/errorhandler.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/parse.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/scripts/csscapture.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/scripts/csscombine.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/scripts/cssparse.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/serialize.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' cssutils/tokenize2.py ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(GSED) -i -e 's/2[.]7/2.6/g' encutils/__init__.py )
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copy over the source hierarchy for the appropriate Python build before
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# installing it.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PRE_INSTALL_ACTION = \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (cd $(SOURCE_DIR); $(RM) -r src ; $(CP) -rp src-$(PYTHON_VERSION) src )
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinbuild: $(BUILD_NO_ARCH)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininstall: $(INSTALL_NO_ARCH)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintest: $(TEST_NO_ARCH)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin