1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25 26include ../Makefile.sp 27 28ROOTPRINTLIB = $(ROOTLIB)/print 29ROOTLIBLPBIN = $(ROOTLIBLP)/bin 30ROOTVARLP = $(ROOTVAR)/lp 31ROOTVARLPPPD = $(ROOTVARLP)/ppd 32 33$(ROOTVARSPOOLPRINT) := OWNER=root 34$(ROOTVARLP) := OWNER=lp 35$(ROOTVARLP) := DIRMODE=0775 36 37OWNER = root 38GROUP = lp 39FILEMODE = 0755 40 41MSGFILES = lpadmin ppdmgr 42POFILE = scripts.po 43 44PROG = conv_lp conv_lpd Makefile.yp 45ROOTLIBPRINTPROG= $(PROG:%=$(ROOTPRINTLIB)/%) 46$(ROOTLIBPRINTPROG) := FILEMODE=0555 47$(ROOTPRINTLIB)/Makefile.yp := FILEMODE=0444 48 49USRSBINPROG= lpsystem ppdmgr 50ROOTUSRSBINPROG= $(USRSBINPROG:%=$(ROOTUSRSBIN)/%) 51$(ROOTUSRSBINPROG) := FILEMODE=555 52 53PCONF= printers.conf 54ROOTPCONF= $(PCONF:%=$(ROOTETC)/%) 55$(ROOTPCONF) := OWNER=root 56$(ROOTPCONF) := GROUP=sys 57$(ROOTPCONF) := FILEMODE=644 58 59MANUFALIASES= manufaliases 60ROOTMANUFALIASES= $(MANUFALIASES:%=$(ROOTVARLPPPD)/%) 61$(ROOTMANUFALIASES) := OWNER=root 62$(ROOTMANUFALIASES) := GROUP=lp 63$(ROOTMANUFALIASES) := FILEMODE=444 64 65LIBLPPROGS= getmakes getmodels getppdfile getppds ppdfilename2mmp \ 66 lpadmin \ 67 desktop-print-management \ 68 desktop-print-management-applet \ 69 desktop-print-management-prefs 70 71ROOTLIBLPPROGS= $(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%) 72$(ROOTLIBLPPROGS) := OWNER=root 73$(ROOTLIBLPPROGS) := GROUP=lp 74$(ROOTLIBLPPROGS) := FILEMODE=555 75 76LIBLINKS= $(ROOTLIB)/lpadmin $(ROOTLIB)/lpsystem 77 78APPFILES = desktop-print-management.desktop 79APPFILES += desktop-print-management-prefs.desktop 80AUTOFILES = desktop-print-management-applet.desktop 81 82ROOTAPPDIR = $(ROOT)/usr/share/applications 83ROOTAUTODIR = $(ROOT)/usr/share/gnome/autostart 84ROOTAPPFILES = $(APPFILES:%=$(ROOTAPPDIR)/%) 85ROOTAUTOFILES = $(AUTOFILES:%=$(ROOTAUTODIR)/%) 86 87$(ROOTAPPFILES) := FILEMODE = 444 88$(ROOTAUTOFILES) := FILEMODE = 444 89 90 91.KEEP_STATE: 92 93all : $(PROG) 94 95$(ROOTLIB)/print/%: % 96 $(INS.file) 97 98$(ROOTLIBLPBIN)/%: % 99 $(INS.file) 100 101$(ROOTVARLPPPD)/%: % 102 $(INS.file) 103 104$(ROOTAPPDIR)/%: % 105 $(INS.file) 106 107$(ROOTAUTODIR)/%: % 108 $(INS.file) 109 110$(ROOTUSRSBIN) $(ROOTVARSPOOLPRINT) $(ROOTVARLP) $(ROOTVARLPPPD): 111 $(INS.dir) 112 113$(ROOTLIB)/lpadmin: 114 $(RM) $@; $(SYMLINK) ../sbin/lpadmin $@ 115 116$(ROOTLIB)/lpsystem: 117 $(RM) $@; $(SYMLINK) ../sbin/lpsystem $@ 118 119$(ROOTLNKPROGS) : $(ROOTSTARTPROG) 120 $(RM) $@; $(LN) $(ROOTSTARTPROG) $@ 121 122_msg: $(POFILE) 123 124$(POFILE): $(MSGFILES) 125 grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/" > $(POFILE).i 126 $(XGETTEXT) -s $(POFILE).i 127 $(RM) $@ $(POFILE).i 128 mv messages.po $(POFILE) 129 130# 131# Create a message file to test with 132# 133_msg_test: 134 grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/" > $(POFILE).i 135 $(XGETTEXT) -s -m "xxx" $(POFILE).i 136 $(RM) $@ $(POFILE).i 137 mv messages.po $(POFILE) 138 139install: $(ROOTLNKPROGS) \ 140 $(ROOTLIBPRINTPROG) $(ROOTSTARTPROG) \ 141 $(ROOTUSRSBIN) $(ROOTUSRSBINPROG) \ 142 $(ROOTVARSPOOLPRINT) $(ROOTPCONF) \ 143 $(ROOTLIBLPPROGS) $(LIBLINKS) \ 144 $(ROOTVARLP) $(ROOTVARLPPPD) \ 145 $(ROOTMANUFALIASES) \ 146 $(ROOTAPPFILES) $(ROOTAUTOFILES) 147 148$(SYMLINKS1): 149 $(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG1) $@ 150 151$(SYMLINKS2): 152 $(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG2) $@ 153 154clean: 155 $(RM) $(POFILE) 156 157clobber: clean 158 159strip lint: 160