pkgsrc/net/dtcpclient/patches/patch-aa
obache 08a99c2a38 * set USE_BSD_MAKEFILE=yes
* add user-destdir installation support.
2010-03-08 11:47:19 +00:00

46 lines
1.5 KiB
Text

$NetBSD: patch-aa,v 1.4 2010/03/08 11:47:19 obache Exp $
--- Makefile.orig 2005-12-28 07:29:24.000000000 +0000
+++ Makefile
@@ -34,18 +34,14 @@ PROG= dtcpclient
MAN= dtcpclient.8
BINDIR= $(PREFIX)/sbin
-SCRIPTSDIR= $(PREFIX)/etc
+SCRIPTSDIR= $(PREFIX)/sbin
EXAMPLESDIR= $(PREFIX)/share/examples/dtcpclient
-.if ($(OPSYS) == "NetBSD")
-MANDIR= $(PREFIX)/man
-.else
-MANDIR= $(PREFIX)/man/man
-.endif
+MANDIR= $(PREFIX)/${PKGMANDIR}
-CFLAGS+= -Wall -DPREFIX=\"$(PREFIX)\"
+CFLAGS+= -Wall -DPREFIX=\"$(PREFIX)\" -DSYSCONFDIR=\"$(PKG_SYSCONFDIR)\" -DVARBASE=\"$(VARBASE)\"
-.if ($(OPSYS) == "FreeBSD")
+.if ($(OPSYS) == "FreeBSD") || ${OPSYS} == "DragonFly"
CFLAGS+= -DHAVE_MD5
LDADD= -lmd
.elif ($(OPSYS) == "NetBSD") || ($(OPSYS) == "OpenBSD")
@@ -58,12 +54,13 @@ all: $(PROG)
realinstall:
$(INSTALL) -s $(COPY) -o $(BINOWN) -g $(BINGRP) -m 555 \
- dtcpclient $(BINDIR)/dtcpclient
- $(INSTALL) -d $(EXAMPLESDIR)
+ dtcpclient $(DESTDIR)$(BINDIR)/dtcpclient
+ $(INSTALL) -d $(DESTDIR)$(EXAMPLESDIR)
$(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m 555 \
- dtcpclient.script $(EXAMPLESDIR)/dtcpclient.script
- if [ ! -f $(SCRIPTSDIR)/dtcpclient.script ]; then \
- cp -p $(EXAMPLESDIR)/dtcpclient.script $(SCRIPTSDIR)/; \
+ dtcpclient.script $(DESTDIR)$(EXAMPLESDIR)/dtcpclient-script
+ if [ ! -f $(DESTDIR)$(SCRIPTSDIR)/dtcpclient-script ]; then \
+ cp -p $(DESTDIR)$(EXAMPLESDIR)/dtcpclient-script \
+ $(DESTDIR)$(SCRIPTSDIR)/dtcpclient-script; \
fi
dist: