23 lines
679 B
Makefile
23 lines
679 B
Makefile
|
|
DESTDIR ?= $(CURDIR)
|
|
ifneq ($(realpath $(DESTDIR)),$(DESTDIR))
|
|
$(error DESTDIR=$(DESTDIR) not valid, it must be existent and absolute)
|
|
endif
|
|
|
|
# Locations for installing.
|
|
LIBDIR := $(DESTDIR)/usr/local/lib/site_perl
|
|
BINDIR := $(DESTDIR)/usr/local/sbin
|
|
CONFDIR := $(DESTDIR)/etc/cron.daily
|
|
|
|
$(LIBDIR) $(BINDIR) $(CONFDIR):
|
|
install --mode=0755 -d $@
|
|
|
|
# Installing. This should be simpler.
|
|
install: $(LIBDIR) $(BINDIR) $(CONFDIR)
|
|
install --mode=0644 Polyze.pm $(LIBDIR)
|
|
cp -a Polyze $(LIBDIR)
|
|
chmod u=rwx,go=rx $(LIBDIR)/Polyze
|
|
chmod u=rw,go=r $(LIBDIR)/Polyze/*
|
|
install --mode=0755 polyze send-polyze-daily $(BINDIR)
|
|
install --mode=0755 polyze.cron.daily $(CONFDIR)/polyze
|