updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / argus / Makefile
blob235c9fa99c0ea7657c989ae10b3190731e312a62
1 #### This section automagically generated by Configure
2 PERL=/usr/bin/perl
3 SENDMAIL=
4 QPAGE=
5 FPING=/usr/sbin/fping
6 FPING6=
7 DATABASE=DB_File
8 HAVE_GD=0
9 AUTH_FILE=web_auth_file.pl
10 UPGRADE=
11 INSTALL_BIN=../../pkg/opt/argus/bin
12 INSTALL_SBIN=../../pkg/opt/argus/sbin
13 INSTALL_CGI=../../pkg/opt/argus/cgi-bin
14 INSTALL_LIB=../../pkg/opt/argus/lib
15 INSTALL_DATA=../../pkg/opt/argus/data
16 #### End of Configure section
17 # Copyright (c) 2002 by Jeff Weisberg
18 # Author: Jeff Weisberg <argus @ tcp4me.com>
19 # Created: 2002-Jun-27
20 # Function: Makefile template
22 # $Id: Makefile.tplt,v 1.163 2007/06/01 23:30:47 jaw Exp $
24 VERSION = 3.5
25 MESSAGE =
26 INSTALL = please see the INSTALL document for the next steps
27 UPGRADE1 = be sure to install the new misc/argus.css and misc/argus.js files
28 UPGRADE2 = this version may require changes to your config file.
30 BUILD = built/argusd built/arguscgi built/argusctl built/conf.pl built/rc.argusd \
31 built/graphd built/picasso built/argus-config \
32 built/argus-agent built/argusvxml
34 TOOLS = Makefile tools/fixup built
36 # text files
37 TEXT = README LOCATION LICENSE Artistic
39 # core code
40 LIBS_A = Alias.pm BaseIO.pm Commands.pm Conf.pm \
41 Configable.pm Control.pm Cron.pm \
42 Doc.pm Group.pm MonEl.pm Notify.pm \
43 NotMe.pm Override.pm Server.pm Service.pm Stats.pm \
44 Web.pm NullConf.pm Error.pm Argus::Ctl.pm Argus::Encode.pm \
45 NullCtl.pm UserCron.pm TestPort.pm Resolv.pm \
46 misc.pl localization.pl \
47 Argus::MonEl::Expand.pm Argus::MonEl::Noise.pm Argus::MonEl::Trans.pm \
48 Argus::Archivist.pm Argus::Archive.pm
50 # Service Modules
51 LIBS_S = Argus::IP.pm TCP.pm UDP.pm Ping.pm Prog.pm \
52 SNMP.pm DNS.pm DNS::UDP.pm DNS::TCP.pm Self.pm \
53 DataBase.pm SSL.pm Argus::Agent.pm \
54 Argus::SIP.pm Argus::SIP::TCP.pm Argus::SIP::UDP.pm Argus::Asterisk.pm \
55 Argus::RPC.pm Argus::RPC::UDP.pm Argus::RPC::TCP.pm \
56 Encoding::BER.pm Encoding::BER::SNMP.pm
58 # darp code
59 LIBS_D = DARP.pm DARP::Master.pm DARP::Slave.pm DARP::Service.pm \
60 DARP::Conf.pm DARP::Watch.pm DARP::Misc.pm
62 # web code
63 LIBS_W = web_acl.pl web_auth_file.pl web_misc.pl web_notify.pl web_override.pl \
64 web_page.pl web_login.pl web_about.pl web_utils.pl web_graph.pl web_web20.pl
66 # graphing code
67 LIBS_G = Graph.pm Argus::Graph::Data.pm Chart::Strip.pm
69 # experimental code
70 LIBS_X =
73 LIBS = $(LIBS_A) $(LIBS_S) $(LIBS_D) $(LIBS_W) $(LIBS_G) $(LIBS_X)
75 FIXUP = $(PERL) tools/fixup -l "$(INSTALL_LIB)" -d "$(INSTALL_DATA)" -s "$(INSTALL_SBIN)" -c "$(INSTALL_CGI)" \
76 -b "$(INSTALL_BIN)" -P "$(PERL)" -S "$(SENDMAIL)" -Q "$(QPAGE)" -F "$(FPING)" \
77 -V "$(VERSION)" -D "$(DATABASE)" -g "$(HAVE_GD)" -6 "$(FPING6)" -A "$(AUTH_FILE)"
79 CLEAN = $(BUILD) Makefile
82 all: $(BUILD) message
84 message:
85 @echo
86 @echo build of argus version $(VERSION) complete
87 @if test '$(MESSAGE)'; then echo '==>' $(MESSAGE); fi
88 @echo now run \'make install\'
90 install-message:
91 @echo
92 @echo install of argus version $(VERSION) complete
93 @if test '$(MESSAGE)'; then echo '==>' $(MESSAGE); fi
94 @if [ ! "$(UPGRADING)" -a "$(INSTALL)" ]; then echo $(INSTALL) ; fi
95 @if [ "$(UPGRADING)" -a "$(UPGRADE1)" ]; then echo '==>' $(UPGRADE1) ; fi
96 @if [ "$(UPGRADING)" -a "$(UPGRADE2)" ]; then echo '==>' $(UPGRADE2) ; fi
98 built:
99 -mkdir built
101 built/argusd: $(TOOLS) src/main.pl
102 $(FIXUP) src/main.pl > built/argusd
103 chmod a+x built/argusd
105 built/arguscgi: $(TOOLS) src/cgi
106 $(FIXUP) src/cgi > built/arguscgi
107 chmod a+x built/arguscgi
109 built/argusvxml: $(TOOLS) src/vxml
110 $(FIXUP) src/vxml > built/argusvxml
111 chmod a+x built/argusvxml
113 built/argusctl: $(TOOLS) src/argusctl
114 $(FIXUP) src/argusctl > built/argusctl
115 chmod a+x built/argusctl
117 built/rc.argusd: $(TOOLS) src/rc.argusd
118 $(FIXUP) src/rc.argusd > built/rc.argusd
119 chmod a+x built/rc.argusd
121 built/conf.pl: $(TOOLS) src/conf.pl
122 $(FIXUP) src/conf.pl > built/conf.pl
124 built/graphd: $(TOOLS) src/graphd.pl
125 $(FIXUP) src/graphd.pl > built/graphd
126 chmod a+x built/graphd
128 built/picasso: $(TOOLS) src/picasso.pl
129 $(FIXUP) src/picasso.pl > built/picasso
130 chmod a+x built/picasso
132 built/argus-config: $(TOOLS) src/argus-config
133 $(FIXUP) src/argus-config > built/argus-config
134 chmod a+x built/argus-config
136 built/argus-agent: $(TOOLS) src/sys_agent.pl
137 $(FIXUP) src/sys_agent.pl > built/argus-agent
138 chmod a+x built/argus-agent
140 Makefile:
141 @echo Maybe run Configure\?
143 clean:
144 -rm $(CLEAN)
146 install: install-lib install-prog install-conf remove-auth $(INSTALL_DATA) \
147 $(INSTALL_DATA)/gdata $(INSTALL_DATA)/perl install-locale install-message
149 install-lib:
150 -mkdir -p $(INSTALL_LIB)
151 $(PERL) tools/install_lib -s src -l $(INSTALL_LIB) $(LIBS)
152 cp $(TEXT) $(INSTALL_LIB)/
154 install-prog: upgrade-cgi
155 -mkdir -p $(INSTALL_SBIN)
156 -mkdir -p $(INSTALL_BIN)
157 -mkdir -p $(INSTALL_CGI)
158 -mkdir -p $(INSTALL_LIB)
159 cp built/argusd $(INSTALL_SBIN)/
160 cp built/argusctl $(INSTALL_SBIN)/
161 cp built/arguscgi $(INSTALL_CGI)/
162 cp built/graphd $(INSTALL_LIB)/
163 cp built/picasso $(INSTALL_LIB)/
164 cp built/argus-config $(INSTALL_BIN)/
165 cp built/argus-agent $(INSTALL_SBIN)/
166 cp built/argusvxml $(INSTALL_CGI)/
168 # previously, cgi was installed in sbin with symlink
169 # cleanup old the files
170 upgrade-cgi:
171 -rm $(INSTALL_SBIN)/arguscgi $(INSTALL_CGI)/arguscgi
173 # in case the format of the auth file has changed
174 REMOVEAUTH=1
175 remove-auth:
176 @if test "$(REMOVEAUTH)" -a -f $(INSTALL_DATA)/auth; then rm $(INSTALL_DATA)/auth; fi
178 # this only happens if there isn't already a data dir
179 # if the user is upgrading, we leave it all alone
180 # while a+rwx may be not be optimal security-wise,
181 # it reduces the amount of support email the author receives
182 $(INSTALL_DATA):
183 mkdir -p $(INSTALL_DATA)/stats $(INSTALL_DATA)/html $(INSTALL_DATA)/notify
184 touch $(INSTALL_DATA)/log
185 $(PERL) -e 'print getppid, "\n"' > $(INSTALL_DATA)/notno
186 chmod a+rwx $(INSTALL_DATA)
187 chmod a+r $(INSTALL_DATA)/html $(INSTALL_DATA)/log
188 @echo ''
189 @echo creating example files...
190 @sleep 1
191 @cp examples/users $(INSTALL_DATA)/users.example
192 @cp examples/config $(INSTALL_DATA)/config.example
193 @echo ''
194 @echo '***' you will need to create/edit the files \'$(INSTALL_DATA)/config\'
195 @echo '*** ' and \'$(INSTALL_DATA)/users\'
196 @echo '***' be sure to check permissions on \'$(INSTALL_DATA)\' and its contents
197 @echo ''
199 # if this is an upgrade, gdata might not exist even though data does
200 $(INSTALL_DATA)/gdata: $(INSTALL_DATA)
201 if test ! -d $(INSTALL_DATA)/gdata; then mkdir $(INSTALL_DATA)/gdata; \
202 chmod a+rwx $(INSTALL_DATA)/gdata; fi
203 if test ! -d $(INSTALL_DATA)/gcache; then mkdir $(INSTALL_DATA)/gcache; \
204 chmod a+rwx $(INSTALL_DATA)/gcache; fi
206 $(INSTALL_DATA)/perl: $(INSTALL_DATA)
207 if test ! -d $(INSTALL_DATA)/perl; then \
208 mkdir $(INSTALL_DATA)/perl; \
209 chmod a+rwx $(INSTALL_DATA)/perl; \
212 install-locale: $(INSTALL_DATA)
213 if test ! -d $(INSTALL_DATA)/locale; then \
214 mkdir $(INSTALL_DATA)/locale; \
215 chmod a+rx $(INSTALL_DATA)/locale; \
217 -cp locale/* $(INSTALL_DATA)/locale
219 install-conf:
220 cp built/conf.pl $(INSTALL_LIB)
222 HTML/config-details.html: $(BUILD)
223 built/argusd -DH > HTML/config-details.html
225 HTML/debug-details.html: $(BUILD)
226 built/argusd -EH > HTML/debug-details.html
228 HTML/config-since34.html: $(BUILD)
229 built/argusd -DHS 3.4 > HTML/config-since34.html
232 love:
233 @echo not war