1#ident "@(#)rules.csw 1.6 11/09/28 " 2########################################################################### 3# Written 2005 by J. Schilling 4########################################################################### 5# 6# Rules for creating Blastwave SVr4 packages 7# 8########################################################################### 9# Copyright (c) J. Schilling 10########################################################################### 11# The contents of this file are subject to the terms of the 12# Common Development and Distribution License, Version 1.0 only 13# (the "License"). You may not use this file except in compliance 14# with the License. 15# 16# See the file CDDL.Schily.txt in this distribution for details. 17# A copy of the CDDL is also available via the Internet at 18# http://www.opensource.org/licenses/cddl1.txt 19# 20# When distributing Covered Code, include this CDDL HEADER in each 21# file and include the License file CDDL.Schily.txt from this distribution. 22########################################################################### 23 24PKG :sh= sed -n 's/^PKG=//p' pkginfo 25#VERSION :sh= sed -n 's/^VERSION=//p' pkginfo 26VERSION :sh= sed -n 's/^VERSION=\([^,]*\).*/\1/p' pkginfo 27NAME :sh= sed -n 's/^NAME=//p' pkginfo|awk '{print $1}' 28OS_NAME :sh= uname -s 29DATE :sh= date '+REV=%Y.%m.%d' 30 31VENDOR= -CSW 32PROTOTYPE= prototype 33 34$(SRCROOT)/packages/$(OARCH): 35 $(MKDIR) -p $@ 36 37all: $(SRCROOT)/packages/$(OARCH) 38 if [ .$(PKG_RELOC) = .no ]; then \ 39 pkgmk -o -r `pwd`/$(SRCROOT)/$(PROTODIR)$(PKGROOTX) -d $(SRCROOT)/packages/$(OARCH) \ 40 -a $(P_ARCH) \ 41 -v $(VERSION),$(DATE) -f $(PROTOTYPE)_r \ 42 $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \ 43 pkgbase=`pwd` \ 44 $(PKGOPTX); \ 45 else \ 46 pkgmk -o -b `pwd`/$(SRCROOT)/$(PROTODIR)/$(INSBASE) -d $(SRCROOT)/packages/$(OARCH) \ 47 -a $(P_ARCH) \ 48 -v $(VERSION),$(DATE) -f $(PROTOTYPE) BASEDIR=$(INSBASE) \ 49 $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \ 50 pkgbase=`pwd` \ 51 $(PKGOPTX); \ 52 fi 53 pkgtrans -s $(SRCROOT)/packages/$(OARCH) $(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg $(PKG) 54 gzip -9f $(SRCROOT)/packages/$(OARCH)/$(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg 55