Makefile revision 335
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# CDDL HEADER START
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# The contents of this file are subject to the terms of the
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# Common Development and Distribution License (the "License").
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# You may not use this file except in compliance with the License.
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# See the License for the specific language governing permissions
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# and limitations under the License.
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# When distributing Covered Code, include this CDDL HEADER in each
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# If applicable, add the following below this CDDL HEADER, with the
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# fields enclosed by brackets "[]" replaced with your own identifying
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# information: Portions Copyright [yyyy] [name of copyright owner]
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# CDDL HEADER END
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonCOMPONENT_ARCHIVE_HASH= sha1:1545c98b4ec57271b9df3d65f7691c59bca94ccd
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonCOMPONENT_ARCHIVE_URL= $(EXTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE)
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonCOMPONENT_PROJECT_URL= http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/foomatic
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# the build system does not support building outside of the source tree
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonCOMPONENT_PRE_CONFIGURE_ACTION = $(CLONEY) $(SOURCE_DIR) $(@D) ;
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# setup perl build
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonCOMPONENT_PRE_CONFIGURE_ACTION += cd $(@D)/lib ; $(PERL) Makefile.PL
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# install perl modules
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon ( cd $(@D)/lib ; $(GMAKE) install_vendor DESTDIR=$(PROTO_DIR) )
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# the perl .packlist contains the path to the file as built rather than
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# as installed. Fix to be installed path, ie remove PROTO_DIR.
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonVENDORARCH= $(shell $(PERL) -e 'use Config; print $$Config{vendorarch}')
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong PoonPACKLIST= $(VENDORARCH)/auto/Foomatic/.packlist
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon sed -e "s/$(subst /,\\/,$(PROTO_DIR))//g" $(PROTO_DIR)/$(PACKLIST) \
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon $(MV) $(PROTO_DIR)/$(PACKLIST).fixed $(PROTO_DIR)/$(PACKLIST)
721fffe35d40e548a5a58dc53a2ec9c6762172d9Kacheong Poon# common targets