head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	2000.07.26.18.05.31;	author kabe;	state Exp;
branches;
next	1.2;

1.2
date	2000.07.26.17.25.28;	author kabe;	state Exp;
branches;
next	1.1;

1.1
date	2000.07.26.17.20.55;	author kabe;	state Exp;
branches;
next	;


desc
@Makefile for Method-3 solaris package
@


1.3
log
@use "expr" instead of "echo|sed"
@
text
@#
#
# $Id: Makefile,v 1.2 2000-07-27 02:25:28+09 kabe Exp kabe $

# inherited values
SOFDV=1
SOPCV=1
SVX = .dist
BINDIR = /usr/local/bin

PKG=VEGAmtpcv
VERSION=2.0

TOPDIR=..

# local
# If you want to build the package on device directly, change this
PKGDEV=./pkgdev

RM = rm -f
RMDIR = rm -fr

##-------------------------------
all:
	@@echo "Use \"make pkg\" from top directory."

pkg: $(PKGDEV)/pkgmap

## create package in $(PKGDEV)
$(PKGDEV)/pkgmap: pkginfo prototype depend postinstall postremove
	## creating pkgdev/$(PKG)/
	test -d $(PKGDEV) || mkdir $(PKGDEV)
	pkgmk -o -d $(PKGDEV) -f prototype build=$(TOPDIR)
	@@echo ================
	@@echo "Now test the package by \"make pkgtest\", or install it by \"pkgadd -d $(PKGDEV)\"."
	@@#$(MAKE) postinst-message

pkginfo prototype depend postinstall postremove: \
	pkginfo.in prototype.in depend.in postinstall.in postremove.in
	sed -e 's/@@PKG@@/$(PKG)/; s/@@VERSION@@/$(VERSION)/; s/@@SOFDV@@/$(SOFDV)/g; s/@@SOPCV@@/$(SOPCV)/g; s/@@SVX@@/$(SVX)/g' -e "s:@@BINDIR@@:"`expr $(BINDIR) : '/*\(.*\)/*'`":" $@@.in > $@@
	# touch -r $@@.in $@@
	
clean::
	$(RM) pkginfo prototype depend postinstall postremove
	-test -d $(PKGDEV) && $(RMDIR) $(PKGDEV)
pkgtest:
	mkdirhier ROOT/usr/lib/fs/pcfs;
	mkdirhier ROOT/usr/sbin;
	touch ROOT/usr/lib/fs/pcfs/fstyp;
	touch ROOT/usr/lib/fs/pcfs/ident_pcfs.so.1;
	touch ROOT/usr/sbin/rmmount;
	-pkgadd -d pkgdev -R `pwd`/ROOT
clean::
	$(RMDIR) ROOT
@


1.2
log
@ignore output of pkgtest
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.1 2000-07-27 02:20:55+09 kabe Exp kabe $
d31 1
a31 1
	@@# creates pkgdev/$(PKG)/
d36 1
a36 1
	#@@$(MAKE) postinst-message
d40 1
a40 1
	sed -e 's/@@PKG@@/$(PKG)/; s/@@VERSION@@/$(VERSION)/; s/@@SOFDV@@/$(SOFDV)/g; s/@@SOPCV@@/$(SOPCV)/g; s/@@SVX@@/$(SVX)/g' -e "s:@@BINDIR@@:"`echo $(BINDIR)|sed -e 's:^/::'`":" $@@.in > $@@
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
# $Id$
d52 1
a52 1
	pkgadd -d pkgdev -R `pwd`/ROOT
@
