[BACK]Return to patch-aa CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / archivers / pdbar / patches

File: [cvs.NetBSD.org] / pkgsrc / archivers / pdbar / patches / patch-aa (download)

Revision 1.2, Thu Jun 12 02:14:13 2008 UTC (11 years, 8 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, cwrapper, cube-native-xorg-base, cube-native-xorg
Changes since 1.1: +9 -9 lines

Add DESTDIR support.

$NetBSD: patch-aa,v 1.2 2008/06/12 02:14:13 joerg Exp $

--- Makefile.orig	2001-08-17 14:11:42.000000000 -0500
+++ Makefile
@@ -21,16 +21,11 @@
 #
 # created: djw@djw.org, January 2, 1999.
 #
-INSTALL_INCDIR = /usr/local/pilot/include
-INSTALL_LIBDIR = /usr/local/pilot/lib
-INSTALL_BINDIR = /usr/local/bin
-INSTALL_MANDIR = /usr/local/man/man1
-CC =     gcc
-CFLAGS = -g -I. -Wall
-LD =     gcc
-LDFLAGS = -g
-AR      = ar
-RANLIB  = ranlib
+INSTALL_INCDIR = ${PREFIX}/include
+INSTALL_LIBDIR = ${PREFIX}/lib
+INSTALL_BINDIR = ${PREFIX}/bin
+INSTALL_MANDIR = ${PREFIX}/man/man1
+LD	= ${CC}
 
 CFILES = \
 	create.c   \
@@ -140,19 +135,14 @@ parwin32.zip: $(WINFILES)
 	rm -rf par
 
 install: libprc.a prc.h par par.man
-	@test `whoami` = root || (echo "Must be root to install"; false)
-	mkdir -p $(INSTALL_INCDIR)
-	mkdir -p $(INSTALL_LIBDIR)
-	mkdir -p $(INSTALL_BINDIR)
-	mkdir -p $(INSTALL_MANDIR)
-	cp prc.h $(INSTALL_INCDIR)/prc.h
-	chmod 644 $(INSTALL_INCDIR)/prc.h
-	cp libprc.a $(INSTALL_LIBDIR)/libprc.a
-	chmod 644 $(INSTALL_LIBDIR)/libprc.a
-	cp par $(INSTALL_BINDIR)/par
-	chmod 755 $(INSTALL_BINDIR)/par
-	cp par.man $(INSTALL_MANDIR)/par.1
-	chmod 644 $(INSTALL_MANDIR)/par.1
+	${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(INSTALL_INCDIR)
+	${BSD_INSTALL_LIB_DIR} ${DESTDIR}$(INSTALL_LIBDIR)
+	${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}$(INSTALL_BINDIR)
+	${BSD_INSTALL_MAN_DIR} ${DESTDIR}$(INSTALL_MANDIR)
+	${BSD_INSTALL_DATA} prc.h ${DESTDIR}$(INSTALL_INCDIR)/prc.h
+	${BSD_INSTALL_LIB} libprc.a ${DESTDIR}$(INSTALL_LIBDIR)/libprc.a
+	${BSD_INSTALL_PROGRAM} par ${DESTDIR}$(INSTALL_BINDIR)/pdbar
+	${BSD_INSTALL_MAN} par.man ${DESTDIR}$(INSTALL_MANDIR)/pdbar.1
 
 TAGS:	$(PAR_CFILES) $(CFILES) $(HFILES)
 	etags -r '/^prc[^(]*(/' $(PAR_CFILES) $(CFILES) $(HFILES)