blob: c9915b58dbc1361394b3ef78cd64df32284dc997 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# This file is part of certmon
# Copyright (C) 2019 Sergey Poznyakoff
#
# Certmon is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# Certmon is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with certmon. If not, see <http://www.gnu.org/licenses/>.
PACKAGE = certmon
VERSION = 1.0
SOURCES = certmon.go
MANPAGE = certmon.8
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
MAN8DIR = $(MANDIR)/man8
all:
@go build -o $(PACKAGE) $(SOURCES)
clean:
@go clean
install: install-man
@GOBIN=$(DESTDIR)$$(if test -n "$(NAGIOS_CONF)" && \
test -f "$(NAGIOS_CONF)/resource.cfg"; then \
sed -n '/^\$$USER1\$$=/s///p' $$NAGIOS_CONF; \
else \
echo $(BINDIR); \
fi) \
go install .
install-man:
@if ! test -d $(DESTDIR)$(MAN8DIR); then \
mkdir -p $(DESTDIR)$(MAN8DIR); \
fi;
@cp $(MANPAGE) $(DESTDIR)$(MAN8DIR);
DISTDIR = $(PACKAGE)-$(VERSION)
DISTFILES = $(SOURCES) $(MANPAGE) README NEWS COPYING Makefile
distdir:
@test -d $(DISTDIR) || mkdir $(DISTDIR)
@cp $(DISTFILES) $(DISTDIR)
dist: distdir
@tar zcf $(DISTDIR).tar.gz $(DISTDIR)
@rm -rf $(DISTDIR)
distcheck: dist
@tar xfz $(DISTDIR).tar.gz
@if $(MAKE) -C $(DISTDIR) $(DISTCHECKFLAGS); then \
echo "$(DISTDIR).tar.gz ready for distribution"; \
rm -rf $(DISTDIR); \
else \
exit 2; \
fi
|