mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
99 lines
2.8 KiB
Plaintext
99 lines
2.8 KiB
Plaintext
$NetBSD: patch-Makefile.in,v 1.1 2015/06/10 14:22:29 fhajny Exp $
|
|
|
|
Use proper locations and install scripts.
|
|
|
|
--- Makefile.in.orig 2015-04-21 13:02:57.000000000 +0000
|
|
+++ Makefile.in
|
|
@@ -1,6 +1,8 @@
|
|
# user editable stuff:
|
|
-SBINDIR=/usr/sbin/
|
|
-BINDIR=/usr/bin/
|
|
+PREFIX?=/usr
|
|
+SBINDIR=$(PREFIX)/sbin/
|
|
+BINDIR=$(PREFIX)/bin/
|
|
+MANDIR=$(PREFIX)/share/man
|
|
SYSCONFDIR=/etc/powerdns/
|
|
LOCALSTATEDIR=/var/run/
|
|
OPTFLAGS?=-O3
|
|
@@ -12,6 +14,13 @@ STRIP_BINARIES?=1
|
|
LINKCC=$(CXX)
|
|
CC?=gcc
|
|
|
|
+INSTALL?=install
|
|
+SHAREMODE?=644
|
|
+MANMODE?=444
|
|
+INSTALL_DIR?=$(INSTALL) -d
|
|
+INSTALL_DATA?=$(INSTALL) -m $(SHAREMODE)
|
|
+INSTALL_MAN?=$(INSTALL) -m $(MANMODE)
|
|
+
|
|
# Lua 5.1 settings
|
|
|
|
# static dependencies
|
|
@@ -30,7 +39,7 @@ REC_CONTROL_OBJECTS=rec_channel.o rec_co
|
|
unix_utility.o logger.o qtype.o
|
|
|
|
# what we need
|
|
-all: message version_generated.h build
|
|
+all: message version_generated.h build recursor.conf-dist
|
|
|
|
# OS specific instructions
|
|
-include sysdeps/$(shell uname).inc
|
|
@@ -71,7 +80,7 @@ CFLAGS += -DSYSCONFDIR='"$(SYSCONFDIR)"'
|
|
|
|
# Version
|
|
build_date := $(shell LC_TIME=C date '+%Y%m%d%H%M%S')
|
|
-build_host := $(shell id -u -n)@$(shell hostname -f)
|
|
+build_host := $(shell id -u -n)@$(shell hostname)
|
|
|
|
.PHONY: version_generated.h
|
|
version_generated.h:
|
|
@@ -89,6 +98,10 @@ endef
|
|
|
|
export create_version_generated_h
|
|
|
|
+recursor.conf-dist: pdns_recursor
|
|
+ @# Not cross-compile friendly :/
|
|
+ ./pdns_recursor --config > $@
|
|
+
|
|
message:
|
|
@echo
|
|
@echo PLEASE READ: If you get an error mentioning \#include '<boost/something.hpp>', please read README
|
|
@@ -107,20 +120,14 @@ basic_checks:
|
|
fi
|
|
|
|
install: build-stamp
|
|
- -mkdir -p $(DESTDIR)/$(SBINDIR)
|
|
- cp pdns_recursor $(DESTDIR)/$(SBINDIR)
|
|
-ifeq ($(STRIP_BINARIES), 1)
|
|
- strip $(DESTDIR)/$(SBINDIR)/pdns_recursor
|
|
-endif
|
|
- mkdir -p $(DESTDIR)/$(BINDIR)
|
|
- cp rec_control $(DESTDIR)/$(BINDIR)
|
|
-ifeq ($(STRIP_BINARIES), 1)
|
|
- strip $(DESTDIR)/$(BINDIR)/rec_control
|
|
-endif
|
|
- -mkdir -p $(DESTDIR)/$(SYSCONFDIR)
|
|
- $(DESTDIR)/$(SBINDIR)/pdns_recursor --config > $(DESTDIR)/$(SYSCONFDIR)/recursor.conf-dist
|
|
- -mkdir -p $(DESTDIR)/usr/share/man/man1
|
|
- cp pdns_recursor.1 rec_control.1 $(DESTDIR)/usr/share/man/man1
|
|
+ $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
|
|
+ $(INSTALL) pdns_recursor $(DESTDIR)/$(SBINDIR)
|
|
+ $(INSTALL_DIR) $(DESTDIR)/$(BINDIR)
|
|
+ $(INSTALL) rec_control $(DESTDIR)/$(BINDIR)
|
|
+ $(INSTALL_DIR) $(DESTDIR)/$(SYSCONFDIR)
|
|
+ $(INSTALL_DATA) recursor.conf-dist $(DESTDIR)/$(SYSCONFDIR)
|
|
+ $(INSTALL_DIR) $(DESTDIR)/$(MANDIR)/man8
|
|
+ $(INSTALL_MAN) pdns_recursor.8 rec_control.8 $(DESTDIR)/$(MANDIR)/man8
|
|
$(OS_SPECIFIC_INSTALL)
|
|
|
|
clean: binclean
|
|
@@ -135,7 +142,7 @@ dep:
|
|
-include dep
|
|
|
|
optional:
|
|
- mkdir optional
|
|
+ $(INSTALL_DIR) optional
|
|
|
|
pdns_recursor: optional $(OPTIONALS) $(PDNS_RECURSOR_OBJECTS)
|
|
$(LINKCC) $(PDNS_RECURSOR_OBJECTS) $(wildcard optional/*.o) $(LDFLAGS) -o $@
|