Files
pkgsrc-ng/editors/mg/patches/patch-ag
2016-11-18 22:39:22 +01:00

46 lines
1.1 KiB
Plaintext

$NetBSD: patch-ag,v 1.3 2016/04/01 13:14:32 jperkin Exp $
Use pkgsrc layout/flags.
--- Makefile.in.orig 2011-09-05 18:59:14.000000000 +0000
+++ Makefile.in
@@ -7,20 +7,21 @@
name= mg
-prefix= /usr/local
+prefix?= /usr/pkg/
bindir= $(prefix)/bin
libdir= $(prefix)/lib
includedir= $(prefix)/include
-mandir= $(prefix)/man
+mandir= $(prefix)/${PKGMANDIR}
+docdir= $(prefix)/share/doc
CC= gcc
CFLAGS?= -O2 -pipe
-CFLAGS+= -g -Wall -Werror -Wno-error=unused-but-set-variable
-LIBS= -lncurses
+CFLAGS+= -g -Wall -Werror
+LIBS+= -lncurses
-INSTALL= /usr/bin/install
-STRIP= /usr/bin/strip
+INSTALL?= /usr/bin/install
+STRIP?= /usr/bin/strip
OBJS= autoexec.o \
@@ -86,8 +87,10 @@ clean:
install: $(name) $(name).1
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -d $(DESTDIR)$(docdir)/mg
$(INSTALL) -m 755 $(name) $(DESTDIR)$(bindir)/$(name)
$(INSTALL) -m 444 $(name).1 $(DESTDIR)$(mandir)/man1/$(name).1
+ $(INSTALL) -m 444 tutorial $(DESTDIR)$(docdir)/mg/tutorial
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/$(name)