#
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#ident "@(#)Makefile.sfw 1.13 10/04/22 SMI"
include ../Makefile.cmd
VER = $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
TARBALL= $(VER)-source.tar.bz2
PATCHES:sh = echo Patches/[0-9]*.patch
CCC += -norunpath
# configure(1) options to use
# a default --prefix and --mandir are set in Makefile.master
CONFIGURE_OPTIONS += --localedir=$(CFGLOCALE)
CONFIGURE_OPTIONS += --sysconfdir=$(CFGETC)
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --with-fontpath=/usr/openwin/lib
CONFIGURE_OPTIONS += --with-logdir=/var/log/cups
CONFIGURE_OPTIONS += --with-domainsocket=/var/run/cups-socket
CONFIGURE_OPTIONS += --with-smfmanifestdir=/lib/svc/manifest/application
CONFIGURE_OPTIONS += --with-printcap=/etc/printers.conf
CONFIGURE_OPTIONS += --with-cups-user=lp
CONFIGURE_OPTIONS += --with-cups-group=lp
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --disable-gnutls
CONFIGURE_OPTIONS += --disable-libusb
CONFIGURE_OPTIONS += --enable-labeling
CONFIGURE_OPTIONS += --enable-openssl
CONFIGURE_OPTIONS += --enable-dbus
CONFIGURE_OPTIONS += --enable-threads
CONFIGURE_OPTIONS += --enable-64bit
TARGET_ENV += CC="$(CC)"
TARGET_ENV += CXX="$(CCC)"
TARGET_ENV += CPPFLAGS="$(CPPFLAGS)"
TARGET_ENV += LD_OPTIONS="$(LDLIBS)"
TARGET_ENV += DSO64FLAGS="$(LDLIBS) -G"
TARGET_ENV += PATH="$(SFW_PATH)"
TARGET_ENV += MAKE="$(CCSMAKE)"
TARGET_ENV += "ac_cv_search_getifaddrs=no"
all:= TARGET = all
install:= TARGET = install
install:= TARGET_ENV += ROOT="$(ROOT)"
install:= TARGET_ENV += DSTROOT="$(ROOT)"
install:= TARGET_ENV += MAN1EXT="1cups"
install:= TARGET_ENV += MAN8EXT="1cups"
install:= TARGET_ENV += MAN8DIR="1cups"
install:= TARGET_ENV += INSTALL="$(INSTALL_PROTO)"
install:= TARGET_ENV += MANSCRIPT="$(COMPONENT_TOP)/sunman-stability"
install:= TARGET_ENV += PATH="$(SRC)/tools:$(SFW_PATH)"
install:= TARGET_ENV += MAKE="$(CCSMAKE)"
#
# Hopefully you will not need to make changes below this point
#
all: $(VER)/config.status
(cd $(VER) ; env $(TARGET_ENV) $(CCSMAKE) $(TARGET))
install: install-protofix
install-target: all
# fix to not conflict with JDS
$(MKDIR) -p $(ROOT)/$(CFGLOCALE)/zh_CN
$(RM) -r $(ROOT)/$(CFGLOCALE)/zh
$(SYMLINK) zh_CN $(ROOT)/$(CFGLOCALE)/zh
# install the bits in the proto area
(cd $(VER) ; env $(TARGET_ENV) $(CCSMAKE) $(TARGET))
# install the default config file
$(MV) $(ROOT)/etc/cups/cupsd.conf.default $(ROOT)/etc/cups/cupsd.conf
touch $(ROOT)/etc/cups/command.types
# move the conflicting commands to /usr/lib/cups/bin
$(MKDIR) -p $(ROOT)/usr/lib/cups/bin
for file in cancel lp lpr lpstat lpq lprm ; do \
$(MV) $(ROOT)/usr/bin/$$file $(ROOT)/usr/lib/cups/bin ; \
done
for file in cupsaccept cupsreject accept cupsdisable lpc lpmove cupsenable lpadmin reject ; do \
$(MV) $(ROOT)/usr/sbin/$$file $(ROOT)/usr/lib/cups/bin ; \
done
# install the smf help
$(MKDIR) -p $(ROOT)/usr/lib/help/auths/locale/C
$(INSTALL_PROTO) -m 0444 ManageCUPS.html $(ROOT)/usr/lib/help/auths/locale/C/ManageCUPS.html
# install the desktop menu related bits
$(INSTALL_PROTO) -m 0555 desktop-print-management $(ROOT)/usr/lib/cups/bin/desktop-print-management
$(INSTALL_PROTO) -m 0555 desktop-print-management-applet $(ROOT)/usr/lib/cups/bin/desktop-print-management-applet
$(INSTALL_PROTO) -m 0555 smb $(ROOT)/usr/lib/cups/backend/smb
# install the service to set up CUPS as the default print service
$(INSTALL_PROTO) -m 0555 Solaris/print-service-selector $(ROOT)/lib/svc/method/print-service-selector
$(MKDIR) -p $(ROOT)/lib/svc/manifest/application/print
$(INSTALL_PROTO) -m 0444 Solaris/service-selector.xml $(ROOT)/lib/svc/manifest/application/print/service-selector.xml
$(INSTALL_PROTO) -m 0444 auth_attr $(ROOT)/etc/security/auth_attr.d/cups
$(INSTALL_PROTO) -m 0444 prof_attr $(ROOT)/etc/security/prof_attr.d/cups
# clean up the turds
$(RM) $(ROOT)/etc/cups/snmp.conf.N $(ROOT)/etc/cups/cupsd.conf.N
$(RM) $(ROOT)/usr/share/cups/mime/mime.convs.O $(ROOT)/usr/share/cups/mime/mime.types.O
$(RM) $(ROOT)/usr/share/applications/cups.desktop
rmdir $(ROOT)/var/run/cups/certs $(ROOT)/var/run/cups
install-protofix: install-target
# apply the file attributes from the packaging
for pkg in $(COMPONENT_PACKAGES:sh) ; do \
$(SRC)/tools/protofix --pkg $$pkg --perm ; \
done
$(VER)/config.status: $(VER)/configure
(cd $(VER) ; env $(TARGET_ENV) ./configure $(CONFIGURE_OPTIONS))
$(VER)/configure: $(VER)/configure.in
(cd $(VER) ; autoconf )
$(VER)/configure.in: $(VER)/.patched
touch $@
clean:
-rm -rf $(VER)
include ../Makefile.targ
FRC: