$NetBSD: patch-aa,v 1.8 2023/03/11 01:54:01 gdt Exp $ Add stanza for modern NetBSD. \todo Send upstream. Adjust Makefile for pkgsrc norms: - Use PREFIX - Comment out FreeBSD - Uncomment the "fail if not configured" line - Change installation to use INSTALL_PROGRAM \todo Evaluate PROGRAM vs SCRIPT; this is carried from before. --- Makefile.orig 2022-12-19 22:46:57.638664951 +0000 +++ Makefile @@ -48,12 +48,13 @@ CC?=cc -CFLAGS?=-O2 +# Use CFLAGS form the environment. #paths: #some peple like /usr/local/sbin instead of /usr/local/etc -BINDIR=/usr/local/bin -ETCDIR=/usr/local/etc +SBINDIR=${PREFIX}/sbin +BINDIR=${PREFIX}/bin +ETCDIR=${PREFIX}/etc PRINTCMD=enscript -Gr2 # you only need RSAREF for ESM # these paths WILL have to be changed... @@ -188,6 +189,13 @@ RINCLUDES=/usr/mab/rsaref/source #COMPAT=-lcompat #RPCOPTS=-b +#* Use these for NetBSD 9 +# For mounting, use +# mount -o intr,udp,-2 127.0.0.1:/null /crypt +#CFLAGS=$(COPT) -DBSD44 -DANYPORT -DCFS_PORT=2049 -DSHORTLINKS -I$(RINCLUDES) +#COMPAT=-lcompat +#RPCOPTS=-b + ## Solaris 2.3 / SUNOS 5.x #CFLAGS=$(COPT) -DSOLARIS2X -DPORTMAP -I$(RINCLUDES) -DPTMX #LIBS=-lsocket -lnsl @@ -198,17 +206,17 @@ RINCLUDES=/usr/mab/rsaref/source #CFLAGS=$(COPT) -posix -D_BSD -DANYPORT -I$(RINCLUDES) ## use these for FreeBSD -CFLAGS+=-DBSD44 -DANYPORT -DSHORTLINKS -LIBS=-lrpcsvc -COMPAT=-lcompat -RPCOPTS= +#CFLAGS+=-DBSD44 -DANYPORT -DSHORTLINKS +#LIBS=-lrpcsvc +#COMPAT=-lcompat +#RPCOPTS= #========================================================================== # CONFIGURE: one last thing #========================================================================== # finally, comment out the next line: -CC=you_forgot_to_edit_the_makefile +#CC=you_forgot_to_edit_the_makefile # now you're done with local configuration. @@ -344,10 +352,11 @@ printout: $(SRCS) cfs.h mcg.h safer.h ad $(PRINTCMD) $(SRCS) cfs.h mcg.h safer.h admproto.h nfsproto.h install_cfs: cfsd cattach cdetach cmkdir - install -m 0755 -c -o root cfsd $(ETCDIR) - install -m 0755 -c -o root cattach cdetach cmkdir cpasswd cfssh \ - cname ccat cmkkey $(BINDIR) -# install -m 0755 i o $(BINDIR) + ${BSD_INSTALL_PROGRAM} cfsd ${DESTDIR}$(SBINDIR) + ${BSD_INSTALL_SCRIPT} cmkkey cfssh ${DESTDIR}$(BINDIR) + ${BSD_INSTALL_SCRIPT} cattach cdetach cmkdir cpasswd \ + cname ccat ${DESTDIR}$(BINDIR) +# ${BSD_INSTALL_PROGRAM} i o ${DESTDIR}$(BINDIR) @echo "Kill any running cfsd prior to restarting." @echo "See the README file for more information." @echo "Don't forget to install the man pages (*.[18])."