$NetBSD: patch-aa,v 1.4 2016/03/30 09:48:42 jperkin Exp $

Use pkgsrc flags/layout.

--- ./Makefile.orig	Wed Jan  7 18:20:36 1998
+++ ./Makefile	Fri Mar 31 04:21:15 2000
@@ -19,7 +19,9 @@
 # If you are on a DEC Alpha, edit des.h and change the DES_LONG
 # define to 'unsigned int'.  I have seen this give a %20 speedup.
 
-OPTS0= -DRAND -DTERMIO #-DNOCONST
+# was this - refling
+#OPTS0= -DRAND -DTERMIO #-DNOCONST
+OPTS0= -DRAND -DTERMIOS
 
 # Version 1.94 has changed the strings_to_key function so that it is
 # now compatible with MITs when the string is longer than 8 characters.
@@ -59,10 +61,10 @@
 #DES_ENC=asm/dx86-sol.o	asm/yx86-sol.o	# solaris format x86 
 #DES_ENC=asm/dx86bsdi.o	asm/yx86basi.o	# bsdi format x86 
 
-LIBDIR=/usr/local/lib
-BINDIR=/usr/local/bin
-INCDIR=/usr/local/include
-MANDIR=/usr/local/man
+LIBDIR=$(PREFIX)/lib
+BINDIR=$(PREFIX)/bin
+INCDIR=$(PREFIX)/include
+MANDIR=$(PREFIX)/${PKGMANDIR}
 MAN1=1
 MAN3=3
 SHELL=/bin/sh
@@ -226,38 +228,12 @@
 	sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
 	mv -f Makefile.new Makefile
 
-# Eric is probably going to choke when he next looks at this --tjh
+# refling ---
 install: des
-	if test $(INSTALLTOP); then \
-	    echo SSL style install; \
-	    cp $(DLIB) $(INSTALLTOP)/lib; \
-	    if test -s /bin/ranlib; then \
-	        /bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
-	    else \
-		if test -s /usr/bin/ranlib; then \
-		/usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
-	    fi; fi; \
-	    chmod 644 $(INSTALLTOP)/lib/$(DLIB); \
-	    cp des.h $(INSTALLTOP)/include; \
-	    chmod 644 $(INSTALLTOP)/include/des.h; \
-	else \
-	    echo Standalone install; \
-	    cp $(DLIB) $(LIBDIR)/$(DLIB); \
-	    if test -s /bin/ranlib; then \
-	      /bin/ranlib $(LIBDIR)/$(DLIB); \
-	    else \
-	      if test -s /usr/bin/ranlib; then \
-		/usr/bin/ranlib $(LIBDIR)/$(DLIB); \
-	      fi; \
-	    fi; \
-	    chmod 644 $(LIBDIR)/$(DLIB); \
-	    cp des $(BINDIR)/des; \
-	    chmod 711 $(BINDIR)/des; \
-	    cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
-	    chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
-	    cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
-	    chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
-	    cp des.h $(INCDIR)/des.h; \
-	    chmod 644 $(INCDIR)/des.h; \
-	fi
+	$(BSD_INSTALL_PROGRAM) des           ${DESTDIR}$(PREFIX)/bin/libdes
+	$(BSD_INSTALL_DATA)    libdes.a      ${DESTDIR}$(PREFIX)/lib/libdes.a
+	$(BSD_INSTALL_DATA)    des_crypt.man ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man3/libdes_crypt.3
+	$(BSD_INSTALL_DATA)    des.man       ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man1/libdes.1
+	$(BSD_INSTALL_DATA)    des.h         ${DESTDIR}$(PREFIX)/include/libdes.h
+
 # DO NOT DELETE THIS LINE -- make depend depends on it.
