This repository was archived by the owner on Jan 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile.in
245 lines (213 loc) · 6.71 KB
/
Makefile.in
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
####################################################################
# Makefile for Icinga-Reporting
####################################################################
###############################
# Source code directories
###############################
###############################
# Compiler Settings
###############################
CC=@CC@
CFLAGS=@CFLAGS@ @DEFS@
LDFLAGS=@LDFLAGS@ @LIBS@
prefix=@prefix@
exec_prefix=@exec_prefix@
LOGDIR=@LOGDIR@
CFGDIR=@sysconfdir@
BINDIR=@bindir@
INCDIR=@includedir@
INSTALL=@INSTALL@
INSTALL_OPTS=@INSTALL_OPTS@
JASPER_SERVER=@JASPER_SERVER@
MYPWD := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
###############################
# Tools
###############################
MKDIR=/bin/mkdir
###############################
# Global
###############################
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
MYSQL_CONNECTOR_VERSION=5.1.18
###############################
# Installation
###############################
none:
@echo ""
@echo "*** Installation ***"
@echo ""
@echo " make install"
@echo " - Makes a completely installation. Import jasper reports and install JAR-Files"
@echo ""
@echo " make update"
@echo " - Makes a completely update. Update jasper reports and install JAR-Files"
@echo ""
@echo " make js-import-icinga"
@echo " - This imports the icinga reports into your JasperServer"
@echo ""
@echo " make js-update-icinga"
@echo " - This updates the reports on your JasperServer"
@echo ""
@echo " make install-jar-files"
@echo " - Install JAR-Files to your JasperServer"
@echo ""
@echo ""
@echo "*** Support Notes *******************************************"
@echo ""
@echo "If you have questions about configuring or running Icinga,"
@echo "please make sure that you:"
@echo ""
@echo " - Look at the sample config files"
@echo ""
@echo "before you post a question to one of the mailing lists at"
@echo "http://www.icinga.org/support/ or at Monitoring Portal:"
@echo "http://www.monitoring-portal.org"
@echo ""
@echo "Also make sure to include pertinent information that could"
@echo "help others help you. This might include:"
@echo ""
@echo " - What version of Icinga you are using"
@echo " - What version of the jasper server you are using"
@echo " - Relevant error messages from the Icinga log file"
@echo ""
@echo "For more information on obtaining support for Icinga, visit:"
@echo ""
@echo " http://www.icinga.org/support/"
@echo ""
@echo "*************************************************************"
@echo ""
@echo "Enjoy."
@echo ""
install:
@if [ x$(JASPER_SERVER) != xno ]; then \
$(MAKE) js-import-icinga install-jar-files;\
fi
@if [ x$(JASPER_SERVER) = xno ]; then \
echo "" ;\
echo "Sorry, but no supported JasperServer installation found!" ;\
echo "" ;\
else \
echo "" ;\
echo "*** Icinga reports successfully installed ***" ;\
echo "" ;\
echo "" ;\
echo "*** Important Notes *******************************************" ;\
echo "" ;\
echo "Icinga availability report:" ;\
echo "---------------------------" ;\
echo " Do not forget to update your IDO," ;\
echo " if using icinga availability reports!" ;\
echo "" ;\
echo " SQL script can you find in";\
echo " db/icinga/mysql/availability.sql" ;\
echo "" ;\
echo "" ;\
echo "JDBC driver for MySQL:" ;\
echo "---------------------------" ;\
echo " The official JDBC driver for MySQL can you find here" ;\
echo " http://dev.mysql.com/downloads/connector/j/" ;\
echo "" ;\
echo "" ;\
echo "---> Please don't forget to restart your jasper server!!! <---" ;\
echo "" ;\
echo "*************************************************************" ;\
fi
install-jar-files:
@if [ x$(JASPER_SERVER) != xno ]; then \
echo "" ;\
echo "*** Installing icinga-reporting.jar to your jasper server into '$(JASPER_SERVER)/apache-tomcat/webapps/jasperserver/WEB-INF/lib/' ***" ;\
if [ ! -f java/icinga-reporting.jar ]; then make -C java/ ; fi;\
$(INSTALL) -b -m 755 java/icinga-reporting.jar $(JASPER_SERVER)/apache-tomcat/webapps/jasperserver/WEB-INF/lib ;\
fi
@if [ x$(JASPER_SERVER) = xno ]; then \
echo "" ;\
echo "Sorry, but no supported JasperServer installation found!" ;\
echo "" ;\
else \
echo "*** JAR-Files successfully installed ***" ;\
echo "" ;\
fi
###############################
# JasperServer
###############################
js-import-icinga:
@if [ x$(JASPER_SERVER) != xno ]; then \
echo "" ;\
echo "*** Beginning import icinga reports into JasperServer..... ***" ;\
cd $(JASPER_SERVER)/buildomatic/ ;\
./js-import.sh --input-dir $(MYPWD)/reports ;\
cd $(MYPWD) ;\
fi
@if [ x$(JASPER_SERVER) = xno ]; then \
echo "" ;\
echo "Sorry, but no supported JasperServer installation found!" ;\
echo "" ;\
else \
echo "*** Icinga reports successfully imported ***" ;\
echo "" ;\
fi
js-export-icinga:
@if [ x$(JASPER_SERVER) != xno ]; then \
echo "" ;\
echo "*** Beginning export icinga reports from JasperServer..... ***" ;\
$(JASPER_SERVER)/buildomatic/js-export.sh --uris \
/icinga \
--output-zip /tmp/js-icinga-reports.zip ;\
fi
@if [ x$(JASPER_SERVER) = xno ]; then \
echo "" ;\
echo "Sorry, but no supported JasperServer installation found!" ;\
echo "" ;\
else \
echo "" ;\
echo "New report package exported to /tmp/js-icinga-reports.zip" ;\
echo "*** Icinga reports successfully exported ***" ;\
echo "" ;\
fi
js-update-icinga:
@if [ x$(JASPER_SERVER) != xno ]; then \
echo "" ;\
echo "*** Beginning update icinga reports on JasperServer..... ***" ;\
cd $(JASPER_SERVER)/buildomatic/ ;\
./js-import.sh --input-dir $(MYPWD)/reports --update ;\
cd $(MYPWD);\
fi
@if [ x$(JASPER_SERVER) = xno ]; then \
echo "" ;\
echo "Sorry, but no supported JasperServer installation found!" ;\
echo "" ;\
else \
echo "*** Icinga reports successfully updated ***" ;\
echo "" ;\
fi
###############################
# Update
###############################
update:
@if [ x$(JASPER_SERVER) != xno ]; then \
$(MAKE) js-update-icinga install-jar-files ;\
fi
@if [ x$(JASPER_SERVER) = xno ]; then \
echo "" ;\
echo "Sorry, but no supported JasperServer installation found!" ;\
echo "" ;\
else \
echo "" ;\
echo "*** Japser Reports successfully updated ***" ;\
echo "" ;\
fi
###############################
# Clean
###############################
clean:
rm -f Makefile
rm -f config.log config.status
distclean: clean
rm -f /tmp/js-icinga-detailed-report.zip
###############################
# Package
###############################
create-tarball:
./make-tarball --prefix ${PACKAGE_TARNAME}-${PACKAGE_VERSION}/