1 # 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 20 # CDDL HEADER END 21 # 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile.sfw 1.3 08/12/11 SMI" 26 27 include ../Makefile.cmd 28 29 # 30 # Macros 31 # 32 33 VER = 6.3.8 34 PROJECT = fetchmail 35 PROD = $(PROJECT)-$(VER) 36 PKG = SUNW$(PROJECT) 37 BZFILE = $(PROD).tar.bz2 38 PYTHONDIR=/usr/lib/python2.4/vendor-packages 39 40 LDFLAGS += \ 41 -L$(ROOT)/usr/lib \ 42 -M $(SRC)/cmd/mapfile_noexstk \ 43 -z ignore 44 45 POST_PROCESS_BIN = $(SRC)/tools/post_process \ 46 $(ROOT)/usr/bin/fetchmail 47 48 POST_PROCESS_MAN = $(SRC)/tools/sunman \ 49 -n "$(PROJECT)" -p "$(PKG)" -s Committed \ 50 $(ROOT)/usr/share/man/man1/fetchmail.1 \ 51 $(ROOT)/usr/share/man/man1/fetchmailconf.1 52 53 # 54 # Targets 55 # 56 57 all: $(PROD)/config.status 58 (cd $(PROD); $(CCSMAKE) MAKE=$(CCSMAKE)) 59 60 install: all 61 (cd $(PROD); $(CCSMAKE) install \ 62 MAKE=$(CCSMAKE) \ 63 DESTDIR="$(ROOT)" \ 64 INSTALL=/usr/bin/ginstall \ 65 pythondir="$(PYTHONDIR)") 66 $(RM) $(ROOT)/usr/bin/fetchmailconf 67 $(RM) $(ROOT)$(PYTHONDIR)/fetchmailconf.py[co] 68 $(CHMOD) 755 $(ROOT)$(PYTHONDIR)/fetchmailconf.py 69 $(LN) -s ../lib/python2.4/vendor-packages/fetchmailconf.py \ 70 $(ROOT)/usr/bin/fetchmailconf 71 $(POST_PROCESS_BIN) 72 $(POST_PROCESS_MAN) 73 74 $(PROD)/configure: $(BZFILE) 75 /usr/bin/bzcat $^ | $(TAR) xopf - 76 /usr/bin/gpatch -p0 < patch.configure 77 $(TOUCH) $@ 78 79 $(PROD)/patched: $(PROD)/configure fetchmail-6.3.8-CVE-2007-4565.patch 80 (cd $(PROD); \ 81 /usr/gnu/bin/patch -p 0 < ../fetchmail-6.3.8-CVE-2007-4565.patch) 82 $(TOUCH) $@ 83 84 $(PROD)/config.status: $(PROD)/patched 85 (cd $(PROD); ./configure \ 86 --prefix=/usr \ 87 --with-kerberos5 \ 88 --with-ssl \ 89 CC="$(CC)" \ 90 CFLAGS="$(CFLAGS)" \ 91 LDFLAGS="$(LDFLAGS)" \ 92 MAKE=$(CCSMAKE)) 93 94 clean: 95 -rm -rf $(PROD) 96 97 install_h: 98 99 include ../Makefile.targ 100