Makefile revision 1627
5887N/A#
5887N/A#
5887N/A# CDDL HEADER START
5887N/A#
5887N/A# The contents of this file are subject to the terms of the
5887N/A# Common Development and Distribution License (the "License").
5887N/A# You may not use this file except in compliance with the License.
5887N/A#
5887N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5887N/A# or http://www.opensolaris.org/os/licensing.
5887N/A# See the License for the specific language governing permissions
5887N/A# and limitations under the License.
5887N/A#
5887N/A# When distributing Covered Code, include this CDDL HEADER in each
5887N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5887N/A# If applicable, add the following below this CDDL HEADER, with the
5887N/A# fields enclosed by brackets "[]" replaced with your own identifying
5887N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5887N/A#
5887N/A# CDDL HEADER END
5887N/A#
5887N/A# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
5887N/A#
5887N/Ainclude ../../make-rules/shared-macros.mk
5887N/A
5887N/ACOMPONENT_NAME= hplip
5887N/ACOMPONENT_VERSION= 3.12.4
5887N/ACOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/
5887N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5887N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
5887N/ACOMPONENT_ARCHIVE_HASH= \
5887N/A sha256:350375c78d79adf635a59a448b27b3fe9ab7ac622637c47125fe5f7d8a537fff
5887N/ACOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
5887N/ACOMPONENT_BUGDB= utility/hplip
5887N/A
5887N/Ainclude ../../make-rules/prep.mk
5887N/Ainclude ../../make-rules/configure.mk
5887N/Ainclude ../../make-rules/ips.mk
5887N/A
5887N/A# We need to be able to return from void functions
5887N/ACC += $(studio_FEATURES_EXTENSIONS)
5887N/ACXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD)
5887N/A
5887N/AROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
5887N/A
5887N/A# configure(1) options to use
5887N/ACONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
5887N/ACONFIGURE_OPTIONS += --disable-pp-build
5887N/ACONFIGURE_OPTIONS += --disable-gui-build
5887N/A
5887N/ACONFIGURE_ENV += LDFLAGS=" -lnsl"
5887N/A
5887N/AHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
5887N/AHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
5887N/A
5887N/AVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
5887N/A
5887N/A# We build two variants: for the CUPS/SANE support
5887N/A# and for the HPIJS only support
5887N/A
5887N/A# use these options for the CUPS/SANE support
5887N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
5887N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-fax-build
5887N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-udev-acl-rules
5887N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpcups-install
5887N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-new-hpcups
5887N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-cups-drv-install
5887N/A
5887N/A# use these options for the HPIJS only support
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-cups-drv-install
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-hpcups-install
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-doc-build
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-only-build
5887N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-install
5887N/A
5887N/Ainstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
5887N/A
5887N/ACOMPONENT_INSTALL_ARGS += -e
5887N/A
5887N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
5887N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
5887N/A
5887N/A# Generate configuration scripts
5887N/A$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
5887N/A (cd $(@D) ; autoconf )
5887N/A
5887N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
5887N/A
5887N/A#
5887N/A# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
5887N/A# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
5887N/A# build it twice. Once for the HPIJS support used by LP and once for the rest
5887N/A# of the support used for CUPS and SANE.
5887N/A#
5887N/Abuild: $(VARIANTS:%=%/.built)
5887N/A
5887N/Ainstall: $(VARIANTS:%=%/.installed)
5887N/A $(RM) $(ROOTPPDCACHE)
5887N/A $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
5887N/A ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
5887N/A PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
5887N/A DONOTINSTALL="/dev/null" \
5887N/A CACHE="$(ROOTPPDCACHE)" \
5887N/A IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
5887N/A $(KSH93) cache.ksh)
5887N/A
5887N/A# empty test target
5887N/Atest: $(NO_TESTS)
5887N/A
5887N/Ainclude ../../make-rules/depend.mk
5887N/A