This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
/
Makefile.in
578 lines (489 loc) · 18.3 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
####################################################################
# Makefile for Icinga
####################################################################
###############################
# Source code directories
###############################
SRC_BASE=@srcdir@/base
SRC_CGI=@srcdir@/cgi
SRC_HTM=@srcdir@/html
SRC_DOCS=@srcdir@/html/docs
SRC_MODULE=@srcdir@/module
SRC_INCLUDE=@srcdir@/include
SRC_COMMON=@srcdir@/common
SRC_XDATA=@srcdir@/xdata
SRC_CONTRIB=@srcdir@/contrib
SRC_IDOUTILS=@srcdir@/module/idoutils
SRC_TTAP=@srcdir@/t-tap
SRC_TAP=@srcdir@/tap
SRC_T=@srcdir@/t
SRC_ICINGAAPI=@srcdir@/module/icinga-api
SRC_DOCBOOK=@srcdir@/docbook
SRC_DOCBOOK_DE=@srcdir@/docbook/de
SRC_DOCBOOK_EN=@srcdir@/docbook/en
###############################
# Compiler Settings
###############################
CC=@CC@
CFLAGS=@CFLAGS@ @DEFS@
LDFLAGS=@LDFLAGS@ @LIBS@
prefix=@prefix@
exec_prefix=@exec_prefix@
LOGDIR=@LOGDIR@
CGILOGDIR=@CGILOGDIR@
CHECKRESULTDIR=@CHECKRESULTDIR@
EXTCMDFILEDIR=@EXTCMDFILEDIR@
P1FILELOC=@P1FILELOC@
CFGDIR=@sysconfdir@
BINDIR=@bindir@
CGIDIR=@sbindir@
LIBEXECDIR=@libexecdir@
HTMLDIR=@datarootdir@
INSTALL=@INSTALL@
INSTALL_OPTS=@INSTALL_OPTS@
INSTALL_OPTS_WEB=@INSTALL_OPTS_WEB@
COMMAND_OPTS=@COMMAND_OPTS@
HTTPD_CONF=@HTTPD_CONF@
INIT_DIR=@init_dir@
INIT_OPTS=@INIT_OPTS@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
###############################
# Modules
###############################
USE_EVENTBROKER=@USE_EVENTBROKER@
USE_IDOUTILS=@USE_IDOUTILS@
USE_ICINGAAPI=@USE_ICINGAAPI@
USE_LIBTAP=@USE_LIBTAP@
INSTALLPERLSTUFF=@INSTALLPERLSTUFF@
CGIEXTRAS=@CGIEXTRAS@
###############################
# snprintf (Solaris)
###############################
SNPRINTF_O=@SNPRINTF_O@
###############################
# Tools
###############################
MKDIR=/bin/mkdir
###############################
# Global
###############################
ICINGA_VERSION=1.5.0
CP=@CP@
@SET_MAKE@
none:
@printf "Please supply a command line argument (i.e. 'make all').\n\n"
@printf "Generic targets: all, fullinstall, clean\n\n"
@printf "Other useful targets:\n"
@printf "\t%-23s - %s\n" "distclean" "make source ready for commit or packaging"
@printf "\t%-23s - %s\n" "create-tarball" "create tarball for packaging"
@printf "\t%-23s - %s\n" "create-tarball-nightly" "create nightly build tarball"
@printf "\t%-23s - %s\n" "create-docs" "generate html docs from docbook"
@printf "\t%-23s - %s\n" "submodule-init" "init git submodules"
@printf "\t%-23s - %s\n" "submodule-update" "update git submodules"
@printf "\t%-23s - %s\n" "submodule-update-latest" "update git submodules, pull latest master"
@printf "\nCompile targets:\n"
@printf "\t%-23s - %s\n" "icinga" "icinga core"
@printf "\t%-23s - %s\n" "cgis" "classical web"
@printf "\t%-23s - %s\n" "contrib" "contrib dir"
@printf "\t%-23s - %s\n" "modules" "icinga modules"
@printf "\t%-23s - %s\n" "idoutils" "icinga idoutils"
@printf "\nInstall targets:\n"
@printf "\t%-23s - %s\n" "install" "install core, cgis, api, html"
@printf "\t%-23s - %s\n" "install-base" "install core"
@printf "\t%-23s - %s\n" "install-cgis" "install classical web"
@printf "\t%-23s - %s\n" "install-html" "install html files"
@printf "\t%-23s - %s\n" "install-config" "install sample config"
@printf "\t%-23s - %s\n" "install-webconf" "install apache config for classical web"
@printf "\t%-23s - %s\n" "install-init" "install init script"
@printf "\t%-23s - %s\n" "install-commandmode" "install external command file"
@printf "\t%-23s - %s\n" "install-idoutils" "install idoutils module"
@printf "\t%-23s - %s\n" "install-api" "install php api"
@printf "\t%-23s - %s\n" "install-dev-docu" "install doxygen development documentation"
# FreeBSD make does not support -C option, so we'll use the Apache style... (patch by Stanley Hopcroft 12/27/1999)
###############################
# Compile
###############################
all:
cd $(SRC_BASE) && $(MAKE)
cd $(SRC_CGI) && $(MAKE)
cd $(SRC_HTM) && $(MAKE)
if [ x$(USE_EVENTBROKER) = xyes ]; then \
cd $(SRC_MODULE) && $(MAKE); \
fi
@if [ x$(USE_IDOUTILS) = xyes ]; then \
cd $(SRC_IDOUTILS) && $(MAKE); \
fi
@echo ""
@echo "*** Compile finished ***"
@echo ""
@echo "If the main program and CGIs compiled without any errors, you"
@echo "can continue with installing Icinga as follows (type 'make'"
@echo "without any arguments for a list of all possible options):"
@echo ""
@echo " make install"
@echo " - This installs the main program (Icinga Core), CGIs"
@echo " (Classical Web), API, and HTML files"
@echo ""
@echo " make install-init"
@echo " - This installs the init script in $(DESTDIR)$(INIT_DIR)"
@echo ""
@echo " make install-commandmode"
@echo " - This installs and configures permissions on the"
@echo " directory for holding the external command file"
@echo ""
@echo " make install-idoutils"
@echo " - This installs the database addon IDOUtils into the"
@echo " destination directory"
@echo ""
@echo " make install-api"
@echo " - This installs the Icinga API in $(DESTDIR)$(HTMLDIR)"
@echo ""
@echo " make install-config"
@echo " - This installs *SAMPLE* config files in $(DESTDIR)$(CFGDIR)"
@echo " You'll have to modify these sample files before you can"
@echo " use Icinga. Read the HTML documentation for more info"
@echo " on doing this. Pay particular attention to the docs on"
@echo " object configuration files, as they determine what/how"
@echo " things get monitored!"
@echo ""
@echo " make install-webconf"
@echo " - This installs the Apache config file for the classical"
@echo " Icinga web interface"
@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 " - Read the HTML documentation in html/docs/"
@echo ""
@echo "before you post a question to one of the mailing lists at"
@echo "http://www.icinga.org/community/ or at Icinga Portal:"
@echo "http://www.icinga-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 plugins you are using"
@echo " - Relevant snippets from your config files"
@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/community/"
@echo ""
@echo "*************************************************************"
@echo ""
@echo "Enjoy."
@echo ""
icinga:
cd $(SRC_BASE) && $(MAKE)
config:
@echo "Sample config files are automatically generated once you run the"
@echo "configure script. You can install the sample config files on your"
@echo "system by using the 'make install-config' command."
cgis:
cd $(SRC_CGI) && $(MAKE)
idoutils:
@if [ x$(USE_IDOUTILS) = xyes ]; then \
cd $(SRC_IDOUTILS) && $(MAKE); \
else \
echo "" ;\
echo "Sorry, IDOUtils not enabled!" ;\
echo "Try again with ./configure --enable-idoutils" ;\
echo "" ;\
fi
html:
cd $(SRC_HTM) && $(MAKE)
contrib:
cd $(SRC_CONTRIB) && $(MAKE)
modules:
cd $(SRC_MODULE) && $(MAKE)
###############################
# Clean
###############################
clean:
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_CGI) && $(MAKE) $@
cd $(SRC_COMMON) && $(MAKE) $@
cd $(SRC_XDATA) && $(MAKE) $@
cd $(SRC_HTM) && $(MAKE) $@
cd $(SRC_INCLUDE) && $(MAKE) $@
cd $(SRC_CONTRIB) && $(MAKE) $@
cd $(SRC_MODULE) && $(MAKE) $@
cd $(SRC_IDOUTILS) && $(MAKE) $@
cd $(SRC_TTAP) && $(MAKE) $@
cd $(SRC_T) && $(MAKE) $@
@if [ x$(USE_LIBTAP) = xyes ]; then \
cd $(SRC_TAP) && $(MAKE) $@; \
fi
@if [ x$(USE_ICINGAAPI) = xyes ]; then \
cd $(SRC_ICINGAAPI) && $(MAKE) $@; \
fi
rm -f *.cfg core
rm -f *~ *.*~ */*~ */*.*~ */*/*.*~
distclean: clean
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_CGI) && $(MAKE) $@
cd $(SRC_COMMON) && $(MAKE) $@
cd $(SRC_XDATA) && $(MAKE) $@
cd $(SRC_HTM) && $(MAKE) $@
cd $(SRC_INCLUDE) && $(MAKE) $@
cd $(SRC_CONTRIB) && $(MAKE) $@
cd $(SRC_MODULE) && $(MAKE) $@
cd $(SRC_IDOUTILS) && $(MAKE) $@
cd $(SRC_TTAP) && $(MAKE) $@
cd $(SRC_T) && $(MAKE) $@
@if [ x$(USE_LIBTAP) = xyes ]; then \
cd $(SRC_TAP) && $(MAKE) $@; \
fi
@if [ x$(USE_ICINGAAPI) = xyes ]; then \
cd $(SRC_ICINGAAPI) && $(MAKE) $@; \
fi
rm -f sample-config/*.cfg sample-config/*.conf sample-config/template-object/*.cfg
rm -f daemon-init pkginfo rc.ido2db daemon-init-redhat
rm -f include/dh.h
rm -f Makefile subst
rm -f config.log config.status config.cache
rm -f t/var/objects.precache.generated t/var/objects.precache
devclean: distclean
###############################
# Test
###############################
test:
$(MAKE) test-perl
$(MAKE) test-tap
test-tap: tap/src/tap.o icinga cgis
@if [ x$(USE_LIBTAP) = xyes ]; then \
cd $(SRC_TTAP) && $(MAKE) test; \
else \
echo "NOTE: You must run configure with --enable-libtap to run the C tap tests"; \
fi
tap/src/tap.o:
cd tap && $(MAKE)
test-perl: cgis
cd t && $(MAKE) test
###############################
# Package
###############################
create-docs:
#${MAKE} submodule-init
#${MAKE} submodule-update
#${MAKE} submodule-update-latest
cd ${SRC_DOCBOOK_EN} && make en
cd ${SRC_DOCBOOK_DE} && make de
@echo "updated docs :)"
create-tarball:
./make-tarball --prefix icinga-${ICINGA_VERSION}/
create-tarball-nightly:
#git pull origin `git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` #user must pull himself, some brnaches are not remote
${MAKE} submodule-update-latest
${MAKE} create-docs
./make-tarball --prefix icinga-${ICINGA_VERSION}_`date +%Y%m%d`_`git rev-parse --short HEAD`/
create-doxygen:
doxygen
###############################
# GIT
###############################
submodule-init:
git submodule init docbook
git submodule init module/icinga-api
submodule-update:
git submodule update
submodule-update-latest:
cd ${SRC_DOCBOOK} && git checkout master && git pull origin master
cd ${SRC_ICINGAAPI} && git checkout master && git pull origin master
@echo "pulled latest docbook & icinga-api :)"
###############################
# Install
###############################
install-html:
cd $(SRC_HTM) && $(MAKE) install
install-dev-docu:
cd $(SRC_HTM) && $(MAKE) install-dev-docu
install-base:
cd $(SRC_BASE) && $(MAKE) install
install-cgis:
$(INSTALL) -m 775 $(INSTALL_OPTS_WEB) -d $(DESTDIR)$(CGILOGDIR)
cd $(SRC_CGI) && $(MAKE) install
install:
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_CGI) && $(MAKE) $@
cd $(SRC_HTM) && $(MAKE) $@
$(MAKE) install-api
$(MAKE) install-basic
install-unstripped:
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_CGI) && $(MAKE) $@
cd $(SRC_HTM) && $(MAKE) $@
$(MAKE) install-api
$(MAKE) install-basic
install-basic:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CHECKRESULTDIR)
if [ $(INSTALLPERLSTUFF) = yes ]; then \
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(P1FILELOC); \
$(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(P1FILELOC); \
fi;
@echo ""
@echo "*** Main program, CGIs and HTML files installed ***"
@echo ""
@echo "You can continue with installing Icinga as follows (type 'make'"
@echo "without any arguments for a list of all possible options):"
@echo ""
@echo " make install-init"
@echo " - This installs the init script in $(DESTDIR)$(INIT_DIR)"
@echo ""
@echo " make install-commandmode"
@echo " - This installs and configures permissions on the"
@echo " directory for holding the external command file"
@echo ""
@echo " make install-idoutils"
@echo " - This installs the database addon IDOUtils into the"
@echo " destination directory"
@echo ""
@echo " make install-config"
@echo " - This installs sample config files in $(DESTDIR)$(CFGDIR)"
@echo ""
@echo " make install-webconf"
@echo " - This installs the Apache config file for the web interface"
@echo ""
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/modules
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg
$(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgiauth.cfg $(DESTDIR)$(CFGDIR)/cgiauth.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/notifications.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg
$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg
@echo ""
@echo "*** Config files installed ***"
@echo ""
@echo "Remember, these are *SAMPLE* config files. You'll need to read"
@echo "the documentation for more information on how to actually define"
@echo "services, hosts, etc. to fit your particular needs."
@echo ""
install-webconf:
$(MKDIR) -p -m 775 $(DESTDIR)$(HTTPD_CONF)
$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/icinga.conf
@echo ""
@echo "*** Icinga/Apache conf file installed ***"
@echo ""
install-idoutils:
@if [ x$(USE_IDOUTILS) = xyes ]; then \
cd $(SRC_IDOUTILS) && $(MAKE) $@ ;\
fi
@if [ x$(USE_IDOUTILS) = xyes ]; then \
echo "" ;\
echo "*** IDOUtils installed ***" ;\
echo "" ;\
else \
echo "" ;\
echo "Sorry, IDOUtils not enabled!" ;\
echo "Try again with ./configure --enable-idoutils" ;\
echo "" ;\
fi
install-api:
@if [ x$(USE_ICINGAAPI) = xyes ]; then \
cd $(SRC_ICINGAAPI) && $(MAKE) install; \
echo "" ;\
echo "*** API installed ***" ;\
echo "" ;\
else \
echo "" ;\
echo "Sorry, Icinga API not available!" ;\
echo "Check md5 and source in $(SRC_ICINGAAPI)" ;\
echo "If using GIT, try # git submodule init ; git submodule update" ;\
echo "" ;\
fi
install-init: install-daemoninit
install-daemoninit:
$(INSTALL) -m 755 -d $(INIT_OPTS) $(DESTDIR)$(INIT_DIR)
$(INSTALL) -m 755 $(INIT_OPTS) daemon-init $(DESTDIR)$(INIT_DIR)/icinga
@if [ x$(USE_IDOUTILS) = xyes ]; then \
$(INSTALL) -m 755 $(INIT_OPTS) rc.ido2db $(DESTDIR)$(INIT_DIR)/ido2db ;\
fi
@echo ""
@echo "*** Init script installed ***"
@echo ""
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(EXTCMDFILEDIR)
chmod g+s $(DESTDIR)$(EXTCMDFILEDIR)
@echo ""
@echo "*** External command directory configured ***"
@echo ""
fullinstall:
@if [ x$(USE_IDOUTILS) = xyes ]; then \
${MAKE} install install-init install-commandmode install-webconf install-config install-idoutils ;\
else \
${MAKE} install install-init install-commandmode install-webconf install-config ;\
fi
# Uninstall is too destructive if base install directory is /usr, etc.
#uninstall:
# rm -rf $(DESTDIR)$(BINDIR)/icinga $(DESTDIR)$(CGIDIR)/*.cgi $(DESTDIR)$(CFGDIR)/*.cfg $(DESTDIR)$(HTMLDIR)
#
# Targets for creating packages on various architectures
#
# Solaris pkgmk
PACKDIR=@PACKDIR@
VERSION=@VERSION@
SOL_PKG_NAME=@SOL_PKG_NAME@
SUN_OS_RELEASE=$(shell uname -r | cut -f2 -d. )
SUN_PLATFORM=$(shell uname -p)
Prototype:
rm -rf $(PACKDIR)
mkdir -p $(PACKDIR)
mkdir -p $(PACKDIR)/$(CFGDIR)/objects
$(MAKE) all
$(MAKE) DESTDIR=$(PACKDIR) INIT_OPTS='' INSTALL_OPTS='' COMMAND_OPTS='' icinga_grp='' icinga_usr='' \
install install-commandmode install-webconf install-idoutils
cd sample-config; \
for file in *.cfg; \
do \
$(INSTALL) -m 644 $$file $(PACKDIR)/$(CFGDIR)/$$file.$(VERSION); \
done
chmod 640 $(PACKDIR)/$(CFGDIR)/resource.cfg.$(VERSION)
cd sample-config/template-object; \
for file in *.cfg; \
do \
$(INSTALL) -m 644 $$file $(PACKDIR)/$(CFGDIR)/objects/$$file.$(VERSION); \
done
mkdir -p $(PACKDIR)/lib/svc/method/
$(INSTALL) -o root -g bin -m 555 daemon-init $(PACKDIR)/lib/svc/method/icinga
mkdir -p $(PACKDIR)/var/svc/manifest/application/
$(INSTALL) -m 444 -o root -g root solaris/icinga.xml $(PACKDIR)/var/svc/manifest/application/
#cd contrib; $(MAKE) all; $(MAKE) DESTDIR=$(PACKDIR) INIT_OPTS='' INSTALL_OPTS='' COMMAND_OPTS='' icinga_grp='' icinga_usr='' install
echo i pkginfo > solaris/Prototype
if [ -f solaris/checkinstall.in ] ; then cat solaris/checkinstall.in | sed 's/!SUN_PLATFORM!/$(SUN_PLATFORM)/g' > solaris/checkinstall; fi
cd solaris; \
for file in checkinstall preinstall postinstall preremove postremove depend i.manifest r.manifest; \
do \
if [ -f $$file ] ; then echo i $$file >> Prototype; fi ; \
done
pkgproto $(PACKDIR)=/ | sed -e "s|$(LOGNAME) $(GROUP)$$|root root|" | egrep -v "(s|d) none (/ |/var|/usr|/etc|/lib)" >> solaris/Prototype
pkg/icinga/pkgmap: Prototype
mkdir $(PACKDIR)/$(SOL_PKG_NAME)
cd solaris; pkgmk -o -r / -f Prototype -d $(PACKDIR) $(SOL_PKG_NAME)
icinga.sun.pkg.tar.gz: pkg/icinga/pkgmap
cd $(PACKDIR) && tar -cf - icinga | gzip -9 -c > ../icinga-$(VERSION)-Sol$(SUN_OS_RELEASE)-$(SUN_PLATFORM).pkg.tar.gz
icinga.sun.pkg: pkg/icinga/pkgmap
pkgtrans -s $(PACKDIR) ../icinga-$(VERSION)-Sol$(SUN_OS_RELEASE)-$(SUN_PLATFORM).pkg $(SOL_PKG_NAME)
pkgsettar: icinga.sun.pkg.tar.gz
pkgset: icinga.sun.pkg
pkgclean:
rm -rf solaris_pkg solaris/Prototype icinga-$(VERSION)-$(SUN_PLATFORM).pkg.tar.gz icinga-$(VERSION)-$(SUN_PLATFORM).pkg