$NetBSD: patch-an,v 1.9 2020/09/19 13:50:48 taca Exp $ * Rename upsimage.cgi to apcupsimage.cgi. * Fix installation for pkgsrc. --- src/cgi/Makefile.orig 2014-11-04 19:17:43.000000000 +0000 +++ src/cgi/Makefile @@ -17,9 +17,9 @@ SRCS = $(common_srcs) $(multimon_srcs) $ $(upsfstats_srcs) $(upsimage_srcs) # libgd needs -DNONDLL on Windows, otherwise it defaults to DLL -upsimage.cgi: CPPFLAGS += -DNONDLL +apcupsimage.cgi: CPPFLAGS += -DNONDLL -all-targets: multimon.cgi upsstats.cgi upsfstats.cgi upsimage.cgi +all-targets: multimon.cgi upsstats.cgi upsfstats.cgi apcupsimage.cgi multimon.cgi: $(common_obj) $(multimon_obj) $(APCLIBS) $(LINK) @@ -30,7 +30,7 @@ upsstats.cgi: $(common_obj) $(upsstats_o upsfstats.cgi: $(common_obj) $(upsfstats_obj) $(APCLIBS) $(LINK) -upsimage.cgi: $(common_obj) $(upsimage_obj) $(APCLIBS) +apcupsimage.cgi: $(common_obj) $(upsimage_obj) $(APCLIBS) $(LINK) $(LIBGD) all-install: install-cgi @@ -41,23 +41,13 @@ install-cgi: $(call INSTPROG,755,multimon.cgi,$(cgibin)) $(call INSTPROG,755,upsstats.cgi,$(cgibin)) $(call INSTPROG,755,upsfstats.cgi,$(cgibin)) - $(call INSTPROG,755,upsimage.cgi,$(cgibin)) - $(call MKDIR,$(sysconfdir)) - $(call INSTNEW,644,apcupsd.css,$(sysconfdir)) - $(call INSTNEW,644,$(topdir)/platforms/etc/hosts.conf,$(sysconfdir)) - $(call INSTNEW,644,$(topdir)/platforms/etc/multimon.conf,$(sysconfdir)) + $(call INSTPROG,755,apcupsimage.cgi,$(cgibin)) uninstall-cgi: $(call UNINST,$(cgibin)/multimon.cgi) $(call UNINST,$(cgibin)/upsstats.cgi) $(call UNINST,$(cgibin)/upsfstats.cgi) - $(call UNINST,$(cgibin)/upsimage.cgi) - $(call UNINST,$(sysconfdir)/apcupsd.css) - $(call UNINST,$(sysconfdir)/apcupsd.css.new) - $(call UNINST,$(sysconfdir)/hosts.conf) - $(call UNINST,$(sysconfdir)/hosts.conf.new) - $(call UNINST,$(sysconfdir)/multimon.conf) - $(call UNINST,$(sysconfdir)/multimon.conf.new) + $(call UNINST,$(cgibin)/apcupsimage.cgi) # Include dependencies -include $(DEPS)