46 lines
1.3 KiB
Text
46 lines
1.3 KiB
Text
$NetBSD: patch-aa,v 1.9 2017/12/10 22:51:05 spz Exp $
|
|
|
|
Use pkgsrc layout and flags.
|
|
|
|
--- Makefile.orig 1994-10-04 16:44:53.000000000 +0000
|
|
+++ Makefile
|
|
@@ -4,13 +4,13 @@
|
|
# You should also add -DSYS5 for Ultrix, AIX, and Solarix.
|
|
# Add -DDEF_SHMEM=n if you can only have n bytes of shared memory
|
|
# (eg: -DDEF_SHMEM=524288 if you can only have half a meg.)
|
|
-CFLAGS=
|
|
+#CFLAGS=-O # inherit pkgsrc CFLAGS, don't overwrite them
|
|
|
|
# Where to install buffer and its manual pages
|
|
-INSTBIN=/usr/local/bin
|
|
-INSTMAN=/usr/man/manl
|
|
+INSTBIN=${PREFIX}/bin
|
|
+INSTMAN=${PREFIX}/${PKGMANDIR}/man1
|
|
# The manual page section (normally l or 1)
|
|
-S=l
|
|
+S=1
|
|
|
|
RM=/bin/rm
|
|
ALL=README buffer.man Makefile buffer.c sem.c COPYING
|
|
@@ -18,18 +18,14 @@ ALL=README buffer.man Makefile buffer.c
|
|
all: buffer
|
|
|
|
buffer: buffer.o sem.o
|
|
- $(CC) -o buffer $(CFLAGS) buffer.o sem.o
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o buffer buffer.o sem.o
|
|
|
|
clean:
|
|
$(RM) -f *.o core buffer .merrs
|
|
|
|
install: buffer
|
|
- rm -f $(INSTBIN)/buffer
|
|
- cp buffer $(INSTBIN)/buffer
|
|
- chmod 111 $(INSTBIN)/buffer
|
|
- rm -f $(INSTMAN)/buffer.$S
|
|
- cp buffer.man $(INSTMAN)/buffer.$S
|
|
- chmod 444 $(INSTMAN)/buffer.$S
|
|
+ ${BSD_INSTALL_PROGRAM} buffer ${DESTDIR}$(INSTBIN)/buffer
|
|
+ ${BSD_INSTALL_MAN} buffer.man ${DESTDIR}$(INSTMAN)/buffer.$S
|
|
|
|
buffer.tar: $(ALL)
|
|
$(RM) -f buffer.tar
|