/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: teddy at recompile
  • Date: 2011-12-31 13:25:58 UTC
  • mto: This revision was merged to the branch mainline in revision 541.
  • Revision ID: teddy@recompile.se-20111231132558-z0dh7qgofgctmgri
* network-hooks.s/bridge: Don't use interface names directly; search
                          for interface names using their address.
  (addrtoif): New function.
* network-hooks.s/bridge.conf (PORTS): Removed.
  (PORT_ADDRESSES): New.
* network-hooks.s/wireless: Don't use interface names directly; search
                            for interface names using their address.
  (addrtoif): New function.
* network-hooks.s/wireless.conf: Specify address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
version=1.4.1
27
27
SED=sed
28
28
 
 
29
USER=$(firstword $(subst :, ,$(shell getent passwd _mandos || getent passwd nobody || echo 65534)))
 
30
GROUP=$(firstword $(subst :, ,$(shell getent group _mandos || getent group nobody || echo 65534)))
 
31
 
29
32
## Use these settings for a traditional /usr/local install
30
33
# PREFIX=$(DESTDIR)/usr/local
31
34
# CONFDIR=$(DESTDIR)/etc/mandos
32
35
# KEYDIR=$(DESTDIR)/etc/mandos/keys
33
36
# MANDIR=$(PREFIX)/man
34
37
# INITRAMFSTOOLS=$(DESTDIR)/etc/initramfs-tools
 
38
# STATEDIR=$(DESTDIR)/var/lib/mandos
35
39
##
36
40
 
37
41
## These settings are for a package-type install
40
44
KEYDIR=$(DESTDIR)/etc/keys/mandos
41
45
MANDIR=$(PREFIX)/share/man
42
46
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
 
47
STATEDIR=$(DESTDIR)/var/lib/mandos
43
48
##
44
49
 
45
50
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
230
235
distclean: clean
231
236
mostlyclean: clean
232
237
maintainer-clean: clean
233
 
        -rm --force --recursive keydir confdir
 
238
        -rm --force --recursive keydir confdir statedir
234
239
 
235
240
check:  all
236
241
        ./mandos --check
250
255
        @echo "###################################################################"
251
256
        ./plugin-runner --plugin-dir=plugins.d \
252
257
                --config-file=plugin-runner.conf \
253
 
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
 
258
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--network-hook-dir=network-hooks.d \
254
259
                $(CLIENTARGS)
255
260
 
256
261
# Used by run-client
260
265
 
261
266
# Run the server with a local config
262
267
run-server: confdir/mandos.conf confdir/clients.conf
263
 
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
 
268
        ./mandos --debug --no-dbus --configdir=confdir \
 
269
                --statedir=statedir $(SERVERARGS)
264
270
 
265
271
# Used by run-server
266
272
confdir/mandos.conf: mandos.conf
271
277
        install --mode=u=rw $< $@
272
278
# Add a client password
273
279
        ./mandos-keygen --dir keydir --password >> $@
 
280
statedir:
 
281
        install --directory statedir
274
282
 
275
283
install: install-server install-client-nokey
276
284
 
281
289
 
282
290
install-server: doc
283
291
        install --directory $(CONFDIR)
 
292
        install --directory --mode=u=rwx --owner=$(USER) \
 
293
                --group=$(GROUP) $(STATEDIR)
284
294
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
285
295
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
286
296
                mandos-ctl
318
328
                install --mode=u=rwx \
319
329
                        --directory "$(CONFDIR)/plugins.d"; \
320
330
        fi
 
331
        install --mode=u=rwx,go=rx --directory \
 
332
                "$(CONFDIR)/network-hooks.d"
321
333
        install --mode=u=rwx,go=rx \
322
334
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
323
335
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \