From f9549e86b186627388f5f06b4108048c44ac8b42 Mon Sep 17 00:00:00 2001 From: Ville Kallioniemi Date: Sat, 31 Dec 2011 12:06:17 -0700 Subject: [PATCH] Man page and mac installation fixes. * fix minissdpd man page not getting installed * fix miniupnpc man page wasn't installed * fix minissdpd attempted to install init.d file on mac --- minissdpd/Makefile | 7 +++++++ miniupnpc/Makefile | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/minissdpd/Makefile b/minissdpd/Makefile index a897b89..be62850 100644 --- a/minissdpd/Makefile +++ b/minissdpd/Makefile @@ -16,6 +16,7 @@ CFLAGS = -Wall -Os -D_GNU_SOURCE -fno-strict-aliasing -Wstrict-prototypes CC = gcc RM = rm -f INSTALL = install +OS = $(shell uname -s) #EXECUTABLES = minissdpd testminissdpd listifaces EXECUTABLES = minissdpd testminissdpd testcodelength @@ -26,6 +27,8 @@ ALLOBJS = $(MINISSDPDOBJS) $(TESTMINISSDPDOBJS) testcodelength.o INSTALLPREFIX ?= $(PREFIX)/usr SBININSTALLDIR = $(INSTALLPREFIX)/sbin +MANINSTALLDIR = $(INSTALLPREFIX)/share/man + .PHONY: all clean install depend @@ -37,8 +40,12 @@ clean: install: minissdpd $(INSTALL) -d $(SBININSTALLDIR) $(INSTALL) minissdpd $(SBININSTALLDIR) + $(INSTALL) -d $(MANINSTALLDIR)/man1 + $(INSTALL) minissdpd.1 $(MANINSTALLDIR)/man1/minissdpd.1 +ifneq ($(OS), Darwin) $(INSTALL) -d $(PREFIX)/etc/init.d $(INSTALL) minissdpd.init.d.script $(PREFIX)/etc/init.d/minissdpd +endif minissdpd: $(MINISSDPDOBJS) $(CC) $(CFLAGS) -o $@ $(MINISSDPDOBJS) diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile index 2f46e6d..ba49234 100644 --- a/miniupnpc/Makefile +++ b/miniupnpc/Makefile @@ -85,6 +85,7 @@ INSTALLPREFIX ?= $(PREFIX)/usr INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc INSTALLDIRLIB = $(INSTALLPREFIX)/lib INSTALLDIRBIN = $(INSTALLPREFIX)/bin +INSTALLDIRMAN = $(INSTALLPREFIX)/share/man FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES) ifneq ($(OS), AmigaOS) @@ -142,6 +143,11 @@ else $(INSTALL) -m 755 upnpc-shared $(INSTALLDIRBIN)/upnpc endif $(INSTALL) -m 755 external-ip.sh $(INSTALLDIRBIN)/external-ip +ifneq ($(OS), AmigaOS) + $(INSTALL) -d $(INSTALLDIRMAN)/man3 + $(INSTALL) man3/miniupnpc.3 $(INSTALLDIRMAN)/man3/miniupnpc.3 +endif + cleaninstall: $(RM) -r $(INSTALLDIRINC)